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:
@@ -0,0 +1,20 @@
|
||||
using JobsMedical.Web.Services.Scraping;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace JobsMedical.Web.Pages;
|
||||
|
||||
public class DownloadModel : PageModel
|
||||
{
|
||||
private readonly SettingsService _settings;
|
||||
public DownloadModel(SettingsService settings) => _settings = settings;
|
||||
|
||||
public string? VapidPublicKey { get; private set; }
|
||||
public bool PushReady { get; private set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
var s = await _settings.GetAsync();
|
||||
VapidPublicKey = s.VapidPublicKey;
|
||||
PushReady = s.PushEnabled && !string.IsNullOrWhiteSpace(s.VapidPublicKey);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user