feat: add Progressive Web App (PWA) support with service worker registration, manifest, update notifications, and install prompts

This commit is contained in:
2026-03-24 23:55:15 -04:00
parent 611cd3ca02
commit f22a2abae8
25 changed files with 2522 additions and 1 deletions
+118
View File
@@ -4088,3 +4088,121 @@ body.popup-mode .content-area {
padding-left: 6px;
}
}
/* ===== PWA STYLES ===== */
/* PWA Update Notification */
.pwa-update-notification {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 10000;
animation: slideInUp 0.3s ease-out;
}
.pwa-update-content {
background: var(--accent);
color: white;
padding: 16px 20px;
border-radius: var(--radius);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
gap: 12px;
max-width: 400px;
}
.pwa-update-content span {
flex: 1;
font-size: 0.9rem;
font-weight: 500;
}
.pwa-update-btn {
background: white;
color: var(--accent);
border: none;
padding: 8px 16px;
border-radius: var(--radius);
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
}
.pwa-update-btn:hover {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.pwa-update-dismiss {
background: transparent;
border: none;
color: white;
font-size: 1.5rem;
line-height: 1;
cursor: pointer;
padding: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.8;
transition: opacity 0.2s ease;
}
.pwa-update-dismiss:hover {
opacity: 1;
}
/* PWA Install Button (optional - can be added to header) */
#pwa-install-btn {
display: none;
background: var(--accent);
color: white;
border: none;
padding: 8px 16px;
border-radius: var(--radius);
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
#pwa-install-btn:hover {
background: var(--accent-green);
transform: translateY(-1px);
}
/* Animations */
@keyframes slideInUp {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* Mobile responsive */
@media (max-width: 768px) {
.pwa-update-notification {
bottom: 10px;
right: 10px;
left: 10px;
}
.pwa-update-content {
padding: 12px 16px;
font-size: 0.85rem;
}
.pwa-update-btn {
padding: 6px 12px;
font-size: 0.8rem;
}
}