Fixed Layout Issues
This commit is contained in:
@@ -2,9 +2,7 @@
|
|||||||
import {setPageLayout} from "#app";
|
import {setPageLayout} from "#app";
|
||||||
import {useCapacitor} from "~/composables/useCapacitor.js";
|
import {useCapacitor} from "~/composables/useCapacitor.js";
|
||||||
|
|
||||||
definePageMeta({
|
|
||||||
layout: "default",
|
|
||||||
})
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const api = useNuxtApp().$api
|
const api = useNuxtApp().$api
|
||||||
@@ -12,7 +10,6 @@ const api = useNuxtApp().$api
|
|||||||
|
|
||||||
const type = route.params.type
|
const type = route.params.type
|
||||||
const platform = await useCapacitor().getIsPhone() ? "mobile" : "default"
|
const platform = await useCapacitor().getIsPhone() ? "mobile" : "default"
|
||||||
console.log(platform)
|
|
||||||
|
|
||||||
|
|
||||||
const dataType = dataStore.dataTypes[route.params.type]
|
const dataType = dataStore.dataTypes[route.params.type]
|
||||||
@@ -25,10 +22,9 @@ const item = ref({})
|
|||||||
|
|
||||||
const setupPage = async (sort_column = null, sort_direction = null) => {
|
const setupPage = async (sort_column = null, sort_direction = null) => {
|
||||||
loaded.value = false
|
loaded.value = false
|
||||||
|
setPageLayout(platform)
|
||||||
|
|
||||||
|
|
||||||
if (await useCapacitor().getIsPhone()) {
|
|
||||||
setPageLayout("mobile")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (route.params.mode) mode.value = route.params.mode
|
if (route.params.mode) mode.value = route.params.mode
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user