diff --git a/app.vue b/app.vue index 37d51ef..fbc6d71 100644 --- a/app.vue +++ b/app.vue @@ -13,13 +13,13 @@ const categoriesStore = useCategoriesStore() const placeStore = useMyPlacesStore() const authStore = useAuthStore() const configStore = useMyConfigStore() -const userToken = ref('') +const token = useCookie('_auth') async function loadData() { const { data } = await useFetch('https://olcsoberauto.hu/rest/init', { headers: { - 'auth-key': userToken.value + 'auth-key': token.value } } ) @@ -43,15 +43,8 @@ async function loadData() { } } -nuxtApp.hooks.hook('app:created', async () => { - console.log('created') - // userToken.value = window.localStorage.getItem('userToken') - // await loadData() -}) - nuxtApp.hooks.hook('app:mounted', async () => { console.log('mounted...') - userToken.value = window.localStorage.getItem('userToken') await loadData() }) @@ -96,4 +89,10 @@ html { border-left: 4px; border-style: solid; } +.p-disabled, .p-component:disabled{ + opacity: 0.2; +} +pre{ + font-size: 13px; +} \ No newline at end of file diff --git a/components/RentStep.vue b/components/RentStep.vue new file mode 100644 index 0000000..a5a8ab1 --- /dev/null +++ b/components/RentStep.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/composables/localeDateString.ts b/composables/localeDateString.ts new file mode 100644 index 0000000..5bf88eb --- /dev/null +++ b/composables/localeDateString.ts @@ -0,0 +1,10 @@ +export const useLocaleDateString = (d:any) => { + let _d = d + if(typeof d === "string"){ + let _d = new Date(d) + } + if(typeof _d === 'object'){ + console.log(typeof _d) + return _d.toLocaleDateString() + } +} diff --git a/nuxt.config.ts b/nuxt.config.ts index 91713a6..e0fe03f 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -6,7 +6,7 @@ export default defineNuxtConfig({ host:'0.0.0.0' }, ssr:false, - modules: ["@primevue/nuxt-module", "@pinia/nuxt"], + modules: ["@primevue/nuxt-module", "@pinia/nuxt", "@nuxt/icon"], css: ['@/assets/styles/tailwind.css', '@/assets/styles/base.css', '@/assets/styles/fonts.css'], primevue: { options: { theme: 'none' ,pt:{ diff --git a/package.json b/package.json index 8332501..ff8e254 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "devDependencies": { "@iconify-json/ph": "^1.2.2", + "@nuxt/icon": "1.10.3", "@pinia/nuxt": "0.9.0", "@primevue/nuxt-module": "^4.2.5", "autoprefixer": "^10.4.20", diff --git a/pages/index.vue b/pages/index.vue index dcd6dc0..45bffb5 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,7 +1,9 @@