From b1c5ae4c4a1188c662b370da33137bf4866ed265 Mon Sep 17 00:00:00 2001 From: The4thLaw Date: Sat, 16 Mar 2024 20:57:06 +0100 Subject: [PATCH] Added the CSP nonce to Vuetify? Also cleaned up old Vue 2 code. Refs #156 --- .../demyo-vue-frontend/src/plugins/vuetify.js | 35 ++++++------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/source/demyo-vue-frontend/src/plugins/vuetify.js b/source/demyo-vue-frontend/src/plugins/vuetify.js index e726138c..f230890a 100644 --- a/source/demyo-vue-frontend/src/plugins/vuetify.js +++ b/source/demyo-vue-frontend/src/plugins/vuetify.js @@ -1,23 +1,11 @@ -//import { TiptapVuetifyPlugin } from 'tiptap-vuetify' -//import 'tiptap-vuetify/dist/main.css' +import { cspStyleNonce } from '@/myenv' +// import { TiptapVuetifyPlugin } from 'tiptap-vuetify' +// import 'tiptap-vuetify/dist/main.css' import { createVuetify } from 'vuetify' import 'vuetify/styles' // TODO: Vue 3: maybe we can remove the separate mdi import then? import { aliases, mdi } from 'vuetify/iconsets/mdi' -/*Vue.use(Vuetify, { - directives: { - Touch, - // TODO: Workaround for https://github.com/vuetifyjs/vuetify/issues/12224, to be removed in Vue+Vuetify 3 - Ripple - }, - theme: { - options: { - cspNonce: cspStyleNonce - } - } -})*/ - const vuetify = createVuetify({ icons: { defaultSet: 'mdi', @@ -25,9 +13,14 @@ const vuetify = createVuetify({ sets: { mdi } + }, + theme: { + cspNonce: cspStyleNonce } + // TODO: Vue 3 - /*theme: { + /* + theme: { options: { customProperties: true }, @@ -39,14 +32,8 @@ const vuetify = createVuetify({ accent: colors.pink } } - }*/ + } + */ }) -//Vue.use(vuetify) - -/*Vue.use(TiptapVuetifyPlugin, { - vuetify, - iconsGroup: 'mdi' -})*/ - export default vuetify