banner to download android app
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -24,6 +24,9 @@
|
||||
<div id="content" :class="{ 'nav-hidden': !navShown, 'sidebar-hidden': !sidebarRouterView }">
|
||||
<AppNavigation />
|
||||
<div id="app-content">
|
||||
<div v-if="isAndroid">
|
||||
{{ t('deck', 'There is an Android App available, please consider downloading it') }}
|
||||
</div>
|
||||
<router-view />
|
||||
</div>
|
||||
<router-view name="sidebar" />
|
||||
@@ -76,6 +79,13 @@ export default {
|
||||
sidebarShown() {
|
||||
return this.sidebarRouterView || this.sidebarShownState
|
||||
},
|
||||
isAndroid() {
|
||||
const userAgent = navigator.userAgent || navigator.vendor || window.opera
|
||||
if (/android/i.test(userAgent)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
},
|
||||
provide: function() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user