Files
skillshare/ui/index.html
T
Willie a2f958d288 feat(ui): background mode, in-place upgrade, and PWA support
Three user-visible additions to the web dashboard, plus the CLI surface
needed to drive them.

* `skillshare ui start` / `skillshare ui stop` — run the dashboard as a
  managed background process. Re-running start reuses the existing
  healthy process; stop uses the remembered host/port. Foreground
  `skillshare ui` keeps working unchanged. Process tracking lives in
  ui_process_{unix,windows,other}.go via a PID + current-state file.
* `--app` — opens the dashboard in a Chromium app-mode window (Chrome,
  Edge, Brave) on macOS, Windows, and Linux for a separate Dock/taskbar
  entry without browser chrome.
* In-place upgrade from the browser — the Update dialog and the Doctor
  page's Version card now expose an Update now button. Backed by two
  new endpoints (POST /api/upgrade, POST /api/restart in
  handler_restart_upgrade.go); the browser polls GET /api/health and
  reloads once the new server is ready. Dev builds short-circuit with
  `devMode: true` and a simulated restart so the flow can be exercised
  without rebuilding the binary.
* Progressive Web App — site.webmanifest, app icons (192/512), and a
  minimal service worker registered from main.tsx. Supporting browsers
  can install the dashboard as a standalone desktop app.
* Doctor Version card redesign — state-coloured icon (blue when an
  update is available, green when up to date), explicit
  `current → latest` delta, Update button only when there is something
  to upgrade.
* i18n — translate "DEV mode" in zh-TW / zh-CN / ko (previously left
  as raw English).

Adds CHANGELOG.md and website changelog entries for v0.19.20 and
refreshes website/docs/reference/commands/ui.md to document the new
modes, --app flag, new REST endpoints, and the in-place upgrade flow.
2026-05-24 01:21:06 +08:00

46 lines
2.1 KiB
HTML

<!doctype html>
<html lang="en" data-theme="playful">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="./app-icon.png" />
<link rel="shortcut icon" type="image/png" href="./app-icon.png" />
<link rel="manifest" href="./site.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#f7f6f3" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Skillshare" />
<title>Skillshare Web Dashboard</title>
<!-- DM Sans (all) + Caveat (Playful headings) — single CDN request -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=DM+Sans:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<script>
// FOUC prevention: handle Clean theme + dark mode before first paint
// Default is Playful (already set on <html>); only remove for explicit Clean
// URL ?theme= param overrides localStorage (values: dark, light, playful, clean)
(function() {
var p = new URLSearchParams(location.search).get('theme');
if (p) {
p = p.toLowerCase();
if (p === 'dark' || p === 'light') localStorage.setItem('skillshare-theme-preference', p);
if (p === 'playful' || p === 'clean') localStorage.setItem('skillshare-style', p);
}
var style = localStorage.getItem('skillshare-style');
var pref = localStorage.getItem('skillshare-theme-preference');
if (style === 'clean') {
document.documentElement.removeAttribute('data-theme');
}
var dark = pref === 'dark' || (pref === 'system' && matchMedia('(prefers-color-scheme: dark)').matches);
if (dark) document.documentElement.classList.add('dark');
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>