diff --git a/gui/web_gui.py b/gui/web_gui.py index 2e34710..37569a4 100644 --- a/gui/web_gui.py +++ b/gui/web_gui.py @@ -1738,6 +1738,16 @@ class Handler(BaseHTTPRequestHandler): # 提供 CSRF token 给前端 if u.path == "/api/csrf-token": return self._send_json({"token": _CSRF_TOKEN}) + if u.path == "/api/version": + try: + from version import APP_VERSION, APP_BUILD_DATE, APP_NAME + except Exception: + APP_VERSION, APP_BUILD_DATE, APP_NAME = "?", "?", "douyin_guaji" + return self._send_json({ + "name": APP_NAME, + "version": str(APP_VERSION).lstrip("Vv"), + "build": APP_BUILD_DATE, + }) if u.path == "/api/devices": adb = find_adb_executable() return self._send_json({"adb": adb, "devices": list_adb_devices(adb)}) diff --git a/webui/index.html b/webui/index.html index cae8912..9100389 100644 --- a/webui/index.html +++ b/webui/index.html @@ -15,7 +15,7 @@ } catch (e) {} })(); - +
@@ -1259,6 +1259,6 @@ - + diff --git a/webui/styles.css b/webui/styles.css index 402b389..245290a 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -2077,6 +2077,7 @@ input[type="number"]::-webkit-outer-spin-button { } .reservationItem { + position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--border); @@ -2085,11 +2086,33 @@ input[type="number"]::-webkit-outer-spin-button { transition: border-color var(--motion-fast), box-shadow var(--motion-fast); } +.reservationItem::before { + position: absolute; + left: 0; + top: 10px; + bottom: 10px; + width: 2px; + content: ""; + border-radius: 0 2px 2px 0; + background: var(--primary); + opacity: 0; + transition: opacity var(--motion-fast); +} + .reservationItem:hover { border-color: var(--hover-border); box-shadow: var(--shadow-soft); } +.reservationItem:hover::before { + opacity: 0.65; +} + +.reservationItem.isImminent::before, +.reservationItem.isDue::before { + display: none; +} + .reservationItem.isImminent { border-color: var(--warning); background: color-mix(in oklab, var(--warning-soft) 60%, var(--surface));