DEV: Sniff isPwa for capabilities (#15218)
This commit is contained in:
parent
f3d480dacb
commit
a7fdcb921a
|
@ -41,6 +41,10 @@ export default {
|
|||
caps.hasContactPicker =
|
||||
"contacts" in navigator && "ContactsManager" in window;
|
||||
caps.canVibrate = "vibrate" in navigator;
|
||||
caps.isPwa =
|
||||
window.matchMedia("(display-mode: standalone)").matches ||
|
||||
window.navigator.standalone ||
|
||||
document.referrer.includes("android-app://");
|
||||
|
||||
// Inject it
|
||||
app.register("capabilities:main", caps, { instantiate: false });
|
||||
|
|
Loading…
Reference in New Issue