client: switch widget: handle the disabled state

This commit is contained in:
Adorian Doran
2025-01-22 01:24:09 +02:00
parent 356c0570f3
commit d4ef84e0b7
2 changed files with 27 additions and 8 deletions

View File

@@ -56,11 +56,11 @@ export default class SharedSwitchWidget extends SwitchWidget {
this.isToggled = isShared;
if (switchDisabled) {
//this.$widget.attr("title", t("shared_switch.inherited"));
//this.$switchOff.addClass("switch-disabled");
this.disabledTooltip = t("shared_switch.inherited");
this.canToggle = false;
} else {
//this.$widget.removeAttr("title");
//this.$switchOff.removeClass("switch-disabled");
this.disabledTooltip = "";
this.canToggle = true;
}
}