Коммит 77e6e25a создал по автору Anton Medvedev's avatar Anton Medvedev
Просмотр файлов

Merge branch 'main' into 'main'

#72 Создано окно подтверждений файлов Cookie

See merge request teknokomo/universo-monorepo!27
владельцы 569020f6 3ee43889
/venv/
/myenv/
node_modules
universo-frontend/package-lock.json
.DS_Store
.thumbs.db
node_modules
package-lock.json
# Quasar core related directories
.quasar
......
......@@ -22,7 +22,7 @@
"graphql": "^15.8.0",
"graphql-tag": "^2.12.6",
"phaser": "^3.60.0",
"phaser3-rex-plugins": "^1.60.4",
"phaser3-rex-plugins": "^1.60.5",
"pinia": "^2.1.6",
"quasar": "^2.6.0",
"vue": "^3.0.0",
......
......@@ -98,7 +98,9 @@ module.exports = configure(function (/* ctx */) {
// directives: [],
// Quasar plugins
plugins: [],
plugins: [
'Notify'
],
},
// animations: 'all', // --- includes all animations
......
......@@ -31,6 +31,7 @@
import { defineComponent, ref } from 'vue';
import { useAuthStore } from 'src/stores/auth.js';
import { mapActions } from 'pinia';
import { LocalStorage } from 'quasar'
const linksList = [
{
......@@ -48,13 +49,40 @@ export default defineComponent({
// EssentialLink
},
data() {
return {};
return {
acceptCookies:false,
acceptCookiesMessage: 'Мы используем файлы cookies. <br/> Чтобы улучшить работу сайта и предоставить вам больше возможностей.'
};
},
methods: {
...mapActions(useAuthStore, ['getMe']),
...mapActions(useAuthStore, ['getLocalStorage']),
},
mounted() {
this.acceptCookies = LocalStorage.getItem('acceptCookies');
if (!this.acceptCookies) {
setTimeout(() => {
this.$q.notify({
//progress: true,
message: this.acceptCookiesMessage,
color: 'red',
multiLine: true,
timeout: 0,
html: true,
actions: [
{
label: 'Согласен',
color: 'white',
handler: () => {
this.acceptCookies = true;
LocalStorage.set('acceptCookies', true);
}
}
]
});
}, 2000);
}
this.getLocalStorage()
.then(() => this.getMe())
.catch(() => {
......@@ -63,6 +91,7 @@ export default defineComponent({
}
});
},
setup() {
const leftDrawerOpen = ref(false);
......
......@@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [
component: () => import('layouts/MainLayout.vue'),
children: [
// { path: '', component: () => import('pages/IndexPage.vue') },
{ path: '//privacypolicy', component: () => import('pages/PrivacyPolicy.vue'),meta: { requiresAuth: false }, },
{ path: '/privacypolicy', component: () => import('pages/PrivacyPolicy.vue'),meta: { requiresAuth: false }, },
{ path: '/actualcanvas', component: () => import('pages/canvas/ActualCanvas.vue') },
{ path: '/endlesscanvas', component: () => import('pages/EndlessPage.vue'),meta: { requiresAuth: true }, },
{ path: '/user', component: () => import('pages/UserProfile.vue'),meta: { requiresAuth: true }, },
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать