mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-04 18:33:10 +02:00
cashu: hide navbar on welcome dialog (#1456)
This commit is contained in:
@@ -419,7 +419,7 @@ page_container %}
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- // BOTTOM BAR -->
|
<!-- // BOTTOM BAR -->
|
||||||
<div class="q-col-gutter">
|
<div class="q-col-gutter" v-if="!welcomeDialog.show">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
class="lt-md fixed-bottom q-px-none q-py-md left-0 right-0 bg-primary text-white shadow-2 z-top q-px-0"
|
class="lt-md fixed-bottom q-px-none q-py-md left-0 right-0 bg-primary text-white shadow-2 z-top q-px-0"
|
||||||
indicator-color="transparent"
|
indicator-color="transparent"
|
||||||
@@ -2475,6 +2475,19 @@ page_container %}
|
|||||||
},
|
},
|
||||||
|
|
||||||
////////////// UI HELPERS /////////////
|
////////////// UI HELPERS /////////////
|
||||||
|
registerPWAEventHook: function () {
|
||||||
|
// register event listener for PWA install prompt
|
||||||
|
window.addEventListener('beforeinstallprompt', e => {
|
||||||
|
// Prevent the mini-infobar from appearing on mobile
|
||||||
|
// e.preventDefault()
|
||||||
|
// Stash the event so it can be triggered later.
|
||||||
|
this.deferredPWAInstallPrompt = e
|
||||||
|
console.log(
|
||||||
|
`'beforeinstallprompt' event was fired.`,
|
||||||
|
this.getPWADisplayMode()
|
||||||
|
)
|
||||||
|
})
|
||||||
|
},
|
||||||
getPWADisplayMode: function () {
|
getPWADisplayMode: function () {
|
||||||
const isStandalone = window.matchMedia(
|
const isStandalone = window.matchMedia(
|
||||||
'(display-mode: standalone)'
|
'(display-mode: standalone)'
|
||||||
@@ -2779,20 +2792,11 @@ page_container %}
|
|||||||
this.activateMint(startupMintUrl)
|
this.activateMint(startupMintUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize deferredPWAInstallPrompt for use later to show browser install prompt.
|
// PWA install hook
|
||||||
this.showWelcomeDialog()
|
this.registerPWAEventHook()
|
||||||
|
|
||||||
// register event listener for PWA install prompt
|
// show welcome dialog
|
||||||
window.addEventListener('beforeinstallprompt', e => {
|
this.showWelcomeDialog()
|
||||||
// Prevent the mini-infobar from appearing on mobile
|
|
||||||
// e.preventDefault()
|
|
||||||
// Stash the event so it can be triggered later.
|
|
||||||
this.deferredPWAInstallPrompt = e
|
|
||||||
console.log(
|
|
||||||
`'beforeinstallprompt' event was fired.`,
|
|
||||||
this.getPWADisplayMode()
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user