Open source personal finance application
update layout to fix iPhone height
ilkomece595c095b31
diff --git a/components/layout/LayoutMobile.vue b/components/layout/LayoutMobile.vueindex 3637cfa0..21a04cbf 100644--- a/components/layout/LayoutMobile.vue+++ b/components/layout/LayoutMobile.vue@@ -930,6 +930,7 @@ export default {border-radius $m6.layoutMobile+ flex-grow 1display gridheight 100%padding-bottom 44pxdiff --git a/layouts/default.vue b/layouts/default.vueindex 0a103317..172b053b 100644--- a/layouts/default.vue+++ b/layouts/default.vue@@ -6,7 +6,7 @@ import isTouchDevice from '~/assets/js/isTouchDevice'export default {name: 'DefaultLayout',- setup (props, ctx) {+ setup () {const isShowUpdateApp = ref(false)onMounted(async () => {@@ -30,22 +30,17 @@ export default {}},- computed: {- layoutStyles () {- return { height: `${this.$store.state.ui.height}px` }- }- },-mounted () {- this.isTouchDevice = isTouchDevice()this.getPageDimensions()- window.addEventListener('resize', debounce(this.getPageDimensions, 600))+ this.isTouchDevice = isTouchDevice()+ window.addEventListener('resize', debounce(this.getPageDimensions, 300))},methods: {getPageDimensions () {const width = document.documentElement.clientWidthconst height = document.documentElement.clientHeight+ document.documentElement.style.setProperty('--height', height + 'px')this.$store.dispatch('ui/setAppDimensions', { width, height })}}@@ -53,9 +48,8 @@ export default {</script><template lang="pug">-.finapp(- :class="{ isNotTouchDevice: !isTouchDevice }"- :style="layoutStyles"+.layout(+ :class="{ isNotTouchDevice: !isTouchDevice, isTouchDevice: isTouchDevice }")//- Loadingtemplate(v-if="!$store.state.app.status.ready")@@ -85,6 +79,12 @@ export default {)</template>+<style lang="css">+:root {+ --height: 100vh+}+</style>+<style lang="stylus">@import '~assets/stylus/variables'@@ -95,13 +95,19 @@ export default {&:focusoutline 0+html+body+#__nuxt+#__layout+ height 100%+htmlfont-size 16px-// overscroll-behavior-y contain+ overscroll-behavior-y containbodyoverflow hidden- // overscroll-behavior-y contain+ overscroll-behavior-y containmargin 0color var(--c-font-2)font-primary()@@ -110,15 +116,13 @@ bodyletter-spacing 0background var(--color-bg-canvas)user-select none-</style>--<style lang="stylus" scoped>-@import '~assets/stylus/index'-.finapp+.layoutdisplay flex- flex-flow column- min-height 100vh+ height 100%min-width 320px- anim()++ &__wrap+ flex-grow 1+ position relative</style>diff --git a/pages/index.vue b/pages/index.vueindex d7c5d98d..65364d4f 100644--- a/pages/index.vue+++ b/pages/index.vue@@ -12,12 +12,7 @@ export default {</script><template lang="pug">-.layout(v-if="$store.getters['user/userUid']")+.layout__wrap(v-if="$store.getters['user/userUid']")LazyLayoutMobile(v-if="$store.state.ui.mobile")LazyLayoutPc(v-if="$store.state.ui.pc")</template>--<style lang="stylus" scoped>-.layout- height 100%-</style>