mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-31 02:29:18 +02:00
Fix PWA for non-root web roots
This commit is contained in:
parent
6615aea5dc
commit
d7aacb8b24
5 changed files with 76 additions and 10 deletions
server
|
@ -518,3 +518,22 @@ func (w *webPushSubscription) Context() log.Context {
|
|||
"web_push_subscription_endpoint": w.Endpoint,
|
||||
}
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/Manifest
|
||||
type webManifestResponse struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ShortName string `json:"short_name"`
|
||||
Scope string `json:"scope"`
|
||||
StartURL string `json:"start_url"`
|
||||
Display string `json:"display"`
|
||||
BackgroundColor string `json:"background_color"`
|
||||
ThemeColor string `json:"theme_color"`
|
||||
Icons []webManifestIcon `json:"icons"`
|
||||
}
|
||||
|
||||
type webManifestIcon struct {
|
||||
SRC string `json:"src"`
|
||||
Sizes string `json:"sizes"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue