1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-21 10:35:26 -04:00

refactor(settings): split network settings into tabs (#2633)

This commit is contained in:
jbwfu
2026-06-16 03:21:02 +08:00
committed by GitHub
parent 59998e9fd2
commit a098088f03
14 changed files with 2149 additions and 1927 deletions
+9 -8
View File
@@ -53,20 +53,21 @@ FloatingWindow {
visible = !visible;
}
function setTabIndex(tabIndex: int) {
if (tabIndex < 0)
return;
currentTabIndex = tabIndex;
sidebar.autoExpandForTab(tabIndex);
}
function showWithTab(tabIndex: int) {
if (tabIndex >= 0) {
currentTabIndex = tabIndex;
sidebar.autoExpandForTab(tabIndex);
}
setTabIndex(tabIndex);
visible = true;
}
function showWithTabName(tabName: string) {
var idx = sidebar.resolveTabIndex(tabName);
if (idx >= 0) {
currentTabIndex = idx;
sidebar.autoExpandForTab(idx);
}
setTabIndex(idx);
visible = true;
}