mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-14 21:26:15 -08:00
fix(pwa): stay in server mode when a known server does not answer
A failed start-up probe used to fall back to browser mode, which showed an empty library while the backend restarted and let new playlists land in the browser. The browser now remembers the server; without an answer it starts in server mode, offline, and reloads once the server is back. Settings → Server shows the backend address instead of the page's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8714b3b445
commit
3bfd5394ef
13 files changed
+357
-69
No files matched your search
@@ -170,7 +170,7 @@ https://claude.ai/artifact/3WheJAgeNL5ag6kmtPrJcD
|
||||
|
||||
| Situation | Behavior |
|
||||
| --- | --- |
|
||||
| Probe fails or times out (2.5 s) | Browser mode, no server UI. |
|
||||
| Probe gets no answer (network error, 2.5 s timeout, 5xx) | Server mode, offline, if this browser used this backend before (`iptvnator-server:instance`); the page reloads once the server answers. Otherwise browser mode. An answer without server storage, or a 404, forgets the server. |
|
||||
| Request fails after boot | Status `offline`, banner, write failures show a snackbar; retry on `visibilitychange` and every 30 s. |
|
||||
| `401` | Status `unauthorized`, stored token cleared, redirect to sign-in. |
|
||||
| `413` | Snackbar names the limit. |
|
||||
|
||||
Reference in new issue
Block a user