The desktop store put the catalog on ordinary computers, and then asked people to open a terminal — which on Windows is not even a workable ask, because the installer is `curl … | sh`. This is the window: a grid of cards, one click to install a title into the application menu, one to play it, one to remove it. The CLI stays the product. Every action runs `desktop_store.py --json`, so there is one catalog logic, one state file and one delete guard; the window never touches the filesystem itself. That is also why the engine grew `--json` first rather than this app growing a parser for prose. It doubles as the Windows install path: with no store on the machine, the app downloads the engine, the shared core and a config into the same folder the shell installer would use — Node's https, no curl. An engine older than 1.1.0 cannot be driven from a window, so the client checks the version and offers to refresh it instead of failing on the first call. Deliberate choices worth knowing: - No renderer framework and no build step. Plain HTML, CSS and JS, one runtime dependency. The whole UI is readable in one sitting. - `contextIsolation` on, `nodeIntegration` off, `sandbox` on, a CSP that permits only the app's own script and stylesheet plus images over HTTPS. The renderer can do exactly what preload.js exposes and nothing else. - English and Hungarian, following the system language. The CLIs and the docs stay English; this is the one end-user surface where that is not enough. - `ENGINES` is a list with one entry. The RetroArch store has the same command shape, so adding it is an entry, not a rewrite. Two ways to test it without a working installation in the way: `npm run smoke` drives the bridge with no window at all, and `npm run uitest` loads the window once and reports what rendered — the only way a renderer error would otherwise be noticed, since the main process log stays empty. Both accept a sandbox store through STORE_ROOT / SMOKE_HOME. Verified on macOS arm64, including the packaged .app: the store is found, ten titles list, a sync installs three, and the window renders them as installed with their Play and Remove buttons. Linux and Windows are unproven, as they are for the CLI itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
189 lines
5.1 KiB
CSS
189 lines
5.1 KiB
CSS
/* One dark theme, no assets: the box art is the only image the app loads. */
|
|
:root {
|
|
--bg: #11151c;
|
|
--panel: #182029;
|
|
--panel-2: #1e2732;
|
|
--line: #2a3440;
|
|
--ink: #e8eef5;
|
|
--ink-dim: #93a4b8;
|
|
--accent: #37b98a;
|
|
--accent-ink: #05130d;
|
|
--warn: #e0a44a;
|
|
--radius: 12px;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* --- top bar ------------------------------------------------------------ */
|
|
.bar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
padding: 12px 18px;
|
|
background: var(--panel);
|
|
border-bottom: 1px solid var(--line);
|
|
flex: none;
|
|
}
|
|
.bar-title { display: flex; align-items: baseline; gap: 10px; font-weight: 700; }
|
|
.logo { color: var(--accent); font-size: 18px; }
|
|
.store-id {
|
|
font-weight: 500;
|
|
font-size: 12px;
|
|
color: var(--ink-dim);
|
|
border: 1px solid var(--line);
|
|
border-radius: 999px;
|
|
padding: 1px 8px;
|
|
}
|
|
.bar-actions { display: flex; align-items: center; gap: 8px; }
|
|
.progress { color: var(--ink-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
|
|
|
|
/* --- controls ----------------------------------------------------------- */
|
|
.btn {
|
|
font: inherit;
|
|
font-weight: 600;
|
|
color: var(--ink);
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
padding: 7px 14px;
|
|
cursor: pointer;
|
|
transition: background .15s, border-color .15s, transform .05s;
|
|
}
|
|
.btn:hover:not(:disabled) { background: #26313e; border-color: #3a4757; }
|
|
.btn:active:not(:disabled) { transform: scale(.97); }
|
|
.btn:disabled { opacity: .45; cursor: default; }
|
|
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
|
|
.btn-primary:hover:not(:disabled) { background: #45cd9b; }
|
|
.btn-ghost { background: transparent; color: var(--ink-dim); }
|
|
.btn-tiny { padding: 3px 9px; font-size: 12px; font-weight: 500; }
|
|
.select {
|
|
font: inherit;
|
|
color: var(--ink);
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
padding: 6px 8px;
|
|
}
|
|
.link { color: var(--accent); cursor: pointer; text-decoration: underline; }
|
|
|
|
/* --- gate (no python, or no store yet) ---------------------------------- */
|
|
.gate {
|
|
margin: auto;
|
|
max-width: 520px;
|
|
padding: 28px;
|
|
text-align: center;
|
|
}
|
|
.gate h1 { font-size: 20px; margin: 0 0 10px; }
|
|
.gate p { color: var(--ink-dim); white-space: pre-line; margin: 0 0 20px; word-break: break-all; }
|
|
.gate-actions { display: flex; gap: 14px; justify-content: center; align-items: center; }
|
|
|
|
/* --- the grid ----------------------------------------------------------- */
|
|
.grid {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
gap: 14px;
|
|
padding: 18px;
|
|
align-content: start;
|
|
}
|
|
.empty { margin: auto; color: var(--ink-dim); }
|
|
|
|
.card {
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.card.is-installed { border-color: #2f5a49; }
|
|
|
|
.art {
|
|
aspect-ratio: 4 / 3;
|
|
background: #0d1117;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
}
|
|
.art img { width: 100%; height: 100%; object-fit: cover; }
|
|
.art-glyph { font-size: 44px; font-weight: 700; color: #263341; }
|
|
|
|
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
|
|
.body h2 { font-size: 15px; margin: 0; }
|
|
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
.badge {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
border-radius: 999px;
|
|
padding: 2px 8px;
|
|
border: 1px solid var(--line);
|
|
color: var(--ink-dim);
|
|
}
|
|
.badge-app { color: var(--accent); border-color: #2f5a49; }
|
|
.badge-web { color: var(--warn); border-color: #5a4a2f; }
|
|
.version { font-size: 12px; color: var(--ink-dim); margin-left: auto; }
|
|
.desc {
|
|
margin: 0;
|
|
font-size: 12.5px;
|
|
color: var(--ink-dim);
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
.actions { display: flex; gap: 8px; margin-top: auto; }
|
|
|
|
/* --- log ---------------------------------------------------------------- */
|
|
.log {
|
|
flex: none;
|
|
background: var(--panel);
|
|
border-top: 1px solid var(--line);
|
|
padding: 8px 18px 10px;
|
|
}
|
|
.log-toggle {
|
|
font: inherit;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--ink-dim);
|
|
background: none;
|
|
border: 0;
|
|
padding: 0 0 4px;
|
|
cursor: pointer;
|
|
}
|
|
.log-lines {
|
|
max-height: 150px;
|
|
overflow-y: auto;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
font-size: 11.5px;
|
|
color: var(--ink-dim);
|
|
background: #0d1117;
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.log-line { white-space: pre-wrap; word-break: break-all; }
|
|
.log-paths { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
.paths-line {
|
|
font-size: 11.5px;
|
|
color: var(--ink-dim);
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
word-break: break-all;
|
|
flex: 1;
|
|
min-width: 200px;
|
|
}
|