Add check plugin update button

This commit is contained in:
Jack251970 2025-07-14 16:24:09 +08:00
parent 6eb52b8961
commit b393d36186
3 changed files with 14 additions and 0 deletions

View file

@ -237,6 +237,7 @@
<system:String x:Key="updateNoResultSubtitle">All plugins are up to date</system:String>
<system:String x:Key="updateAllPluginsTitle">Update all plugins</system:String>
<system:String x:Key="updateAllPluginsSubtitle">Would you like to update these plugins?{0}{0}{1}</system:String>
<system:String x:Key="checkPluginUpdatesTooltip">Check plugin updates</system:String>
<!-- Setting Theme -->
<system:String x:Key="theme">Theme</system:String>

View file

@ -109,6 +109,12 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
await PluginInstaller.InstallPluginAndCheckRestartAsync(file);
}
[RelayCommand]
private async Task CheckPluginUpdatesAsync()
{
await PluginInstaller.UpdatePluginAsync(silentUpdate: false);
}
private static string GetFileFromDialog(string title, string filter = "")
{
var dlg = new Microsoft.Win32.OpenFileDialog

View file

@ -99,6 +99,13 @@
ToolTip="{DynamicResource installLocalPluginTooltip}">
<ui:FontIcon FontSize="14" Glyph="&#xE8DA;" />
</Button>
<Button
Height="34"
Margin="0 0 10 0"
Command="{Binding CheckPluginUpdatesCommand}"
ToolTip="{DynamicResource checkPluginUpdatesTooltip}">
<ui:FontIcon FontSize="14" Glyph="&#xecc5;" />
</Button>
<TextBox
Name="PluginStoreFilterTextbox"
Width="150"