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:
parent
81d0a04eb0
commit
198a39fd84
3 changed files with 12 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue