mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix not disabling unsupported features in Settings dialog
This commit is contained in:
parent
9007663a3a
commit
eed0aa9d9e
4
dist/better-xcloud.user.js
vendored
4
dist/better-xcloud.user.js
vendored
@ -5045,11 +5045,11 @@ class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
_nearby: {
|
_nearby: {
|
||||||
orientation: "horizontal"
|
orientation: "horizontal"
|
||||||
}
|
}
|
||||||
}, $label = CE("span", { class: "bx-settings-label" }, label, note && CE("div", { class: "bx-settings-dialog-note" }, note), setting.unsupported && CE("div", { class: "bx-settings-dialog-note" }, t("browser-unsupported-feature"))), !setting.unsupported && $control), $link = $label.querySelector("a");
|
}, $label = CE("span", { class: "bx-settings-label" }, label, note ? CE("div", { class: "bx-settings-dialog-note" }, note) : prefDefinition?.unsupported && CE("div", { class: "bx-settings-dialog-note" }, t("browser-unsupported-feature"))), !prefDefinition?.unsupported && $control), $link = $label.querySelector("a");
|
||||||
if ($link) $link.classList.add("bx-focusable"), setNearby($label, {
|
if ($link) $link.classList.add("bx-focusable"), setNearby($label, {
|
||||||
focus: $link
|
focus: $link
|
||||||
});
|
});
|
||||||
$tabContent.appendChild($row), setting.onCreated && setting.onCreated(setting, $control);
|
$tabContent.appendChild($row), !prefDefinition?.unsupported && setting.onCreated && setting.onCreated(setting, $control);
|
||||||
}
|
}
|
||||||
setupDialog() {
|
setupDialog() {
|
||||||
let $tabs, $settings;
|
let $tabs, $settings;
|
||||||
|
@ -1152,6 +1152,7 @@ export class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let $label;
|
let $label;
|
||||||
|
|
||||||
const $row = CE('label', {
|
const $row = CE('label', {
|
||||||
class: 'bx-settings-row',
|
class: 'bx-settings-row',
|
||||||
for: `bx_setting_${pref}`,
|
for: `bx_setting_${pref}`,
|
||||||
@ -1162,10 +1163,9 @@ export class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
},
|
},
|
||||||
$label = CE('span', {class: 'bx-settings-label'},
|
$label = CE('span', {class: 'bx-settings-label'},
|
||||||
label,
|
label,
|
||||||
note && CE('div', {class: 'bx-settings-dialog-note'}, note),
|
note ? CE('div', {class: 'bx-settings-dialog-note'}, note) : prefDefinition?.unsupported && CE('div', {class: 'bx-settings-dialog-note'}, t('browser-unsupported-feature')),
|
||||||
setting.unsupported && CE('div', {class: 'bx-settings-dialog-note'}, t('browser-unsupported-feature')),
|
|
||||||
),
|
),
|
||||||
!setting.unsupported && $control,
|
!prefDefinition?.unsupported && $control,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Make link inside <label> focusable
|
// Make link inside <label> focusable
|
||||||
@ -1178,7 +1178,7 @@ export class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tabContent.appendChild($row);
|
$tabContent.appendChild($row);
|
||||||
setting.onCreated && setting.onCreated(setting, $control);
|
!prefDefinition?.unsupported && setting.onCreated && setting.onCreated(setting, $control);
|
||||||
}
|
}
|
||||||
|
|
||||||
private setupDialog() {
|
private setupDialog() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user