Commit 26633de
authored
feat: lock auth-only tiles on the welcome page (no more blank 401s) (#12)
The welcome page links to /profile/, /public/, /private/, /inbox/,
/settings/ — but the last three require auth. Without a session
cookie, clicking those tiles previously dropped the user on a blank
401 (zero-byte body). Confusing.
On page load, each tile is HEAD-probed. On a 401/403 the tile is
dimmed (opacity .55, no hover-darken) and its href is rewritten to
./idp so a click routes the user to the sign-in flow instead of a
blank screen. After sign-in, refreshing the welcome page re-probes
and the tiles unlock automatically.
The probe runs alongside the existing Sign in / Sign up reveal
(same HEAD-probe pattern). No JSS change required.
Bumps jspod to 0.0.14.1 parent 8b5ab89 commit 26633de
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
72 | 89 | | |
73 | 90 | | |
74 | 91 | | |
0 commit comments