From 8c13021bfb44d3ee4a2fc7c9d82c33b5917ba858 Mon Sep 17 00:00:00 2001
From: Julien Froidefond
Date: Fri, 21 Feb 2025 09:31:23 +0100
Subject: [PATCH] feat: offline pages mode
---
public/offline.html | 16 +-
public/sw.js | 137 ++++++++----------
src/components/layout/ClientLayout.tsx | 14 +-
.../reader/components/Thumbnail.tsx | 2 +-
src/components/ui/NetworkStatus.tsx | 17 +++
src/components/ui/separator.tsx | 25 ----
src/hooks/useNetworkStatus.ts | 29 ++++
src/lib/registerSW.ts | 12 ++
8 files changed, 136 insertions(+), 116 deletions(-)
create mode 100644 src/components/ui/NetworkStatus.tsx
delete mode 100644 src/components/ui/separator.tsx
create mode 100644 src/hooks/useNetworkStatus.ts
create mode 100644 src/lib/registerSW.ts
diff --git a/public/offline.html b/public/offline.html
index 6de462a..315e2a7 100644
--- a/public/offline.html
+++ b/public/offline.html
@@ -34,6 +34,11 @@
color: #94a3b8;
margin-bottom: 2rem;
}
+ .buttons {
+ display: flex;
+ gap: 1rem;
+ justify-content: center;
+ }
button {
background-color: #4f46e5;
color: white;
@@ -47,6 +52,12 @@
button:hover {
background-color: #4338ca;
}
+ button.secondary {
+ background-color: #475569;
+ }
+ button.secondary:hover {
+ background-color: #334155;
+ }
@@ -56,7 +67,10 @@
Il semble que vous n'ayez pas de connexion internet. Certaines fonctionnalités de
StripStream peuvent ne pas être disponibles en mode hors ligne.
-
+
+
+
+