1
0
Fork 0

fix: Past Results 폴더 버튼이 출력 파일을 select하도록 변경

- HistoryEntry에 OutputPaths (nullable list) 추가, PrimaryOutputPath 헬퍼
- HistoryRow에 OutputPath + RevealPath (output 우선, fallback to source)
- AddToHistory 호출 시 result.OutputPaths.ToList() 전달
- XAML 폴더 버튼 Tag를 RevealPath로, ToolTip '출력 파일이 있는 폴더 열기'

이전 history.jsonl은 OutputPaths 없이 저장됨 — 새 변환부터 출력 select
This commit is contained in:
Yun Chan 2026-05-07 16:44:59 +09:00
parent 81d0a04eb0
commit 198a39fd84
3 changed files with 12 additions and 4 deletions

View file

@ -549,8 +549,8 @@
BorderThickness="0"
Padding="6"
Click="OnOpenFolderClick"
Tag="{Binding SourcePath}"
ToolTip="원본 폴더 열기">
Tag="{Binding RevealPath}"
ToolTip="출력 파일이 있는 폴더 열기">
<Path Width="14" Height="14" Stretch="Uniform"
Stroke="{StaticResource FsTextTertiary}"
StrokeThickness="2"

View file

@ -557,7 +557,8 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
OutputCount: result.OutputPaths.Count,
MetaLine: item.MetaLine,
Status: result.Status,
Message: result.Message));
Message: result.Message,
OutputPaths: result.OutputPaths.ToList()));
_activeQueue.Remove(item);
}
@ -1100,8 +1101,11 @@ public sealed record HistoryRow(
string SizeText,
string SavingsText,
string SourcePath,
string? OutputPath = null,
long SavingsBytes = 0)
{
public string RevealPath => OutputPath ?? SourcePath;
public static HistoryRow From(HistoryEntry e)
{
var ext = Path.GetExtension(e.SourcePath).TrimStart('.').ToLowerInvariant();
@ -1116,6 +1120,7 @@ public sealed record HistoryRow(
SizeText: MainWindow.HumanizeBytes(e.SourceSizeBytes),
SavingsText: $"{arrow} {MainWindow.HumanizeBytes(Math.Abs(saved))}",
SourcePath: e.SourcePath,
OutputPath: e.PrimaryOutputPath,
SavingsBytes: saved);
}
}

View file

@ -11,11 +11,14 @@ public sealed record HistoryEntry(
int OutputCount,
string? MetaLine,
ConvertStatus Status,
string? Message)
string? Message,
IReadOnlyList<string>? OutputPaths = null)
{
public long SavingsBytes => SourceSizeBytes - OutputSizeBytes;
public DateOnly Date => DateOnly.FromDateTime(Timestamp);
public string? PrimaryOutputPath => OutputPaths is { Count: > 0 } list ? list[0] : null;
}
public sealed class HistoryStore