mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-08 06:28:27 -04:00
feat(plugins): add update all CLI flag and settings updates dialog (#2682)
* feat(plugins): add update all CLI flag and settings update dialog * feat(plugins): add comparison diff URL support and update button styling * feat(plugins): skip system plugins in bulk CLI update * fix(plugins): remove check shorthand to resolve conflict with config flag * feat(plugins): inline update dialog, show version tags, restructure buttons
This commit is contained in:
@@ -20,6 +20,11 @@ FocusScope {
|
||||
property string searchQuery: ""
|
||||
property var filteredPlugins: []
|
||||
|
||||
readonly property var pluginsWithUpdates: {
|
||||
if (!DMSService.installedPlugins) return [];
|
||||
return DMSService.installedPlugins.filter(p => p.hasUpdate === true);
|
||||
}
|
||||
|
||||
function updateFilteredPlugins() {
|
||||
var query = searchQuery.toLowerCase();
|
||||
filteredPlugins = PluginService.availablePluginsList.filter(plugin => {
|
||||
@@ -261,10 +266,24 @@ FocusScope {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DankButton {
|
||||
text: I18n.tr("Update All")
|
||||
iconName: "download"
|
||||
enabled: DMSService.dmsAvailable && pluginsTab.pluginsWithUpdates.length > 0
|
||||
onClicked: {
|
||||
showPluginUpdatesDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PluginUpdatesDialog {
|
||||
id: pluginUpdatesDialogItem
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
width: parent.width
|
||||
height: directoryColumn.implicitHeight + Theme.spacingL * 2
|
||||
@@ -533,4 +552,8 @@ FocusScope {
|
||||
if (pluginBrowserLoader.item)
|
||||
pluginBrowserLoader.item.show();
|
||||
}
|
||||
|
||||
function showPluginUpdatesDialog() {
|
||||
pluginUpdatesDialogItem.show(pluginsTab.pluginsWithUpdates);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user