feat: add fullscreen toggle button to dashboard

Added a fullscreen button (⛶) next to the last-update timestamp.
Clicking it toggles browser fullscreen mode using the Fullscreen API.
This commit is contained in:
yumoqing 2026-05-31 13:02:10 +08:00
parent 28e538750b
commit 97ca142092

View File

@ -37,6 +37,27 @@
"text": "最后更新: {{get_today_usage(request) and request._run_ns.curDateString() or ''}}",
"fontSize": "13px"
}
},
{
"widgettype": "Button",
"options": {
"label": "⛶",
"border": "none",
"borderRadius": "6px",
"padding": "4px 12px",
"fontSize": "16px",
"marginLeft": "12px",
"cursor": "pointer"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "script",
"target": "self",
"script": "if (!document.fullscreenElement) { document.documentElement.requestFullscreen(); } else { document.exitFullscreen(); }"
}
]
}
]
}