From ec735c7a4e8dab8a6bc6276e86de78681f7f673d Mon Sep 17 00:00:00 2001 From: ervin Date: Thu, 2 Jan 2025 20:56:21 +0100 Subject: [PATCH] update --- app.vue | 17 +- components/RentStep.vue | 27 + composables/localeDateString.ts | 10 + nuxt.config.ts | 2 +- package.json | 1 + pages/index.vue | 66 +- pages/page/[id].vue | 4 +- pages/profile/index.vue | 37 +- pages/rent.vue | 5 +- pages/rent/category.vue | 31 +- pages/rent/date-to.vue | 61 + pages/rent/extra.vue | 83 +- pages/rent/index copy.vue | 25 - pages/rent/index.vue | 8 +- pages/rent/jaratszam.vue | 21 +- pages/rent/place-from.vue | 17 +- pages/rent/place-to.vue | 55 + pages/rent/preview.vue | 71 + pages/rent/profile.vue | 17 + pages/rent/thanks.vue | 23 + pnpm-lock.yaml | 7568 +++++++++++++++++-------------- stores/auth.ts | 4 +- 22 files changed, 4686 insertions(+), 3467 deletions(-) create mode 100644 components/RentStep.vue create mode 100644 composables/localeDateString.ts create mode 100644 pages/rent/date-to.vue delete mode 100644 pages/rent/index copy.vue create mode 100644 pages/rent/place-to.vue create mode 100644 pages/rent/preview.vue create mode 100644 pages/rent/profile.vue create mode 100644 pages/rent/thanks.vue 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 @@