2025-09-18 03:46:09 +00:00
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
using Flow.Launcher.Plugin;
|
2021-11-02 20:07:11 +00:00
|
|
|
|
|
2025-09-18 04:36:40 +00:00
|
|
|
|
namespace Flow.Launcher.Infrastructure.UserSettings
|
2021-11-02 20:07:11 +00:00
|
|
|
|
{
|
2021-11-05 19:16:20 +00:00
|
|
|
|
public class CustomExplorerViewModel : BaseModel
|
2021-11-02 20:07:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
public string Name { get; set; }
|
2025-09-18 03:46:09 +00:00
|
|
|
|
[JsonIgnore]
|
2025-09-23 10:07:15 +00:00
|
|
|
|
public string DisplayName => Name == "Explorer" ? Localize.fileManagerExplorer() : Name;
|
2021-11-02 20:07:11 +00:00
|
|
|
|
public string Path { get; set; }
|
|
|
|
|
|
public string FileArgument { get; set; } = "\"%d\"";
|
|
|
|
|
|
public string DirectoryArgument { get; set; } = "\"%d\"";
|
|
|
|
|
|
public bool Editable { get; init; } = true;
|
2021-11-05 19:16:20 +00:00
|
|
|
|
|
|
|
|
|
|
public CustomExplorerViewModel Copy()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CustomExplorerViewModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = Name,
|
|
|
|
|
|
Path = Path,
|
|
|
|
|
|
FileArgument = FileArgument,
|
|
|
|
|
|
DirectoryArgument = DirectoryArgument,
|
|
|
|
|
|
Editable = Editable
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2025-09-18 03:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
public void OnDisplayNameChanged()
|
|
|
|
|
|
{
|
|
|
|
|
|
OnPropertyChanged(nameof(DisplayName));
|
|
|
|
|
|
}
|
2021-11-02 20:07:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|