diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
index 79f8a5848..6680aacff 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
@@ -33,6 +33,7 @@
Size
Date Created
Date Modified
+ Relative Date
Display File Info
Date and time format
Sort Option:
@@ -125,6 +126,8 @@
Use '>' to search in this directory, '*' to search for file extensions or '>*' to combine both searches.
+
+
Failed to load Everything SDK
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml
index 2754a5a99..59770a29d 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml
@@ -29,8 +29,9 @@
Everything Setting
Preview Panel
Tamanho
- Date Created
- Date Modified
+ Data Criação
+ Data Modificação
+ Data Relativa
Display File Info
Date and time format
Sort Option:
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs
index 3d30bcf29..0a91c024c 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs
@@ -66,6 +66,9 @@ namespace Flow.Launcher.Plugin.Explorer
public bool ShowCreatedDateInPreviewPanel { get; set; } = true;
public bool ShowModifiedDateInPreviewPanel { get; set; } = true;
+
+ public bool ShowRelativeDateInPreviewPanel { get; set; } = true;
+
public string PreviewPanelDateFormat { get; set; } = "yyyy-MM-dd";
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
index cf9ebd33f..baa2c6c28 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
@@ -169,6 +169,18 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
}
}
+ public bool ShowRelativeDateInPreviewPanel
+ {
+ get => Settings.ShowRelativeDateInPreviewPanel;
+ set
+ {
+ Settings.ShowRelativeDateInPreviewPanel = value;
+ OnPropertyChanged();
+ OnPropertyChanged(nameof(ShowPreviewPanelDateTimeChoices));
+ OnPropertyChanged(nameof(PreviewPanelDateTimeChoicesVisibility));
+ }
+ }
+
public string PreviewPanelDateFormat
{
get => Settings.PreviewPanelDateFormat;
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
index e5999da41..c16dc4f51 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
@@ -505,6 +505,11 @@
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Content="{DynamicResource plugin_explorer_previewpanel_display_file_modification_checkbox}"
IsChecked="{Binding ShowModifiedDateInPreviewPanel}" />
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
index 1981a8b0e..aa5ba6cc7 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
@@ -71,7 +71,10 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
$"{Settings.PreviewPanelDateFormat} {Settings.PreviewPanelTimeFormat}",
CultureInfo.CurrentCulture
);
- CreatedAt = $"{GetDiffTimeString(createdDate)} - {formattedDate}";
+
+ string result = formattedDate;
+ if (Settings.ShowRelativeDateInPreviewPanel) result = $"{GetFileAge(createdDate)} - {formattedDate}";
+ CreatedAt = result;
}
if (Settings.ShowModifiedDateInPreviewPanel)
@@ -81,7 +84,9 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
$"{Settings.PreviewPanelDateFormat} {Settings.PreviewPanelTimeFormat}",
CultureInfo.CurrentCulture
);
- LastModifiedAt = $"{GetDiffTimeString(lastModifiedDate)} - {formattedDate}";
+ string result = formattedDate;
+ if (Settings.ShowRelativeDateInPreviewPanel) result = $"{GetFileAge(lastModifiedDate)} - {formattedDate}";
+ LastModifiedAt = result;
}
_ = LoadImageAsync();
@@ -92,7 +97,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
PreviewImage = await Main.Context.API.LoadImageAsync(FilePath, true).ConfigureAwait(false);
}
- private string GetDiffTimeString(DateTime fileDateTime)
+ private string GetFileAge(DateTime fileDateTime)
{
DateTime now = DateTime.Now;
TimeSpan difference = now - fileDateTime;