feat: h5 desktop shell with sidebar and dark mode
- tokens.css/app.css: Miuix dual-color tokens + HyperOS 4 soft-glass rail - bridge.js/router.js: Promise bridge wrapper + 5-page router with top clock - index.html: sidebar + 5 page containers - native wallpaper transparency: Theme.Hearth (showWallpaper + transparent window) + WebView transparent background
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// HearthBridge 原生桥接封装:统一 Promise 调用
|
||||
// HearthBridge native bridge wrapper: unified Promise-based calls
|
||||
const bridge = {
|
||||
call(method, ...args) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!window.HearthBridge || typeof window.HearthBridge[method] !== 'function') {
|
||||
reject(new Error(`bridge method not found: ${method}`));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
resolve(window.HearthBridge[method](...args));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user