From 97ca142092f07918e1c4e63e7ebe8144922cf272 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 31 May 2026 13:02:10 +0800 Subject: [PATCH] feat: add fullscreen toggle button to dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a fullscreen button (⛶) next to the last-update timestamp. Clicking it toggles browser fullscreen mode using the Fullscreen API. --- wwwroot/index.ui | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 8e6c19a..8af5622 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -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(); }" + } + ] } ] }