feat: phase 5 distribution — tauri shell, pwa, desktop release artifacts

- apps/desktop: Tauri 2 thin shell; connect screen stores the deployment
  URL, webview renders the remote console, tray with Show/Change Server/
  Quit, close-to-tray, single-instance
- frontend: vite-plugin-pwa generates manifest + Workbox SW (shell
  precache, /api /auth /mailpit NetworkOnly), install banner on
  beforeinstallprompt, rasterized PWA icons
- release.yml: desktop bundle matrix (linux/macos/windows) attached to
  GitHub Releases
- workspace 0.5.0; Dockerfiles copy the desktop workspace manifest

Authored By: TDvorak <[email protected]>
This commit is contained in:
Tomas Dvorak committed 2026-09-16 19:59:53 +02:00
1 parent 23186e38b8
commit deb56d9a23
55 files changed
+9657 -155

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="14" fill="#f4693a"/>
<g fill="#ffffff">
<rect x="15" y="14" width="34" height="10" rx="5"/>
<rect x="15" y="27" width="23" height="10" rx="5" opacity="0.7"/>
<rect x="15" y="40" width="10" height="10" rx="5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 334 B

+84
View File
@@ -0,0 +1,84 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="dark" />
<title>Primora</title>
<link rel="icon" type="image/svg+xml" href="icon.svg" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="card">
<img src="icon.svg" class="logo" alt="" />
<h1>Primora</h1>
<p class="sub">Connect to your self-hosted deployment.</p>
<form id="form">
<input
id="url"
type="text"
inputmode="url"
placeholder="https://primora.example.com"
autocomplete="off"
spellcheck="false"
autofocus
/>
<button type="submit" id="go">Connect</button>
</form>
<p id="err" class="err" hidden></p>
<p class="hint">The desktop app renders the console served by your own server. Nothing is hosted by us.</p>
</main>
<script type="module">
const tauri = window.__TAURI__;
const form = document.getElementById("form");
const input = document.getElementById("url");
const button = document.getElementById("go");
const err = document.getElementById("err");
const fail = (msg) => {
err.textContent = msg;
err.hidden = false;
button.disabled = false;
button.textContent = "Connect";
};
if (!tauri) {
fail("This page is meant to run inside the Primora desktop app.");
} else {
// A saved deployment URL means "skip the form" on every launch.
const saved = await tauri.core.invoke("get_server_url").catch(() => null);
if (saved) location.replace(saved);
}
form.addEventListener("submit", async (event) => {
event.preventDefault();
err.hidden = true;
button.disabled = true;
button.textContent = "Checking…";
let url = input.value.trim();
if (!/^https?:\/\//i.test(url)) url = `https://${url}`;
try {
await tauri.core.invoke("set_server_url", { url });
} catch (e) {
fail(String(e));
return;
}
// Reachability probe — opaque (no-cors), so it proves the host answers,
// not that it is a Primora deployment. A wrong-but-alive URL is recoverable
// via the tray menu's "Change server".
try {
await fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(8000) });
} catch {
fail("Server did not respond. Check the URL and that the deployment is up.");
return;
}
location.replace(url);
});
</script>
</body>
</html>
+101
View File
@@ -0,0 +1,101 @@
* {
margin: 0;
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
display: grid;
place-items: center;
background: #0b0d11;
color: #e7e7ea;
font-family:
system-ui,
-apple-system,
"Segoe UI",
Roboto,
sans-serif;
-webkit-font-smoothing: antialiased;
}
.card {
width: min(24rem, calc(100vw - 3rem));
padding: 2.5rem 2rem;
background: #14161b;
border: 1px solid #26292f;
border-radius: 14px;
text-align: center;
}
.logo {
width: 56px;
height: 56px;
border-radius: 12px;
margin-bottom: 1rem;
}
h1 {
font-size: 1.4rem;
font-weight: 600;
letter-spacing: -0.01em;
}
.sub {
margin-top: 0.4rem;
color: #9a9aa3;
font-size: 0.9rem;
}
form {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-top: 1.75rem;
}
input {
padding: 0.65rem 0.8rem;
background: #0b0d11;
border: 1px solid #2e3239;
border-radius: 8px;
color: inherit;
font-size: 0.95rem;
outline: none;
}
input:focus {
border-color: #f4693a;
}
button {
padding: 0.65rem 0.8rem;
background: #f4693a;
border: none;
border-radius: 8px;
color: #fff;
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
}
button:disabled {
opacity: 0.6;
cursor: default;
}
.err {
margin-top: 0.9rem;
color: #ef6b6b;
font-size: 0.85rem;
}
.hint {
margin-top: 1.5rem;
color: #6d6d76;
font-size: 0.78rem;
line-height: 1.5;
}