🎨 (App) fullheight
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app" class="app">
|
<div id="app" class="app">
|
||||||
<pwa-install></pwa-install>
|
|
||||||
<nav
|
<nav
|
||||||
class="nav navbar is-fixed-top is-primary"
|
class="nav navbar is-fixed-top is-primary"
|
||||||
role="navigation"
|
role="navigation"
|
||||||
@@ -75,15 +74,13 @@ import { Action, Getter } from 'vuex-class'
|
|||||||
import IUser from '@/models/IUser'
|
import IUser from '@/models/IUser'
|
||||||
import { COFFEE_LINK } from '@/utils/constants'
|
import { COFFEE_LINK } from '@/utils/constants'
|
||||||
import OnlineView from '@/components/OnlineView.vue'
|
import OnlineView from '@/components/OnlineView.vue'
|
||||||
import InstallApp from './components/InstallApp.vue'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
directives: {
|
directives: {
|
||||||
ClickOutside
|
ClickOutside
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'online-view': OnlineView,
|
'online-view': OnlineView
|
||||||
'install-app': InstallApp
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export default class App extends Vue {
|
export default class App extends Vue {
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
<template>
|
|
||||||
<span class="install-app navbar-item" v-if="showInstall">
|
|
||||||
<span @click="prompt" class="install-button">installer</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { Component, Vue } from 'vue-property-decorator'
|
|
||||||
import accountService from '@/services/AccountService'
|
|
||||||
|
|
||||||
@Component
|
|
||||||
export default class InstallApp extends Vue {
|
|
||||||
private showInstall: boolean = false
|
|
||||||
public mounted(): void {
|
|
||||||
window.addEventListener('beforeinstallprompt', async () => {
|
|
||||||
const accounts = await accountService.getAll(true)
|
|
||||||
this.showInstall = accounts.length > 0
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
public prompt(): void {
|
|
||||||
const pwaInstall = document.querySelector('pwa-install') as any
|
|
||||||
if (pwaInstall) {
|
|
||||||
pwaInstall.openPrompt()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
span.install-button {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
span.install-button:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -18,6 +18,7 @@ html {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
height: calc(100vh - 54px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.app {
|
.app {
|
||||||
|
|||||||
Reference in New Issue
Block a user