mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-10 13:27:21 -04:00
feat(dbar): freedom to remove the only bar with hint warnings
This commit is contained in:
@@ -65,10 +65,6 @@ Column {
|
|||||||
bar.select("default");
|
bar.select("default");
|
||||||
}
|
}
|
||||||
|
|
||||||
function canToggleBar(config) {
|
|
||||||
return config.id !== "default" || SettingsData.isIslandBarConfig(config);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setBarEnabled(barId, enabled) {
|
function setBarEnabled(barId, enabled) {
|
||||||
SettingsData.updateBarConfig(barId, {
|
SettingsData.updateBarConfig(barId, {
|
||||||
enabled
|
enabled
|
||||||
@@ -117,7 +113,6 @@ Column {
|
|||||||
summary: root.barSummary(modelData)
|
summary: root.barSummary(modelData)
|
||||||
selected: bar.selectedBarId === modelData.id
|
selected: bar.selectedBarId === modelData.id
|
||||||
checked: modelData.enabled ?? false
|
checked: modelData.enabled ?? false
|
||||||
toggleVisible: root.canToggleBar(modelData)
|
|
||||||
deletable: root.canDeleteBar(modelData)
|
deletable: root.canDeleteBar(modelData)
|
||||||
onClicked: bar.select(modelData.id)
|
onClicked: bar.select(modelData.id)
|
||||||
onToggled: checked => {
|
onToggled: checked => {
|
||||||
@@ -127,6 +122,14 @@ Column {
|
|||||||
onDeleteRequested: root.deleteBar(modelData.id)
|
onDeleteRequested: root.deleteBar(modelData.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsNavRow {
|
||||||
|
iconName: "keyboard_command_key"
|
||||||
|
title: I18n.tr("Keyboard shortcuts")
|
||||||
|
hint: I18n.tr("With no bar, Dot or dock launcher on, shortcuts are the only way back to settings", "bars card hint shown when every bar, the Dot and every dock launcher button are off")
|
||||||
|
visible: !root.dotEnabled && !SettingsData.barConfigs.some(config => config.enabled && !SettingsData.isDotBarConfig(config)) && !SettingsData.dockConfigs.some(dock => dock.enabled && dock.launcherEnabled)
|
||||||
|
onClicked: keyboard => root.parentModal?.navigateTo("keybinds", keyboard)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsCard {
|
SettingsCard {
|
||||||
|
|||||||
Reference in New Issue
Block a user