Add a model for recently opened files in MainWindow.axaml.cs

This commit is contained in:
InspectorIT
2025-11-18 17:08:27 +03:00
parent 6ea0d63eb3
commit 9a0c3369e3

View File

@@ -61,6 +61,7 @@ namespace KeyKeeper.Views
var topLevel = TopLevel.GetTopLevel(this);
if (topLevel == null) return;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
var files = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{
Title = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
@@ -102,4 +103,17 @@ namespace KeyKeeper.Views
messageBox.ShowDialog(this);
}
}
public class RecentVault
{
public string Path { get; set; } = string.Empty;
public DateTime LastOpened { get; set; }
public string DisplayPath => System.IO.Path.GetFileName(Path);
public override string ToString()
{
return DisplayPath;
}
}
}