mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-14 00:02:45 -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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user