Skip to content

Commit 38e8a1e

Browse files
feat: surface home launcher on the welcome page when installed
When /public/apps/home/ responds 2xx to a HEAD probe, welcome.html reveals two things: - A purple "🏠 Open home" CTA in the actions row (next to Sign in) - A "🏠 Home β€” your apps launcher" entry above Pilot in the Apps list Both stay hidden when home isn't installed, so the page looks identical to before for pods that haven't run `jspod install home` (or any bundle that includes home β€” which is all of them except media). Pairs with solid-apps/home, the macOS-style dock-of-installed-apps launcher.
1 parent 6be5da4 commit 38e8a1e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

β€Žwelcome.htmlβ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
.btn-primary:hover{background:#084e96}
2121
.btn-secondary{background:#fff;color:#222;border-color:#ddd}
2222
.btn-secondary:hover{background:#f0efeb}
23+
.btn-home{background:#7c4dff;color:#fff;font-weight:500}
24+
.btn-home:hover{background:#5a2be0;color:#fff}
2325
[hidden]{display:none!important}
2426
.signed-in-note{background:#e8f5e9;color:#1b5e20;padding:.6em 1em;border-radius:8px;margin:1em 0;font-size:.95em}
2527
.dirs{list-style:none;padding:0;margin:1em 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.5em}
@@ -36,6 +38,7 @@ <h1>Your Solid pod</h1>
3638
<p class="lede">Running at <a id="server-url" href="./">this server</a>.</p>
3739

3840
<div class="actions">
41+
<a href="./public/apps/home/" class="btn btn-home" id="open-home-btn" hidden>🏠 Open home</a>
3942
<a href="./signin.html" class="btn btn-primary" data-cond="login" hidden>Sign in</a>
4043
<a href="./account.html" class="btn btn-secondary">Account</a>
4144
<a href="./idp/register" class="btn btn-secondary" data-cond="register" hidden>Sign up</a>
@@ -61,6 +64,7 @@ <h1>Your Solid pod</h1>
6164

6265
<h2 style="margin:1.5em 0 .25em;font-weight:500;font-size:1.05em;color:#444">Apps</h2>
6366
<ul class="dirs">
67+
<li id="apps-home" hidden><a href="./public/apps/home/">🏠 Home β€” your apps launcher</a></li>
6468
<li><a href="./public/apps/pilot/">✈️ Pilot β€” Solid data browser</a></li>
6569
</ul>
6670

@@ -83,6 +87,17 @@ <h2 style="margin:1.5em 0 .25em;font-weight:500;font-size:1.05em;color:#444">App
8387
const signinBtn = document.querySelector('[data-cond="login"]');
8488
const signupBtn = document.querySelector('[data-cond="register"]');
8589

90+
// If `home` is installed on this pod, surface it: show the dedicated
91+
// CTA at the top and the launcher entry under Apps. Plain fetch is
92+
// fine since /public/apps/home/ is public-read by default.
93+
fetch('./public/apps/home/', { method: 'HEAD', cache: 'no-store' }).then((res) => {
94+
if (!res.ok) return;
95+
const tile = document.getElementById('apps-home');
96+
const btn = document.getElementById('open-home-btn');
97+
if (tile) tile.hidden = false;
98+
if (btn) btn.hidden = false;
99+
}).catch(() => {});
100+
86101
// Try to restore a prior session. The same "Missing refresh data"
87102
// catch as on the other pages: a clean first visit throws, we
88103
// treat that as "not signed in" and fall through to the unauth UI.

0 commit comments

Comments
Β (0)