diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index fc6c5d185..2d3757ddc 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -129,6 +129,21 @@ namespace Flow.Launcher.Plugin /// default: 0 public int Score { get; set; } + /// + /// File Size + /// + public string FileSize { get; set; } = string.Empty; + + /// + /// Created + /// + public string FileCreated { get; set; } = string.Empty; + + /// + /// Last Modified Date File + /// + public string LastModifed { get; set; } = string.Empty; + /// /// A list of indexes for the characters to be highlighted in Title /// @@ -204,7 +219,10 @@ namespace Flow.Launcher.Plugin Score = Score, TitleHighlightData = TitleHighlightData, OriginQuery = OriginQuery, - PluginDirectory = PluginDirectory + PluginDirectory = PluginDirectory, + FileCreated = FileCreated, + FileSize = FileSize, + LastModifed = LastModifed }; } @@ -300,6 +318,8 @@ namespace Flow.Launcher.Plugin IsMedia = false, PreviewDelegate = null, }; + + } } } diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 2e6e973a7..c8a40c7ae 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -490,6 +490,18 @@ 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 a87f766a1..b2839231e 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -8,6 +8,8 @@ using System.Threading.Tasks; using System.Windows; using Flow.Launcher.Plugin.Explorer.Search.Everything; using System.Windows.Input; +using System.Windows.Shapes; +using Path = System.IO.Path; namespace Flow.Launcher.Plugin.Explorer.Search { @@ -239,6 +241,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(); + + DateTime created = System.IO.File.GetCreationTime(filePath); + string createdStr = created.ToString("yyyy-MM-dd HH:mm:ss"); + DateTime lastModified = System.IO.File.GetLastWriteTime(filePath); + string lastModifiedStr = lastModified.ToString("yyyy-MM-dd HH:mm:ss"); + + var result = new Result { Title = title, @@ -248,6 +260,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search AutoCompleteText = GetAutoCompleteText(title, query, filePath, ResultType.File), TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData, Score = score, + FileSize = fileSizStr, + FileCreated = createdStr, + LastModifed = lastModifiedStr, CopyText = filePath, Action = c => {