-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Colton Wolkins (Laptop) <colton@indicio.tech>
- Loading branch information
1 parent
cd74dcc
commit da5d0f2
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"short_name": "Wyvern", | ||
"name": "Wyvern: Where communities thrive~", | ||
"display": "standalone", | ||
"display_override": ["window-controls-overlay"], | ||
"theme_color": "#3367D6", | ||
"start_url": "/wyvern/", | ||
"icons": [ | ||
{ | ||
"src": "/pwa/icons-vector.svg", | ||
"type": "image/svg+xml", | ||
"sizes": "512x512" | ||
} | ||
], | ||
"id": "/wyvern/?source=pwa", | ||
"background_color": "#3367D6", | ||
"scope": "/wyvern/", | ||
"shortcuts": [ | ||
{ | ||
"name": "How's the weather today?", | ||
"short_name": "Today", | ||
"description": "View weather information for today", | ||
"url": "/wyvern/today?source=pwa", | ||
"icons": [{ "src": "/wyvern/images/today.png", "sizes": "192x192" }] | ||
}, | ||
{ | ||
"name": "How's the weather tomorrow?", | ||
"short_name": "Tomorrow", | ||
"description": "View weather information for tomorrow", | ||
"url": "/wyvern/tomorrow?source=pwa", | ||
"icons": [{ "src": "/wyvern/images/tomorrow.png", "sizes": "192x192" }] | ||
} | ||
], | ||
"description": "Weather forecast information" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Initialize deferredPrompt for use later to show browser install prompt. | ||
let deferredPrompt; | ||
|
||
window.addEventListener('beforeinstallprompt', (e) => { | ||
// Prevent the mini-infobar from appearing on mobile | ||
e.preventDefault(); | ||
// Stash the event so it can be triggered later. | ||
deferredPrompt = e; | ||
// Update UI notify the user they can install the PWA | ||
showInstallPromotion(); | ||
// Optionally, send analytics event that PWA install promo was shown. | ||
console.log(`'beforeinstallprompt' event was fired.`); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters