Changes
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
<script setup>
|
||||
import {setPageLayout} from "#app";
|
||||
import {useCapacitor} from "~/composables/useCapacitor.js";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth",
|
||||
layout: "default",
|
||||
})
|
||||
const route = useRoute()
|
||||
const dataStore = useDataStore()
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
const type = route.params.type
|
||||
const platform = useCapacitor().getIsPhone() ? "mobile" : "default"
|
||||
|
||||
|
||||
|
||||
const dataType = dataStore.dataTypes[route.params.type]
|
||||
|
||||
@@ -13,6 +23,11 @@ const items = ref([])
|
||||
const item = ref({})
|
||||
|
||||
const setupPage = async () => {
|
||||
|
||||
if(platform === "mobile") {
|
||||
setPageLayout("mobile")
|
||||
}
|
||||
|
||||
if(route.params.mode) mode.value = route.params.mode
|
||||
|
||||
if(mode.value === "show") {
|
||||
@@ -58,6 +73,7 @@ setupPage()
|
||||
v-else-if="loaded && mode === 'list'"
|
||||
:type="type"
|
||||
:items="items"
|
||||
:platform="platform"
|
||||
/>
|
||||
<UProgress
|
||||
v-else
|
||||
|
||||
Reference in New Issue
Block a user