Relative Date -> File Age

This commit is contained in:
01Dri 2025-05-24 03:16:03 -03:00
parent a711ce4ec7
commit f6103b1105
6 changed files with 10 additions and 10 deletions

View file

@ -33,7 +33,7 @@
<system:String x:Key="plugin_explorer_previewpanel_display_file_size_checkbox">Size</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_creation_checkbox">Date Created</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_modification_checkbox">Date Modified</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_relative_date_checkbox">Relative Date</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_age_checkbox">File Age</system:String>
<system:String x:Key="plugin_explorer_previewpanel_file_info_label">Display File Info</system:String>
<system:String x:Key="plugin_explorer_previewpanel_date_and_time_format_label">Date and time format</system:String>
<system:String x:Key="plugin_explorer_everything_sort_option">Sort Option:</system:String>

View file

@ -31,7 +31,7 @@
<system:String x:Key="plugin_explorer_previewpanel_display_file_size_checkbox">Tamanho</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_creation_checkbox">Data de Criação</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_modification_checkbox">Data de Modificação</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_relative_date_checkbox">Data Relativa</system:String>
<system:String x:Key="plugin_explorer_previewpanel_display_file_age_checkbox">Idade do Arquivo</system:String>
<system:String x:Key="plugin_explorer_previewpanel_file_info_label">Display File Info</system:String>
<system:String x:Key="plugin_explorer_previewpanel_date_and_time_format_label">Date and time format</system:String>
<system:String x:Key="plugin_explorer_everything_sort_option">Sort Option:</system:String>

View file

@ -67,7 +67,7 @@ namespace Flow.Launcher.Plugin.Explorer
public bool ShowModifiedDateInPreviewPanel { get; set; } = true;
public bool ShowRelativeDateInPreviewPanel { get; set; } = true;
public bool ShowFileAgeInPreviewPanel { get; set; } = true;
public string PreviewPanelDateFormat { get; set; } = "yyyy-MM-dd";

View file

@ -169,12 +169,12 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
}
}
public bool ShowRelativeDateInPreviewPanel
public bool ShowFileAgeInPreviewPanel
{
get => Settings.ShowRelativeDateInPreviewPanel;
get => Settings.ShowFileAgeInPreviewPanel;
set
{
Settings.ShowRelativeDateInPreviewPanel = value;
Settings.ShowFileAgeInPreviewPanel = value;
OnPropertyChanged();
OnPropertyChanged(nameof(ShowPreviewPanelDateTimeChoices));
OnPropertyChanged(nameof(PreviewPanelDateTimeChoicesVisibility));

View file

@ -508,8 +508,8 @@
<CheckBox
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Content="{DynamicResource plugin_explorer_previewpanel_display_file_relative_date_checkbox}"
IsChecked="{Binding ShowRelativeDateInPreviewPanel}" />
Content="{DynamicResource plugin_explorer_previewpanel_display_file_age_checkbox}"
IsChecked="{Binding ShowFileAgeInPreviewPanel}" />
</WrapPanel>
</DockPanel>

View file

@ -73,7 +73,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
);
string result = formattedDate;
if (Settings.ShowRelativeDateInPreviewPanel) result = $"{GetRelativeDate(createdDate)} - {formattedDate}";
if (Settings.ShowFileAgeInPreviewPanel) result = $"{GetRelativeDate(createdDate)} - {formattedDate}";
CreatedAt = result;
}
@ -85,7 +85,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
CultureInfo.CurrentCulture
);
string result = formattedDate;
if (Settings.ShowRelativeDateInPreviewPanel) result = $"{GetRelativeDate(lastModifiedDate)} - {formattedDate}";
if (Settings.ShowFileAgeInPreviewPanel) result = $"{GetRelativeDate(lastModifiedDate)} - {formattedDate}";
LastModifiedAt = result;
}