forked from retoor/devplacepy
feat: add push notification infrastructure with VAPID key generation and PWA manifest support
- Introduce push notification module with VAPID certificate generation, Web Push encryption, and subscription management - Add push registration table index and database schema for storing user subscriptions - Integrate push notification dispatch into existing notification creation flow via async background tasks - Include PWA manifest, service worker, and install prompt UI elements in base template - Register new push router and ensure certificate initialization on application startup - Add configuration variables for VAPID private/public key file paths and subscription contact email - Update JavaScript application entry point with PushManager and PwaInstaller modules - Extend top navigation bar with hidden install and push enable buttons for authenticated users
This commit is contained in:
@@ -24,6 +24,10 @@
|
||||
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💻</text></svg>">
|
||||
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="DevPlace">
|
||||
|
||||
<link rel="stylesheet" href="/static/css/variables.css">
|
||||
<link rel="stylesheet" href="/static/css/base.css">
|
||||
@@ -58,6 +62,12 @@
|
||||
</div>
|
||||
<div class="topnav-right">
|
||||
{% if user %}
|
||||
<button type="button" class="topnav-icon" data-pwa-install hidden title="Install DevPlace app" aria-label="Install DevPlace app">
|
||||
<span class="nav-bell">⬇️</span>
|
||||
</button>
|
||||
<button type="button" class="topnav-icon" data-push-enable hidden title="Enable push notifications" aria-label="Enable push notifications">
|
||||
<span class="nav-bell">🔕</span>
|
||||
</button>
|
||||
<a href="/notifications" class="topnav-icon">
|
||||
<span class="nav-bell">🔔</span>
|
||||
{% set unread_count = get_unread_count(user["uid"]) %}
|
||||
|
||||
Reference in New Issue
Block a user