feat(HEL-72): 手机端底部五入口导航栏改版

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
施工员
2026-08-24 09:22:03 +08:00
co-authored by multica-agent
parent 7bf5d8c2b6
commit 574a375292
5 changed files with 256 additions and 95 deletions
+22 -1
View File
@@ -32,8 +32,29 @@
global.MobileTheme = { readTheme: readTheme, applyTheme: applyTheme, toggle: toggle };
function syncKeyboardInset() {
const app = document.getElementById("m-app");
const visual = global.visualViewport;
if (!visual) {
app.style.setProperty("--m-keyboard-inset", "0px");
return;
}
const inset = Math.max(0, global.innerHeight - visual.height - visual.offsetTop);
app.style.setProperty("--m-keyboard-inset", inset + "px");
}
function bindViewport() {
const visual = global.visualViewport;
if (visual) {
visual.addEventListener("resize", syncKeyboardInset);
visual.addEventListener("scroll", syncKeyboardInset);
}
syncKeyboardInset();
}
async function boot() {
applyTheme(readTheme());
bindViewport();
let session = { authenticated: false };
try {
session = await global.MobileSession.me();
@@ -44,7 +65,7 @@
if (!session.authenticated) {
if (!/^#\/?auth/.test(hash)) global.location.replace("#/auth");
} else if (/^#\/?auth/.test(hash)) {
global.location.replace("#/home");
global.location.replace("#/hub/market");
}
global.MobileRouter.init();
}