diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index bda86e481..04ecd03a2 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -413,4 +413,8 @@ sn Sticky Notes + + File Size + Created + Last Modified diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index c8a40c7ae..9f04b1456 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -7,6 +7,7 @@ xmlns:flowlauncher="clr-namespace:Flow.Launcher" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:svgc="http://sharpvectors.codeplex.com/svgc/" + xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:vm="clr-namespace:Flow.Launcher.ViewModel" Name="FlowMainWindow" @@ -490,17 +491,81 @@ x:Name="PreviewSubTitle" Style="{DynamicResource PreviewItemSubTitleStyle}" Text="{Binding Result.SubTitle}" /> - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index b2839231e..60e4a31b4 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -10,6 +10,7 @@ using Flow.Launcher.Plugin.Explorer.Search.Everything; using System.Windows.Input; using System.Windows.Shapes; using Path = System.IO.Path; +using System.Globalization; namespace Flow.Launcher.Plugin.Explorer.Search { @@ -189,11 +190,11 @@ namespace Flow.Launcher.Plugin.Explorer.Search if (mok == 1) uom = "KB"; else if (mok == 2) - uom = " MB"; + uom = "MB"; else if (mok == 3) - uom = " GB"; + uom = "GB"; else if (mok == 4) - uom = " TB"; + uom = "TB"; var returnStr = $"{Convert.ToInt32(drvSize)}{uom}"; if (mok != 0) @@ -241,14 +242,16 @@ namespace Flow.Launcher.Plugin.Explorer.Search var title = Path.GetFileName(filePath); + /* Preview Detail */ long fileSize = new System.IO.FileInfo(filePath).Length; - string fileSizStr = fileSize.ToString(); + string fileSizStr = ToReadableSize(fileSize, 2); DateTime created = System.IO.File.GetCreationTime(filePath); - string createdStr = created.ToString("yyyy-MM-dd HH:mm:ss"); + string createdStr = created.ToString("yy-M-dd ddd hh:mm", CultureInfo.CurrentCulture); DateTime lastModified = System.IO.File.GetLastWriteTime(filePath); - string lastModifiedStr = lastModified.ToString("yyyy-MM-dd HH:mm:ss"); + string lastModifiedStr = lastModified.ToString("yy-M-dd ddd hh:mm", CultureInfo.CurrentCulture); + var result = new Result