diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 149dcb817..2dd61329a 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -84,13 +84,14 @@
Query time:
| Version
Website
- Uninstall
Plugin Store
Refresh
- Install
+ Install
+ Uninstall
+ Update
Installed
Plug-in already installed
New
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index 74798235a..0a87ba677 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -1320,7 +1320,7 @@
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
MouseUp="OnExternalPluginUninstallClick"
- Text="{DynamicResource plugin_uninstall}"
+ Text="{DynamicResource uninstallbtn}"
TextDecorations="Underline" />
-
+
+
+
-
+
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index db46b6f24..19aa45e47 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -491,5 +491,27 @@ namespace Flow.Launcher
}
}
+
+ private void OnExternalPluginUninstallClick(object sender, RoutedEventArgs e)
+ {
+ if (sender is Button { DataContext: PluginStoreItemViewModel plugin })
+ {
+ var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7");
+ var actionKeyword = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0];
+ API.ChangeQuery($"{actionKeyword} uninstall {plugin.Name}");
+ API.ShowMainWindow();
+ }
+ }
+
+ private void OnExternalPluginUpdateClick(object sender, RoutedEventArgs e)
+ {
+ if (sender is Button { DataContext: PluginStoreItemViewModel plugin })
+ {
+ var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7");
+ var actionKeyword = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0];
+ API.ChangeQuery($"{actionKeyword} update {plugin.Name}");
+ API.ShowMainWindow();
+ }
+ }
}
}
diff --git a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
index e0235b5ac..c0a876378 100644
--- a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
@@ -24,9 +24,10 @@ namespace Flow.Launcher.ViewModel
public string UrlDownload => _plugin.UrlDownload;
public string UrlSourceCode => _plugin.UrlSourceCode;
public string IcoPath => _plugin.IcoPath;
-
- public bool LabelNew => _plugin.LatestReleaseDate-DateTime.Now < TimeSpan.FromDays(7);
+
+ public bool LabelNew => _plugin.LatestReleaseDate - DateTime.Now < TimeSpan.FromDays(7);
public bool LabelInstalled => PluginManager.GetPluginForId(_plugin.ID) != null;
- public bool LabelUpdated => _plugin.DateAdded -DateTime.Now < TimeSpan.FromDays(5) && !LabelNew;
+ public bool LabelUpdated => _plugin.DateAdded - DateTime.Now < TimeSpan.FromDays(5) && !LabelNew;
+ public bool UpdateBtn => LabelUpdated && LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version;
}
}