PWA: installable app (web/win/android/ios) + download/help page + push notifications
- manifest.webmanifest + service worker (offline shell + push + notificationclick) + PNG icons (192/512/apple) + iOS meta + SW registration → installable everywhere - /Download page: per-OS install help (web/windows/android/ios), install button (beforeinstallprompt), 'enable notifications' flow, usage guide, Bazaar/TWA note; nav + footer links - Web Push foundation: WebPushSubscription entity + /push/subscribe (stores), VAPID + push settings in /Admin/Settings, on-device local notification; server broadcast documented (WebPush via Nexus) - docs/PWA-TWA.md: VAPID keygen, server-push wiring, Bubblewrap→Cafe Bazaar + assetlinks steps - Verified: manifest/sw/icons served, download page, subscribe stores (200), layout wired Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,10 @@ public class SettingsModel : PageModel
|
||||
[BindProperty] public string? SmsTemplate { get; set; }
|
||||
[BindProperty] public string? SmsSender { get; set; }
|
||||
[BindProperty] public string? NeshanMapKey { get; set; }
|
||||
[BindProperty] public bool PushEnabled { get; set; }
|
||||
[BindProperty] public string? VapidPublicKey { get; set; }
|
||||
[BindProperty] public string? VapidPrivateKey { get; set; }
|
||||
[BindProperty] public string? VapidSubject { get; set; }
|
||||
[TempData] public string? Saved { get; set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
@@ -66,6 +70,10 @@ public class SettingsModel : PageModel
|
||||
SmsTemplate = s.SmsTemplate;
|
||||
SmsSender = s.SmsSender;
|
||||
NeshanMapKey = s.NeshanMapKey;
|
||||
PushEnabled = s.PushEnabled;
|
||||
VapidPublicKey = s.VapidPublicKey;
|
||||
VapidPrivateKey = s.VapidPrivateKey;
|
||||
VapidSubject = s.VapidSubject;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync()
|
||||
@@ -96,6 +104,10 @@ public class SettingsModel : PageModel
|
||||
SmsTemplate = SmsTemplate,
|
||||
SmsSender = SmsSender,
|
||||
NeshanMapKey = NeshanMapKey,
|
||||
PushEnabled = PushEnabled,
|
||||
VapidPublicKey = VapidPublicKey,
|
||||
VapidPrivateKey = VapidPrivateKey,
|
||||
VapidSubject = VapidSubject,
|
||||
});
|
||||
Saved = "تنظیمات ذخیره شد.";
|
||||
return RedirectToPage();
|
||||
|
||||
Reference in New Issue
Block a user