Highlight "Bypass region" row in unsupported regions

This commit is contained in:
redphx 2025-02-08 20:11:48 +07:00
parent bedf82d363
commit 1375fb115d
4 changed files with 14 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -202,6 +202,10 @@
}
}
}
&.bx-settings-important-row {
background: #733b00;
}
}
.bx-settings-dialog-note {

View File

@ -949,6 +949,11 @@ export class SettingsDialog extends NavigationDialog {
}
$row.dataset.type = settingTabContent.group;
// Highlight "Bypass region" row
if (!STATES.supportedRegion && setting.pref === GlobalPref.SERVER_BYPASS_RESTRICTION) {
$row.classList.add('bx-settings-important-row');
}
$tabContent.appendChild($row);
!prefDefinition?.unsupported && setting.onCreated && setting.onCreated(setting, $control);
}