feat: improve offline PWA resilience

This commit is contained in:
shuaiplus
2026-06-09 14:09:46 +08:00
parent 1a10df4a18
commit 615caf5946
23 changed files with 432 additions and 21 deletions
+12 -2
View File
@@ -451,7 +451,7 @@
}
.auth-card h1 {
@apply m-0 mb-1 text-center;
@apply m-0;
}
.standalone-eyebrow {
@@ -486,7 +486,17 @@
}
.standalone-title {
@apply m-0 mb-1 text-left text-3xl font-bold leading-tight tracking-normal;
@apply m-0 text-center text-3xl font-bold leading-tight tracking-normal;
}
.standalone-title-row {
@apply relative mb-1 flex min-h-9 items-center justify-center;
padding-inline: 84px;
}
.standalone-title-row > .network-status-badge {
@apply absolute right-0 top-1/2;
transform: translateY(-50%);
}
.standalone-muted {
+12
View File
@@ -54,6 +54,10 @@
@apply text-2xl;
}
.standalone-title-row {
padding-inline: 68px;
}
.standalone-footer {
@apply text-xs leading-[1.4];
}
@@ -128,6 +132,14 @@
@apply hidden;
}
.topbar-actions > .network-status-badge {
@apply h-8 px-2 text-[0];
}
.topbar-actions > .network-status-badge svg {
@apply m-0;
}
.mobile-sidebar-toggle,
.mobile-lock-btn {
@apply inline-flex h-9 w-9 min-w-9 justify-center gap-0 p-0 text-[0];
+25
View File
@@ -44,6 +44,31 @@
@apply flex items-center gap-2.5;
}
.network-status-badge {
@apply inline-flex h-[30px] shrink-0 select-none items-center gap-1.5 rounded-full border px-2.5 text-xs font-bold leading-none;
letter-spacing: 0;
}
.network-status-badge svg {
@apply shrink-0;
}
.network-status-badge.online {
background: color-mix(in srgb, var(--success) 10%, var(--panel));
border-color: color-mix(in srgb, var(--success) 36%, var(--line));
color: color-mix(in srgb, var(--success) 78%, var(--text));
}
.network-status-badge.offline {
background: color-mix(in srgb, var(--warning) 13%, var(--panel));
border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
color: color-mix(in srgb, var(--warning) 82%, var(--text));
}
.topbar-actions > .network-status-badge {
@apply h-[34px] px-3;
}
.mobile-tabbar {
@apply hidden;
}