1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-14 08:12:46 -04:00

feat: consolidate plugin directory management into a single dynamic button (#2400)

* feat: add Open Dir button to Plugins settings

* feat: consolidate plugin directory management into a single dynamic button
This commit is contained in:
Huỳnh Thiện Lộc
2026-05-12 20:29:17 +07:00
committed by GitHub
parent 9b68fc8213
commit 4bc62cc6ec
2 changed files with 31 additions and 12 deletions
+8 -4
View File
@@ -250,11 +250,15 @@ FocusScope {
}
DankButton {
text: I18n.tr("Create Dir")
iconName: "create_new_folder"
text: PluginService.pluginDirectoryExists ? I18n.tr("Open Dir") : I18n.tr("Create Dir")
iconName: PluginService.pluginDirectoryExists ? "folder_open" : "create_new_folder"
onClicked: {
PluginService.createPluginDirectory();
ToastService.showInfo("Created plugin directory: " + PluginService.pluginDirectory);
if (PluginService.pluginDirectoryExists) {
PluginService.openPluginDirectory();
} else {
PluginService.createPluginDirectory();
ToastService.showInfo("Created plugin directory: " + PluginService.pluginDirectory);
}
}
}
}