Pannello Utente
Aggiornamento Yarn
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
defineComponent, onMounted, ref,
|
||||
} from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
// PropType,
|
||||
|
||||
@@ -18,6 +19,8 @@ export default defineComponent({
|
||||
setup(props, context) {
|
||||
const { t } = useI18n();
|
||||
|
||||
const $q = useQuasar()
|
||||
|
||||
const elementId = ref<string>('id');
|
||||
const disableDecline = ref<boolean>(true);
|
||||
const debug = ref<boolean>(false);
|
||||
@@ -95,13 +98,33 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const decline = (): void => {
|
||||
if (!debug.value) {
|
||||
setCookieStatus('decline')
|
||||
}
|
||||
|
||||
status.value = 'decline'
|
||||
isOpen.value = false
|
||||
context.emit('clicked-decline')
|
||||
const mytitle = 'Cookies'
|
||||
const mytext = t('reg.refuse_cookie')
|
||||
|
||||
return $q.dialog({
|
||||
message: mytext,
|
||||
html: true,
|
||||
ok: {
|
||||
label: 'Rifiuta Cookies',
|
||||
push: true,
|
||||
},
|
||||
title: mytitle,
|
||||
cancel: true,
|
||||
persistent: false,
|
||||
}).onOk(() => {
|
||||
if (!debug.value) {
|
||||
setCookieStatus('decline')
|
||||
}
|
||||
|
||||
status.value = 'decline'
|
||||
isOpen.value = false
|
||||
context.emit('clicked-decline')
|
||||
|
||||
}).onCancel(() => {
|
||||
//
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const clickInfo = (): void => {
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
<template>
|
||||
<div v-if="isOpen" class="tothebottomfixed" role="dialog">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<transition appear name="slide-up" mode="out-in" :duration="2000">
|
||||
<q-banner class="bg-primary text-white" transition-show="jump-down">
|
||||
{{t('cookies')}}
|
||||
<template v-slot:action>
|
||||
<div class="row justify-center margin_buttons_cook q-gutter-lg text-center" >
|
||||
<q-btn label="INFO" to="/policy"></q-btn>
|
||||
<q-btn
|
||||
color="red" label="RIFIUTA"
|
||||
@click="decline"></q-btn>
|
||||
<q-btn color="green" label="ACCETTA" @click="accept"></q-btn>
|
||||
</div>
|
||||
</template>
|
||||
</q-banner>
|
||||
</transition>
|
||||
</div>
|
||||
<div v-if="isOpen" class="tothebottomfixed" role="dialog">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<transition appear name="slide-up" mode="out-in" :duration="2000">
|
||||
<q-banner class="bg-primary text-white" transition-show="jump-down">
|
||||
{{ t('cookies') }}
|
||||
<template v-slot:action>
|
||||
<div class="row justify-center margin_buttons_cook q-gutter-lg text-center">
|
||||
<q-btn label="INFO" to="/policy"></q-btn>
|
||||
<q-btn color="green" label="ACCETTA" @click="accept"></q-btn>
|
||||
<q-btn
|
||||
color="red" label="RIFIUTA"
|
||||
@click="decline">
|
||||
|
||||
</q-btn>
|
||||
</div>
|
||||
</template>
|
||||
</q-banner>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./BannerCookies.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './BannerCookies.scss';
|
||||
@import './BannerCookies.scss';
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user