update app menu
This commit is contained in:
parent
724550745a
commit
40f4da2386
@ -73,4 +73,7 @@
|
||||
1767339059- 0:21
|
||||
1767339386- 2:51
|
||||
1767340009- 87:57
|
||||
1767345728- 7:30
|
||||
1767345728- 93:01
|
||||
1767373107- 6:35
|
||||
1767376587- 12:56
|
||||
1767377746- 3:22
|
||||
|
||||
82
components/AppMenu.vue
Normal file
82
components/AppMenu.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div class="min-h-12 w-full z-10 top-0 fixed bg-neutral-800 flex justify-between items-center pe-2">
|
||||
<div v-if="isHome" @click="$router.push({ path: '/' })"
|
||||
class="bg-neutral-800 h-12 flex items-center shadow">
|
||||
<Logo dark class="h-8 mx-3" />
|
||||
</div>
|
||||
<div v-else class="text-sm opacity-80 h-12 flex items-center">
|
||||
<div class="ms-3 flex gap-2 items-center text-white" @click="$router.back()">
|
||||
<i class="pi pi-arrow-left text-red-500"></i> vissza
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="props.menu">
|
||||
<Drawer v-model:visible="menuShow" header=" " position="right" :pt="{ root: 'border-0' }">
|
||||
<template #header>
|
||||
<div class="flex flex-col">
|
||||
<div>{{ auth.user.nev }}</div>
|
||||
<div class="text-xs">{{ auth.user.email }}</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<div class="flex flex-col space-y-3 text-sm">
|
||||
<NuxtLink to="/profile">Adataim</NuxtLink>
|
||||
<Divider />
|
||||
<NuxtLink :to="'/page/' + p.id" v-for="p in config?.config.menu">{{ p.label }}</NuxtLink>
|
||||
<!-- <NuxtLink to="/page/72">GYIK</NuxtLink>
|
||||
<NuxtLink to="/page/66">Autóbérlés feltételei</NuxtLink>
|
||||
<NuxtLink to="/page/69">Általános Szerződési Feltételek</NuxtLink>
|
||||
<NuxtLink to="/page/68">Adatvédelmi nyilatkozat</NuxtLink>
|
||||
<NuxtLink to="/page/70">Lemondási és távolmaradási feltételek</NuxtLink>
|
||||
<NuxtLink to="/page/65">Elérhetőség</NuxtLink> -->
|
||||
<Divider />
|
||||
<NuxtLink @click="logOut()">Kijelentketés</NuxtLink>
|
||||
|
||||
</div>
|
||||
</Drawer>
|
||||
<Button variant="link" icon="pi pi-calendar" @click="$router.push({ path: '/' })"></Button>
|
||||
<Button variant="link" icon="pi pi-user" @click="$router.push({ path: '/profile' })"></Button>
|
||||
<Button variant="link" icon="pi pi-bars" @click="menuShow = true"></Button>
|
||||
</div>
|
||||
<div v-if="props.title">
|
||||
{{ props.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-12"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
home: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
menu: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const auth = useAuthStore()
|
||||
const config = useMyConfigStore()
|
||||
|
||||
const token = useCookie('_auth')
|
||||
const menuShow = ref()
|
||||
const router = useRouter()
|
||||
|
||||
const isHome = computed(()=>{
|
||||
return (route.fullPath === '/')
|
||||
})
|
||||
|
||||
function logOut(){
|
||||
token.value = null
|
||||
auth.user = null
|
||||
router.push({path:'/login'})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
||||
36
components/Logo.vue
Normal file
36
components/Logo.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 202.3 80.17">
|
||||
<g id="Réteg_2" data-name="Réteg 2">
|
||||
<g id="Réteg_3" data-name="Réteg 3">
|
||||
<path fill="#c7081c" d="M62.38,13.84c24.6,1.92,49.2,2.31,73.58,5.39l-.07,1c-10.16-.54-20.31-1.17-30.47-1.58-14.48-.59-29-.93-43.44-1.55-4-.18-9,.54-12.16,4.58h-4.4a23.91,23.91,0,0,1,3-3.71c-14.46.63-32.08,3-40.75,12.71L23.5,30.4c7.85-5.51,18.09-5.6,24.71,3.84l-3.92-.06c-6-6.45-12.38-5.89-17.31-2.45-2.46,1.72-3.48,2.45-3.48,2.45H0c.16-3.91,2.19-6.53,4.76-8.56,7.92-6.26,17.32-8.86,27-10.33,7.27-1.09,14.65-1.43,22-2.19a10.12,10.12,0,0,0,3.73-1A97.19,97.19,0,0,1,102.81,0c20.17-.48,39.6,3.43,58.55,9.73,10.49,3.48,21.86,8.84,32.13,13,.95.38-.29,1.21-1,.9A308.41,308.41,0,0,0,132,5.17C119,2.68,111,2.52,97.77,3,86.62,3.37,71.89,7.76,62.38,13.84Z"/>
|
||||
<path :fill="textColor" d="M4,42.91H7.72q3.62,0,7.5-.06l.11.12-.92,5L13.6,48l-.95-3.62H6.89v7.91h.8l2.79,0a.52.52,0,0,0,.5-.41l.54-2,1,0c0,1.44,0,2.52,0,3.23s0,1.76,0,3.18l-1,.08L11,54.2a.5.5,0,0,0-.46-.42l-2.83,0H6.89v5.11q0,1.64,0,3.24h5.95l1.88-3.91.91-.14-.36,5.57-.11.1q-3.7,0-7.21,0H4c-1.28,0-2.6,0-4,0L0,63l2-.55A.5.5,0,0,0,2.4,62c0-.4,0-.84,0-1.33s0-1,0-1.63V47.15c0-.5,0-.95,0-1.36s0-.78,0-1.11A.48.48,0,0,0,2,44.19l-2-.58,0-.76Q2.09,42.91,4,42.91Z"/>
|
||||
<path :fill="textColor" d="M21.76,42.85c1.38,0,2.91.06,4.58.06s3.26,0,4.59-.06l.07.76-1.93.55a.46.46,0,0,0-.39.44c0,.36,0,.74,0,1.16s0,.85,0,1.33v8.2q0,4.07,1.22,5.62a4.74,4.74,0,0,0,4,1.55,4.94,4.94,0,0,0,4-1.64q1.35-1.65,1.35-5.34V47.09c0-.48,0-.92,0-1.33s0-.8,0-1.16a.46.46,0,0,0-.39-.44l-1.84-.52,0-.79c1.32,0,2.47.06,3.43.06s2,0,3.36-.06l.07.76-2,.58a.48.48,0,0,0-.37.49c0,.33,0,.71,0,1.11s0,.86,0,1.36v7.56q0,5.11-2.11,7.34a8,8,0,0,1-6.12,2.23c-3.05,0-5.29-.71-6.74-2.12s-2.17-3.68-2.17-6.8V47.15c0-.5,0-.95,0-1.36s0-.78,0-1.11a.48.48,0,0,0-.36-.49l-2-.58Z"/>
|
||||
<path :fill="textColor" d="M56.48,59c0,.59,0,1.13,0,1.6s0,.9,0,1.28.13.52.34.58L58.4,63l.05.74c-1.1,0-2.47,0-4.1,0s-3.28,0-4.64,0L49.64,63l2-.55A.49.49,0,0,0,52,62c0-.4,0-.84,0-1.33s0-1,0-1.63V47.15c0-.5,0-.95,0-1.36s0-.78,0-1.11a.48.48,0,0,0-.35-.49l-2-.58,0-.76c1.39,0,2.81.06,4.27.06l1.14,0,1.67-.05,1.5,0,.94,0a10.45,10.45,0,0,1,5.74,1.28,4.22,4.22,0,0,1,1.91,3.74,5.32,5.32,0,0,1-1.17,3.58,7.46,7.46,0,0,1-3.43,2.09c.83,1.23,1.48,2.22,1.93,3S65,58,65.5,58.7s.87,1.39,1.24,2A8.7,8.7,0,0,0,67.79,62a5.41,5.41,0,0,0,.52.39,4.16,4.16,0,0,0,.51.28,4.77,4.77,0,0,0,.57.2l.68.16.06.75a23.68,23.68,0,0,1-3.34.21,7.64,7.64,0,0,1-2.08-.19,3.44,3.44,0,0,1-1.06-.55,5.93,5.93,0,0,1-1.25-1.4c-.38-.58-.79-1.23-1.22-2s-.86-1.49-1.31-2.31-.93-1.61-1.42-2.41l-.37-.56a1.45,1.45,0,0,0-.28-.34,1,1,0,0,0-.3-.16,1.3,1.3,0,0,0-.39-.07h-.63Zm0-6.27c.53,0,1,0,1.43,0A4,4,0,0,0,61,51.72a4.81,4.81,0,0,0,1-3.32,4.52,4.52,0,0,0-1-3.19,3.86,3.86,0,0,0-2.94-1l-.73,0-.89.09Z"/>
|
||||
<path :fill="textColor" d="M96.71,52.82a11.38,11.38,0,0,1-3,8.28q-3,3.13-8.45,3.13-5.18,0-8-2.89a10.73,10.73,0,0,1-2.83-7.84,10.89,10.89,0,0,1,3-8.15c2-2,4.85-3,8.44-3s6.12.93,8,2.8A10.28,10.28,0,0,1,96.71,52.82ZM79.39,53c0,3.17.53,5.6,1.61,7.28a5.22,5.22,0,0,0,4.71,2.53,5,5,0,0,0,4.53-2.29q1.47-2.3,1.47-7.21a13.46,13.46,0,0,0-1.55-7.09,5.25,5.25,0,0,0-4.79-2.48,5,5,0,0,0-4.56,2.3C79.86,47.59,79.39,49.9,79.39,53Z"/>
|
||||
<path :fill="textColor" d="M131.21,48.47l-.82.14-1.13-4.28a8.61,8.61,0,0,0-2.54-.37,5.92,5.92,0,0,0-5.09,2.47,10.67,10.67,0,0,0-1.8,6.45A10.17,10.17,0,0,0,122,59.66a7.24,7.24,0,0,0,5.88,2.53,12.74,12.74,0,0,0,4.42-.85l.2.85a11.71,11.71,0,0,1-6.73,2,10.75,10.75,0,0,1-7.86-2.94,10.29,10.29,0,0,1-3-7.72,10.33,10.33,0,0,1,3.29-8.08,12.31,12.31,0,0,1,8.58-3,25,25,0,0,1,5.36.61l.09.15Z"/>
|
||||
<path :fill="textColor" d="M143.11,57.07l-1.06,2.79c-.21.54-.37,1-.48,1.31a2.53,2.53,0,0,0-.18.77.53.53,0,0,0,.14.39.91.91,0,0,0,.42.2l1.42.42,0,.77c-1.44,0-2.61,0-3.51,0s-2,0-3.23,0L136.6,63l1.6-.48A1.46,1.46,0,0,0,139,62a6,6,0,0,0,.59-1.15L147,42.76l1.61-.24,6.42,18.09a4.85,4.85,0,0,0,.67,1.41,1.81,1.81,0,0,0,.87.53l1.46.43.05.74c-1.34,0-2.69,0-4.05,0-1.8,0-3.55,0-5.25,0l-.08-.74,1.47-.43a1.06,1.06,0,0,0,.44-.22.56.56,0,0,0,.13-.41,2.88,2.88,0,0,0-.15-.78c-.1-.32-.24-.74-.43-1.27l-1-2.8Zm3.21-8.54c-.18.52-.37,1-.58,1.61l-2,5.39h5l-1.83-5.38C146.65,49.59,146.48,49.05,146.32,48.53Z"/>
|
||||
<path :fill="textColor" d="M170,59v1.6c0,.47,0,.9,0,1.28s.12.52.34.58l1.55.51,0,.74c-1.1,0-2.47,0-4.09,0s-3.29,0-4.65,0l-.07-.74,2-.55a.5.5,0,0,0,.41-.46c0-.4,0-.84,0-1.33s0-1,0-1.63V47.15c0-.5,0-.95,0-1.36s0-.78,0-1.11a.48.48,0,0,0-.36-.49l-2-.58,0-.76c1.39,0,2.81.06,4.27.06l1.15,0,1.66-.05,1.5,0,.94,0a10.43,10.43,0,0,1,5.74,1.28,4.2,4.2,0,0,1,1.91,3.74,5.37,5.37,0,0,1-1.16,3.58,7.52,7.52,0,0,1-3.43,2.09c.83,1.23,1.47,2.22,1.92,3S178.52,58,179,58.7s.87,1.39,1.25,2A8.7,8.7,0,0,0,181.27,62a5.34,5.34,0,0,0,.51.39,4.16,4.16,0,0,0,.51.28,4.38,4.38,0,0,0,.58.2l.67.16.06.75a23.53,23.53,0,0,1-3.33.21,7.59,7.59,0,0,1-2.08-.19,3.44,3.44,0,0,1-1.06-.55,5.75,5.75,0,0,1-1.26-1.4c-.38-.58-.79-1.23-1.21-2s-.87-1.49-1.32-2.31-.92-1.61-1.42-2.41l-.36-.56a1.46,1.46,0,0,0-.29-.34.92.92,0,0,0-.29-.16,1.44,1.44,0,0,0-.4-.07H170Zm0-6.27c.52,0,1,0,1.42,0a4,4,0,0,0,3.1-1.07,4.81,4.81,0,0,0,1-3.32,4.52,4.52,0,0,0-.94-3.19,3.86,3.86,0,0,0-2.94-1l-.74,0-.88.09Z"/>
|
||||
<path :fill="textColor" d="M198.75,44.26a5.55,5.55,0,0,0-2.06-.37,4,4,0,0,0-2.67.92,3,3,0,0,0-1.1,2.38,2.92,2.92,0,0,0,.36,1.5,4,4,0,0,0,.95,1.12,7.4,7.4,0,0,0,1.36.88c.51.26,1,.51,1.59.77s1.21.61,1.83.95a8,8,0,0,1,1.65,1.22,5.4,5.4,0,0,1,1.18,1.69,5.52,5.52,0,0,1,.46,2.38A5.62,5.62,0,0,1,200,62.44a9.64,9.64,0,0,1-6,1.73,17,17,0,0,1-5.31-.85l-.09-.13.78-5.36.93-.15,1.11,4.56a5.79,5.79,0,0,0,2.38.49,4.62,4.62,0,0,0,3.05-1A3.17,3.17,0,0,0,198,59.2a3.08,3.08,0,0,0-.36-1.54,3.94,3.94,0,0,0-1-1.13,7.7,7.7,0,0,0-1.39-.89l-1.6-.77c-.61-.3-1.22-.61-1.82-.94a6.65,6.65,0,0,1-1.62-1.19,5.26,5.26,0,0,1-1.16-1.67,5.61,5.61,0,0,1-.45-2.36,5.4,5.4,0,0,1,2.17-4.52,8.91,8.91,0,0,1,5.64-1.69,21.38,21.38,0,0,1,5,.69l.09.13-.91,4.79-.82.14Z"/>
|
||||
<path :fill="textColor" d="M54.81,77.56v.8c0,.24,0,.45,0,.65a.29.29,0,0,0,.18.29l.77.25,0,.37-2,0-2.33,0,0-.37,1-.27a.25.25,0,0,0,.2-.24c0-.19,0-.42,0-.66V71c0-.21,0-.39,0-.56a.24.24,0,0,0-.17-.25l-1-.29,0-.38q1,0,2.13,0h.58l.83,0,.75,0h.47a5.19,5.19,0,0,1,2.87.64A2.11,2.11,0,0,1,60,72a2.64,2.64,0,0,1-.58,1.79,3.61,3.61,0,0,1-1.72,1.05c.42.61.74,1.11,1,1.49s.45.76.68,1.13.43.7.62,1a4.77,4.77,0,0,0,.52.67l.26.19a.94.94,0,0,0,.26.14l.28.11.34.07,0,.38a11.63,11.63,0,0,1-1.66.11,4,4,0,0,1-1-.1,1.83,1.83,0,0,1-.52-.27,3.07,3.07,0,0,1-.63-.7c-.19-.29-.4-.62-.61-1l-.66-1.15c-.22-.41-.46-.81-.71-1.21l-.18-.28a.9.9,0,0,0-.14-.17l-.15-.08a.56.56,0,0,0-.2,0h-.31Zm0-3.13c.26,0,.5,0,.71,0a2,2,0,0,0,1.55-.53,2.37,2.37,0,0,0,.49-1.66,2.32,2.32,0,0,0-.47-1.6,2,2,0,0,0-1.47-.5l-.37,0-.44,0Z"/>
|
||||
<path :fill="textColor" d="M65.33,69.51h1.88l3.75,0,.05.06L70.55,72l-.4.06-.48-1.81H66.8v4h1.79a.26.26,0,0,0,.25-.2l.27-1,.49,0c0,.72,0,1.25,0,1.61s0,.88,0,1.59l-.49,0-.28-1A.25.25,0,0,0,68.6,75H66.8v2.55c0,.55,0,1.09,0,1.62h3l.93-2,.46-.07L71,79.87l0,0-3.61,0h-2l-2,0,0-.37,1-.27a.27.27,0,0,0,.2-.24c0-.19,0-.42,0-.66V71c0-.21,0-.39,0-.56a.26.26,0,0,0-.18-.25l-1-.29,0-.38Z"/>
|
||||
<path :fill="textColor" d="M75.76,79a.25.25,0,0,0,.19.26l1,.26,0,.38-1.65,0-1.68,0,0-.37,1-.27a.26.26,0,0,0,.21-.24c0-.4,0-.89,0-1.48V71.63c0-.49,0-.9,0-1.23a.26.26,0,0,0-.18-.25l-1-.29,0-.38,1.6,0q.72,0,1.38,0l4.95,6.2.61.79c0-.34,0-.67,0-1V71.6c0-.48,0-.89,0-1.24a.23.23,0,0,0-.19-.22l-1-.26,0-.4,1.67,0,1.66,0,0,.38-1,.29a.26.26,0,0,0-.18.25c0,.33,0,.74,0,1.23V79.9L82.2,80l-5.87-7.34-.6-.8c0,.37,0,.71,0,1v4.71C75.75,78.15,75.75,78.63,75.76,79Z"/>
|
||||
<path :fill="textColor" d="M90.6,79.9l-2.5,0,0-.37,1.19-.33a.25.25,0,0,0,.19-.23c0-.38,0-.86,0-1.44V70.28H87.32l-.68,2-.42.07L86,69.54l0-.06,3.5,0h2.08l3.53,0,0,.06-.49,2.73-.42.06-.48-2H91.69v7.27c0,.58,0,1.06,0,1.44a.26.26,0,0,0,.21.23l1.16.33,0,.37Z"/>
|
||||
<path :fill="textColor" d="M103.67,76.6,103.15,78c-.11.27-.19.49-.25.66a1.43,1.43,0,0,0-.08.38.24.24,0,0,0,.07.19.42.42,0,0,0,.2.11l.72.21,0,.38-1.76,0-1.61,0,0-.37.8-.24a.71.71,0,0,0,.42-.27,4.14,4.14,0,0,0,.29-.57l3.71-9,.8-.12,3.21,9.05a2.36,2.36,0,0,0,.34.7.89.89,0,0,0,.43.27l.73.21,0,.37-2,0-2.63,0,0-.37.73-.21a.51.51,0,0,0,.22-.12.28.28,0,0,0,.07-.2,1.41,1.41,0,0,0-.08-.39l-.21-.63-.5-1.4Zm1.61-4.27c-.09.25-.18.52-.29.8l-1,2.69h2.49l-.92-2.68Z"/>
|
||||
<path :fill="textColor" d="M125.82,72.3l-.41.06-.57-2.13a4,4,0,0,0-1.27-.19A3,3,0,0,0,121,71.27a5.35,5.35,0,0,0-.9,3.23,5.13,5.13,0,0,0,1.06,3.39,3.63,3.63,0,0,0,2.95,1.27,6.31,6.31,0,0,0,2.21-.43l.09.43a5.86,5.86,0,0,1-3.36,1,5.37,5.37,0,0,1-3.93-1.47,5.14,5.14,0,0,1-1.5-3.86,5.19,5.19,0,0,1,1.64-4,6.18,6.18,0,0,1,4.3-1.49,11.84,11.84,0,0,1,2.67.31l0,.07Z"/>
|
||||
<path :fill="textColor" d="M131,76.6,130.47,78l-.24.66a1.18,1.18,0,0,0-.09.38.27.27,0,0,0,.07.19.52.52,0,0,0,.21.11l.71.21,0,.38-1.76,0-1.61,0,0-.37.8-.24A.71.71,0,0,0,129,79a3.17,3.17,0,0,0,.3-.57l3.71-9,.8-.12L137,78.37a2.4,2.4,0,0,0,.33.7,1,1,0,0,0,.44.27l.73.21,0,.37-2,0-2.63,0,0-.37.74-.21a.51.51,0,0,0,.22-.12.28.28,0,0,0,.06-.2,1.34,1.34,0,0,0-.07-.39c0-.16-.12-.37-.22-.63l-.49-1.4Zm1.61-4.27-.29.8-1,2.69h2.48l-.91-2.68C132.77,72.85,132.69,72.58,132.61,72.33Z"/>
|
||||
<path :fill="textColor" d="M143.66,77.56c0,.3,0,.57,0,.8s0,.45,0,.65a.27.27,0,0,0,.17.29l.77.25,0,.37-2.05,0-2.32,0,0-.37,1-.27a.27.27,0,0,0,.2-.24c0-.19,0-.42,0-.66V71c0-.21,0-.39,0-.56a.26.26,0,0,0-.18-.25l-1-.29,0-.38c.69,0,1.41,0,2.14,0H143l.83,0,.75,0H145a5.17,5.17,0,0,1,2.87.64,2.09,2.09,0,0,1,1,1.86,2.65,2.65,0,0,1-.59,1.79,3.62,3.62,0,0,1-1.71,1.05c.41.61.74,1.11,1,1.49s.45.76.68,1.13l.62,1a4.11,4.11,0,0,0,.53.67c.09.07.17.14.25.19a1.1,1.1,0,0,0,.26.14l.29.11.34.07,0,.38a11.89,11.89,0,0,1-1.67.11,4,4,0,0,1-1-.1,1.76,1.76,0,0,1-.53-.27,3.07,3.07,0,0,1-.63-.7c-.19-.29-.39-.62-.61-1s-.43-.75-.65-1.15-.47-.81-.71-1.21l-.19-.28a.49.49,0,0,0-.14-.17l-.15-.08a.54.54,0,0,0-.19,0h-.32Zm0-3.13c.27,0,.5,0,.72,0a2,2,0,0,0,1.55-.53,2.42,2.42,0,0,0,.49-1.66,2.27,2.27,0,0,0-.48-1.6,1.93,1.93,0,0,0-1.47-.5l-.36,0-.45,0Z"/>
|
||||
<path :fill="lineColor" d="M23.29,72.68H45.15V75H.24S16,72.68,23.29,72.68Z"/>
|
||||
<path :fill="lineColor" d="M179,72.68H157.15V75h44.91S186.26,72.68,179,72.68Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
dark?: boolean
|
||||
}>()
|
||||
|
||||
const textColor = computed(() => props.dark ? '#e0e0e0' : '#1a1a1a')
|
||||
const lineColor = computed(() => props.dark ? '#a5a5a5' : '#4a4a4a')
|
||||
</script>
|
||||
26
components/PullToRefresh.vue
Normal file
26
components/PullToRefresh.vue
Normal file
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div
|
||||
class="pull-indicator fixed left-1/2 -translate-x-1/2 z-50 transition-all duration-200"
|
||||
:style="{ top: `${Math.max(pullDistance - 40, -40)}px`, opacity: pullDistance / threshold }"
|
||||
>
|
||||
<div
|
||||
class="w-10 h-10 bg-white rounded-full shadow-lg flex items-center justify-center"
|
||||
:class="{ 'animate-spin': isRefreshing }"
|
||||
>
|
||||
<i
|
||||
class="pi text-neutral-600"
|
||||
:class="isRefreshing ? 'pi-spinner' : (pullDistance >= threshold ? 'pi-check' : 'pi-arrow-down')"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const emit = defineEmits<{
|
||||
refresh: []
|
||||
}>()
|
||||
|
||||
const { pullDistance, isRefreshing, threshold } = usePullToRefresh(async () => {
|
||||
emit('refresh')
|
||||
})
|
||||
</script>
|
||||
@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="flex gap-2 px-3 w-full justify-between">
|
||||
<div class="flex gap-2 p-3 w-full justify-between h-1 fixed bg-surface-50 dark:bg-surface-950 z-10 top-12">
|
||||
<div v-for="i in 8" :class="inidactorClass(i)" style="padding: 2px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-7"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
63
composables/usePullToRefresh.ts
Normal file
63
composables/usePullToRefresh.ts
Normal file
@ -0,0 +1,63 @@
|
||||
export function usePullToRefresh(onRefresh: () => Promise<void> | void) {
|
||||
const isPulling = ref(false)
|
||||
const pullDistance = ref(0)
|
||||
const isRefreshing = ref(false)
|
||||
|
||||
const threshold = 80
|
||||
let startY = 0
|
||||
let currentY = 0
|
||||
|
||||
const onTouchStart = (e: TouchEvent) => {
|
||||
if (window.scrollY === 0) {
|
||||
startY = e.touches[0].clientY
|
||||
isPulling.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const onTouchMove = (e: TouchEvent) => {
|
||||
if (!isPulling.value || isRefreshing.value) return
|
||||
|
||||
currentY = e.touches[0].clientY
|
||||
const diff = currentY - startY
|
||||
|
||||
if (diff > 0 && window.scrollY === 0) {
|
||||
pullDistance.value = Math.min(diff * 0.5, threshold * 1.5)
|
||||
if (diff > 10) {
|
||||
e.preventDefault()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const onTouchEnd = async () => {
|
||||
if (!isPulling.value) return
|
||||
|
||||
if (pullDistance.value >= threshold && !isRefreshing.value) {
|
||||
isRefreshing.value = true
|
||||
await onRefresh()
|
||||
isRefreshing.value = false
|
||||
}
|
||||
|
||||
isPulling.value = false
|
||||
pullDistance.value = 0
|
||||
startY = 0
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('touchstart', onTouchStart, { passive: true })
|
||||
document.addEventListener('touchmove', onTouchMove, { passive: false })
|
||||
document.addEventListener('touchend', onTouchEnd)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('touchstart', onTouchStart)
|
||||
document.removeEventListener('touchmove', onTouchMove)
|
||||
document.removeEventListener('touchend', onTouchEnd)
|
||||
})
|
||||
|
||||
return {
|
||||
isPulling,
|
||||
pullDistance,
|
||||
isRefreshing,
|
||||
threshold
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"name": "eurocars-rent",
|
||||
"type": "module",
|
||||
"version": "1.0.4",
|
||||
"versionCode": 4,
|
||||
"version": "1.0.5",
|
||||
"versionCode": 5,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
<script setup>
|
||||
const auth = useAuthStore()
|
||||
const config = useMyConfigStore()
|
||||
const token = useCookie('_auth')
|
||||
const menuShow = ref()
|
||||
const router = useRouter()
|
||||
const user = computed(() => {
|
||||
return auth.user
|
||||
})
|
||||
|
||||
const rentals = computed(() => {
|
||||
return auth.rentals
|
||||
@ -34,47 +28,9 @@ function getMont(date) {
|
||||
|
||||
}
|
||||
|
||||
function logOut(){
|
||||
token.value = null
|
||||
auth.user = null
|
||||
router.push({path:'/login'})
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="min-h-12 bg-neutral-800 flex justify-between items-center pe-2">
|
||||
<div @click="$router.push({ path: '/' })"
|
||||
class="bg-neutral-800 h-12 flex items-center shadow-lg bg-gradient-to-r from-neutral-800 dark:from-neutral-900 to-transparent">
|
||||
<img src="/euro_cars_rent_a_car_logo.svg" class="h-8 mx-3" />
|
||||
</div>
|
||||
<div>
|
||||
<Drawer v-model:visible="menuShow" header=" " position="right" :pt="{ root: 'border-0' }">
|
||||
<template #header>
|
||||
<div class="flex flex-col">
|
||||
<div>{{ auth.user.nev }}</div>
|
||||
<div class="text-xs">{{ auth.user.email }}</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<div class="flex flex-col space-y-3 text-sm">
|
||||
<NuxtLink to="/profile">Adataim</NuxtLink>
|
||||
<Divider />
|
||||
<NuxtLink :to="'/page/'+p.id" v-for="p in config?.config.menu">{{ p.label }}</NuxtLink>
|
||||
<!-- <NuxtLink to="/page/72">GYIK</NuxtLink>
|
||||
<NuxtLink to="/page/66">Autóbérlés feltételei</NuxtLink>
|
||||
<NuxtLink to="/page/69">Általános Szerződési Feltételek</NuxtLink>
|
||||
<NuxtLink to="/page/68">Adatvédelmi nyilatkozat</NuxtLink>
|
||||
<NuxtLink to="/page/70">Lemondási és távolmaradási feltételek</NuxtLink>
|
||||
<NuxtLink to="/page/65">Elérhetőség</NuxtLink> -->
|
||||
<Divider />
|
||||
<NuxtLink @click="logOut()">Kijelentketés</NuxtLink>
|
||||
|
||||
</div>
|
||||
</Drawer>
|
||||
<Button variant="link" icon="pi pi-user" @click="$router.push({ path: '/profile' })"></Button>
|
||||
<Button variant="link" icon="pi pi-bars" @click="menuShow = true"></Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AppMenu />
|
||||
<div v-if="!rentals">
|
||||
<div class="p-3 text-center">
|
||||
<div class="py-5">
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
<div class="min-h-dvh px-5 pb-5">
|
||||
<div class="flex flex-col gap-3 items-center justify-center text-center">
|
||||
<div @click="$router.push({path:'/'})"
|
||||
class="w-48 bg-neutral-600 p-5 flex items-end rounded-ee-xl rounded-es-xl shadow-lg bg-gradient-to-b from-neutral-300 dark:from-black to-transparent">
|
||||
<img src="/euro_cars_rent_a_car_logo.svg" class="w-full" />
|
||||
class="w-48 p-5 flex items-end">
|
||||
<img src="/public/euro_cars_rent_a_car_logo.svg" class="w-full" />
|
||||
</div>
|
||||
<NuxtPage />
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</Card>
|
||||
{{ token }}
|
||||
<div class="text-center text-xs mt-5" v-if="configStore?.config">
|
||||
<NuxtLink :to="'/page/' + configStore?.config?.adatvedelem_id">Adatvédelmi nyilatkozat</NuxtLink>
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<AppMenu />
|
||||
<div class="flex items-center border-b mb-3 border-primary">
|
||||
<Button icon="pi pi-arrow-left" variant="link" @click="$router.go(-1)"></Button>
|
||||
<h1>{{ Title }}</h1>
|
||||
<h1 class="text-center w-full py-2">{{ Title }}</h1>
|
||||
<Skeleton width="85%" v-if="isLoading"></Skeleton>
|
||||
</div>
|
||||
<div class="p-3">
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="flex justify-between items-center">
|
||||
<Button @click="$router.back()" link icon="pi pi-arrow-left"></Button>
|
||||
<div class="px-3">Adataim</div>
|
||||
<AppMenu />
|
||||
<div class="flex justify-center items-center border-b mb-3 border-primary">
|
||||
<div class="py-3 text-center">Adataim</div>
|
||||
</div>
|
||||
<div class="p-3 space-y-3">
|
||||
<PageLoading v-if="isLoading" />
|
||||
@ -83,9 +82,8 @@
|
||||
<div class="">
|
||||
<Button @click="save()" class="w-full min-w-20" icon="pi pi-save">Adatok mentése</Button>
|
||||
</div>
|
||||
<pre>{{ rent }}</pre>
|
||||
<div class="pt-6 border-t border-surface-200 dark:border-surface-700">
|
||||
<Button @click="logout()" severity="danger" class="w-full" icon="pi pi-sign-out">Kijelentkezés</Button>
|
||||
<div class="pt-6">
|
||||
<Button @click="logout()" severity="danger" variant="link" class="w-full" icon="pi pi-sign-out">Kijelentkezés</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,24 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<AppMenu />
|
||||
<!-- <div class="flex justify-between items-center h-16">
|
||||
<Button @click="$router.back()" link icon="pi pi-arrow-left" v-if="$route.meta?.rentStep < 8"></Button>
|
||||
<div class="px-3">{{ $route?.meta?.title }}</div>
|
||||
</div>
|
||||
<RentStep v-if="$route.meta?.rentStep < 8"/>
|
||||
<!-- <Stepper value="1" linear>
|
||||
</div> -->
|
||||
<div class="">
|
||||
<RentStep v-if="$route.meta?.rentStep < 8" />
|
||||
<!-- <Stepper value="1" linear>
|
||||
<StepList>
|
||||
<Step value="1">Autófelvétel</Step>
|
||||
<Step value="2"></Step>
|
||||
<Step value="3"></Step>
|
||||
</StepList>
|
||||
</Stepper> -->
|
||||
<NuxtPage />
|
||||
<!-- <pre>{{ rent }}</pre> -->
|
||||
<NuxtPage />
|
||||
<!-- <pre>{{ rent }}</pre> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const {rent} = useAuthStore()
|
||||
const { rent } = useAuthStore()
|
||||
|
||||
const prevPage = ref()
|
||||
definePageMeta({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="text-center">Kategória</div>
|
||||
<div class="flex flex-col gap-3 p-3">
|
||||
<Card v-for="categori in categories" :pt="{ root: '' }" @click="next(categori)">
|
||||
<template #content>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-center">Autóbérlés vége</div>
|
||||
<div class="flex flex-col p-3">
|
||||
|
||||
<DatePicker inline :min-date="minDate" v-model="selectedDate" />
|
||||
</div>
|
||||
|
||||
@ -10,13 +10,14 @@
|
||||
<Dropdown :options="timeList" v-model="rent.auto_leadas_idopont" />
|
||||
</div>
|
||||
<div class="p-3">
|
||||
<Button @click="next()" class="max-sm:w-full min-w-20" v-if="rent.auto_leadas_datum && rent.auto_leadas_idopont">Tovább</Button>
|
||||
<Button @click="next()" class="max-sm:w-full min-w-20"
|
||||
v-if="rent.auto_leadas_datum && rent.auto_leadas_idopont">Tovább</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const {rent} = storeToRefs(useAuthStore())
|
||||
const { rent } = storeToRefs(useAuthStore())
|
||||
definePageMeta({
|
||||
rentStep: 3,
|
||||
title: 'Autóbérlés vége'
|
||||
@ -56,19 +57,19 @@ const rentDays = computed(() => {
|
||||
// Átváltás napokba (egy nap 86400000 millimásodperc)
|
||||
const napok = Math.floor(kulonbsegMs / 86400000);
|
||||
|
||||
return napok+1;
|
||||
return napok + 1;
|
||||
})
|
||||
const timeList = computed(() => {
|
||||
let a = []
|
||||
for (let i = 0; i < 24; i++) {
|
||||
if(rent.value.auto_leadas_datum == rent.value.auto_felvetel_datum){
|
||||
if(rent.value.auto_felvetel_idopont < i + ':00'){
|
||||
if (rent.value.auto_leadas_datum == rent.value.auto_felvetel_datum) {
|
||||
if (rent.value.auto_felvetel_idopont < i + ':00') {
|
||||
a.push(i + ':00')
|
||||
}
|
||||
if(rent.value.auto_felvetel_idopont < i + ':30'){
|
||||
if (rent.value.auto_felvetel_idopont < i + ':30') {
|
||||
a.push(i + ':30')
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
a.push(i + ':00')
|
||||
a.push(i + ':30')
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-center">Autóbérlés kezdete</div>
|
||||
<div class="flex flex-col p-3">
|
||||
<DatePicker inline :min-date="(new Date())" v-model="selectedDate"/>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-center">Autófelvétel helye</div>
|
||||
<div class="flex flex-col gap-3 p-3">
|
||||
<Card v-for="place in places" :pt="{ root: (rent.auto_felvetel_hely == place) ? 'bg-primary-500 text-white mb-3' : 'mb-3' }">
|
||||
<template #content>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-center">Autóleadás helye</div>
|
||||
<div class="flex flex-col gap-3 p-3">
|
||||
<Card v-for="place in places"
|
||||
:pt="{ root: (rent.auto_leadas_hely == place) ? 'bg-primary-500 text-white mb-3' : 'mb-3' }">
|
||||
|
||||
@ -55,10 +55,6 @@
|
||||
<Button @click="sendRent()" class="w-full" :disabled="isValid">Foglalás
|
||||
elküldése</Button>
|
||||
</div>
|
||||
<DevOnly>
|
||||
<pre>{{ rent }}</pre>
|
||||
<pre>{{ user }}</pre>
|
||||
</DevOnly>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -62,15 +62,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
||||
const setupStatusBar = async (isDark: boolean) => {
|
||||
try {
|
||||
if (Capacitor.getPlatform() === 'android') {
|
||||
if (isDark) {
|
||||
// Dark mode: sötét háttér, világos ikonok
|
||||
await StatusBar.setBackgroundColor({ color: '#0a0a0a' }) // surface-950
|
||||
await StatusBar.setBackgroundColor({ color: '#262626' }) // surface-950
|
||||
await StatusBar.setStyle({ style: Style.Dark }) // világos ikonok
|
||||
} else {
|
||||
// Light mode: világos háttér, sötét ikonok
|
||||
await StatusBar.setBackgroundColor({ color: '#fafafa' }) // surface-50
|
||||
await StatusBar.setStyle({ style: Style.Light }) // sötét ikonok
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('StatusBar setup error:', e)
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 10 KiB |
16
public/euro_cars_rent_a_car_logo_light.svg
Normal file
16
public/euro_cars_rent_a_car_logo_light.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 9.9 KiB |
Loading…
Reference in New Issue
Block a user