From ccd32c0e3eec446a9d9a743068512cd4bb3bdd5e Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 6 Sep 2024 09:05:33 +0300 Subject: [PATCH] no touch --- front/src/assets/main.scss | 7 ++++--- front/src/main.ts | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/front/src/assets/main.scss b/front/src/assets/main.scss index cda2286..89025e2 100644 --- a/front/src/assets/main.scss +++ b/front/src/assets/main.scss @@ -9,9 +9,10 @@ body { font-family: 'Montserrat'; user-select: none; - canvas { - cursor: none; - + &:not(.notouch) { + canvas { + cursor: none; + } } } diff --git a/front/src/main.ts b/front/src/main.ts index d6701d4..98c5bc5 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -29,11 +29,15 @@ const router = createRouter({ router.beforeEach((to, from, next) => { document.title = to.meta && to.meta.title ? to.meta.title.toString() : title; - + console.log('Navigating from', from.fullPath, 'to', to.fullPath); next(); }); +if (navigator.maxTouchPoints == 0) { + document.body.classList += 'notouch' +} + const pinia = createPinia() const app = createApp(App)