From b1fbf69c040bfe310e49d885600da3fec26bd41d Mon Sep 17 00:00:00 2001 From: NiloCK Date: Thu, 2 Jan 2025 00:56:22 -0400 Subject: [PATCH 1/6] update to vuetify 2.x --- packages/vue/package.json | 7 +- packages/vue/src/main.ts | 6 +- packages/vue/src/plugins/vuetify.ts | 45 ++++---- packages/vue/src/types/shims-vuetify.d.ts | 5 + packages/vue/tsconfig.json | 2 +- packages/vue/vue.config.js | 24 +++- packages/vue/yarn.lock | 129 +++++++++++++++++----- 7 files changed, 155 insertions(+), 63 deletions(-) create mode 100644 packages/vue/src/types/shims-vuetify.d.ts diff --git a/packages/vue/package.json b/packages/vue/package.json index 1824f699..9e8e9833 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -35,7 +35,8 @@ "vue-class-component": "^7.2.6", "vue-property-decorator": "^9.1.2", "vue-router": "^3.6.5", - "vuetify": "1.5.24", + "vuetify": "^2.7.2", + "@mdi/font": "^7.3.67", "vuex": "^3.6.1", "wavesurfer.js": "^5.1.0", "webmidi": "^2.5.1" @@ -54,6 +55,7 @@ "@types/pouchdb-browser": "^6.1.3", "@types/pouchdb-find": "^6.3.4", "@types/simplemde": "^1.11.7", + "@types/vuetify": "^2.0.0", "@types/wavesurfer.js": "^5.1.0", "@types/webmidi": "^2.0.4", "@typescript-eslint/eslint-plugin": "^4.18.0", @@ -83,7 +85,8 @@ "ts-jest": "^27.1.5", "typescript": "~5.7.2", "util": "^0.12.5", - "vue-cli-plugin-vuetify": "^0.2.0", + "vue-cli-plugin-vuetify": "^2.5.8", + "vuetify-loader": "^1.7.3", "vue-template-compiler": "^2.7.16" }, "engines": { diff --git a/packages/vue/src/main.ts b/packages/vue/src/main.ts index 89e05002..038d8778 100644 --- a/packages/vue/src/main.ts +++ b/packages/vue/src/main.ts @@ -3,12 +3,13 @@ import 'material-design-icons-iconfont/dist/material-design-icons.css'; import 'roboto-fontface/css/roboto/roboto-fontface.css'; import Vue from 'vue'; import App from './App.vue'; -import './plugins/vuetify'; +import vuetify from './plugins/vuetify'; // Only import once import './registerServiceWorker'; import router from './router'; import store from './store'; import SkldrVue from './SkldrVue'; import Vuex from 'vuex'; +import 'vuetify/dist/vuetify.min.css'; Vue.config.productionTip = false; @@ -18,5 +19,6 @@ Vue.use(Vuex); new SkldrVue({ router, store, - render: h => h(App), + vuetify, // Add the vuetify instance here + render: (h) => h(App), }).$mount('#app'); diff --git a/packages/vue/src/plugins/vuetify.ts b/packages/vue/src/plugins/vuetify.ts index dd0fe862..d5df1167 100644 --- a/packages/vue/src/plugins/vuetify.ts +++ b/packages/vue/src/plugins/vuetify.ts @@ -1,28 +1,25 @@ import Vue from 'vue'; -import Vuetify from 'vuetify'; -import 'vuetify/dist/vuetify.min.css'; -import colors from 'vuetify/es5/util/colors'; +import Vuetify from 'vuetify/lib'; +import '@mdi/font/css/materialdesignicons.css'; +import 'vuetify/dist/vuetify.min.css'; // Add this line -// const theme = { -// primary: colors.indigo.base, -// secondary: colors.teal.base, -// accent: colors.cyan.base, -// error: colors.red.base, -// warning: colors.amber.base, -// info: colors.blue.base, -// success: colors.green.base -// } +Vue.use(Vuetify); -// const coolers = { - -// primary: "#0e7c7b", -// secondary: "#ee6055", -// accent: "#93e5ab", -// error: "#053c5e", -// warning: "#656565", -// } - -Vue.use(Vuetify, { - iconfont: 'md', - // theme: coolers +export default new Vuetify({ + icons: { + iconfont: 'mdi', + }, + theme: { + themes: { + light: { + primary: '#1976D2', + secondary: '#424242', + accent: '#82B1FF', + error: '#FF5252', + info: '#2196F3', + success: '#4CAF50', + warning: '#FFC107', + }, + }, + }, }); diff --git a/packages/vue/src/types/shims-vuetify.d.ts b/packages/vue/src/types/shims-vuetify.d.ts new file mode 100644 index 00000000..ad4616de --- /dev/null +++ b/packages/vue/src/types/shims-vuetify.d.ts @@ -0,0 +1,5 @@ +declare module 'vuetify/lib' { + import Vuetify from 'vuetify'; + export default Vuetify; +} + diff --git a/packages/vue/tsconfig.json b/packages/vue/tsconfig.json index 05b07714..8e7ff005 100644 --- a/packages/vue/tsconfig.json +++ b/packages/vue/tsconfig.json @@ -14,7 +14,7 @@ "esModuleInterop": true, "sourceMap": true, "baseUrl": ".", - "types": ["node", "jest", "@types/jest"], + "types": ["node", "jest", "@types/jest", "vuetify/types"], "paths": { "@/*": ["src/*"] }, diff --git a/packages/vue/vue.config.js b/packages/vue/vue.config.js index 8aa5a38e..ba8e2cb0 100644 --- a/packages/vue/vue.config.js +++ b/packages/vue/vue.config.js @@ -1,11 +1,14 @@ const TerserPlugin = require('terser-webpack-plugin'); const webpack = require('webpack'); const path = require('path'); +const { defineConfig } = require('@vue/cli-service'); + +module.exports = defineConfig({ + transpileDependencies: ['vuetify'], // Add this line for Vuetify 2.x -module.exports = { configureWebpack: (config) => { - console.log('[config] NODE_ENV:', process.env.NODE_ENV); // prints `development` - console.log('[config] VUE_APP_MOCK:', process.env.VUE_APP_MOCK); // prints true + console.log('[config] NODE_ENV:', process.env.NODE_ENV); + console.log('[config] VUE_APP_MOCK:', process.env.VUE_APP_MOCK); if (process.env.NODE_ENV === 'production') { config.optimization.minimizer[0] = new TerserPlugin(terserOptions); @@ -57,11 +60,24 @@ module.exports = { }), ]; }, + + css: { + loaderOptions: { + sass: { + // This is optional but recommended for Vuetify 2.x + implementation: require('sass'), + sassOptions: { + fiber: false, + }, + }, + }, + }, + publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', pwa: { name: 'Skuilder', }, -}; +}); const terserOptions = { terserOptions: { diff --git a/packages/vue/yarn.lock b/packages/vue/yarn.lock index b450d8d9..ac41fbf0 100644 --- a/packages/vue/yarn.lock +++ b/packages/vue/yarn.lock @@ -2076,6 +2076,11 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== +"@mdi/font@^7.3.67": + version "7.4.47" + resolved "https://registry.yarnpkg.com/@mdi/font/-/font-7.4.47.tgz#2ae522867da3a5c88b738d54b403eb91471903af" + integrity sha512-43MtGpd585SNzHZPcYowu/84Vz2a2g31TvPMTm9uTiCSWzaheQySUcSyUH/46fPnuPQWof2yd0pGBtzee/IQWw== + "@node-ipc/js-queue@2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@node-ipc/js-queue/-/js-queue-2.0.3.tgz#ac7fe33d766fa53e233ef8fedaf3443a01c5a4cd" @@ -3687,7 +3692,7 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn-walk@^8.0.0, acorn-walk@^8.0.2: +acorn-walk@^8.0.0, acorn-walk@^8.0.2, acorn-walk@^8.2.0: version "8.3.4" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== @@ -3699,7 +3704,7 @@ acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.0.5, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.2.4, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.0.4, acorn@^8.0.5, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.8.2, acorn@^8.9.0: version "8.14.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== @@ -4381,6 +4386,11 @@ call-bound@^1.0.2, call-bound@^1.0.3: call-bind-apply-helpers "^1.0.1" get-intrinsic "^1.2.6" +callsite@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + integrity sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ== + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -5155,6 +5165,13 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: dependencies: ms "2.1.2" +decache@^4.6.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/decache/-/decache-4.6.2.tgz#c1df1325a2f36d53922e08f33380f083148199cd" + integrity sha512-2LPqkLeu8XWHU8qNCS3kcF6sCcb5zIzvWaAHYSvPfwhdd7mHuah29NssMzrTYyHN4F5oFy2ko9OBYxegtU0FEw== + dependencies: + callsite "^1.0.0" + decimal.js@^10.2.1: version "10.4.3" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" @@ -5895,6 +5912,14 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" +file-loader@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" + integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -6221,27 +6246,27 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== +glob@^7.0.0, glob@^7.1.6: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.1.1" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" @@ -6721,6 +6746,11 @@ internal-slot@^1.1.0: hasown "^2.0.2" side-channel "^1.1.0" +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -8589,6 +8619,14 @@ nth-check@^2.0.0: dependencies: boolbase "^1.0.0" +null-loader@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/null-loader/-/null-loader-4.0.1.tgz#8e63bd3a2dd3c64236a4679428632edd0a6dbc6a" + integrity sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -9688,6 +9726,13 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.9.tgz#c905f3386008de95a62315f3ea8630404be19e2f" @@ -9917,15 +9962,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== -resolve@^1.10.0, resolve@^1.14.2: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -resolve@^1.19.0, resolve@^1.20.0: +resolve@^1.1.6, resolve@^1.19.0, resolve@^1.20.0: version "1.22.10" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== @@ -9934,6 +9971,14 @@ resolve@^1.19.0, resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.10.0, resolve@^1.14.2: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -10158,7 +10203,7 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.x, semver@^7.3.4, semver@^7.3.6, semver@^7.5.3, semver@^7.5.4: +semver@7.x, semver@^7.1.2, semver@^7.3.4, semver@^7.3.6, semver@^7.5.3, semver@^7.5.4: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -10314,6 +10359,15 @@ shell-quote@^1.8.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.2.tgz#d2d83e057959d53ec261311e9e9b8f51dcb2934a" integrity sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA== +shelljs@^0.8.3: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + side-channel-list@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" @@ -11581,10 +11635,14 @@ vue-class-component@^7.2.6: resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-7.2.6.tgz#8471e037b8e4762f5a464686e19e5afc708502e4" integrity sha512-+eaQXVrAm/LldalI272PpDe3+i4mPis0ORiMYxF6Ae4hyuCh15W8Idet7wPUEs4N4YptgFHGys4UrgNQOMyO6w== -vue-cli-plugin-vuetify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-0.2.1.tgz#fea624e5e4cf3cc2e655d469d441ec151fbb2c23" - integrity sha512-kYnDF8a8TmjF89mxHhBIqZPOizGLEXU3MLetw5kfLeG1NBeyejbdEGaUFy59LETvJFnBKYjN4OYFChlZhlLNLg== +vue-cli-plugin-vuetify@^2.5.8: + version "2.5.8" + resolved "https://registry.yarnpkg.com/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-2.5.8.tgz#a67ef81375fb2cd9f4f912e665e5190de105f2f6" + integrity sha512-uqi0/URJETJBbWlQHD1l0pnY7JN8Ytu+AL1fw50HFlGByPa8/xx+mq19GkFXA9FcwFT01IqEc/TkxMPugchomg== + dependencies: + null-loader "^4.0.1" + semver "^7.1.2" + shelljs "^0.8.3" vue-eslint-parser@^9.3.1: version "9.4.3" @@ -11657,10 +11715,21 @@ vue@^2.7.16: "@vue/compiler-sfc" "2.7.16" csstype "^3.1.0" -vuetify@1.5.24: - version "1.5.24" - resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-1.5.24.tgz#d5cf6e7289570d5d05f8832a097cd435d36d37df" - integrity sha512-guFOgEgZ8VpSgNXOv1QL2fOliaJBoiyNnf+bBqcXsnIppJGRlW1wyT6Ux7ZlQyphSHs+UK1aJNUjcyAtoOiHWg== +vuetify-loader@^1.7.3: + version "1.9.2" + resolved "https://registry.yarnpkg.com/vuetify-loader/-/vuetify-loader-1.9.2.tgz#adcadac71c6d9b24bde42a5b81dfda1871f73f81" + integrity sha512-8PP2w7aAs/rjA+Izec6qY7sHVb75MNrGQrDOTZJ5IEnvl+NiFhVpU2iWdRDZ3eMS842cWxSWStvkr+KJJKy+Iw== + dependencies: + acorn "^8.4.1" + acorn-walk "^8.2.0" + decache "^4.6.0" + file-loader "^6.2.0" + loader-utils "^2.0.0" + +vuetify@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-2.7.2.tgz#b2b687e519257d789a63b87c418f98099f38990f" + integrity sha512-qr04ww7uzAPQbpk751x4fSdjsJ+zREzjQ/rBlcQGuWS6MIMFMXcXcwvp4+/tnGsULZxPMWfQ0kmZmg5Yc/XzgQ== vuex@^3.6.1: version "3.6.2" From cfb165da49fcb53bb113a25c04af1b291214f9cd Mon Sep 17 00:00:00 2001 From: NiloCK Date: Thu, 2 Jan 2025 00:56:59 -0400 Subject: [PATCH 2/6] `primary` does not exist on theme... after 2.x upgrade --- packages/vue/src/courses/piano/NoteDisplay.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue/src/courses/piano/NoteDisplay.vue b/packages/vue/src/courses/piano/NoteDisplay.vue index 3a74287f..9d4faffd 100644 --- a/packages/vue/src/courses/piano/NoteDisplay.vue +++ b/packages/vue/src/courses/piano/NoteDisplay.vue @@ -141,7 +141,7 @@ export default class NoteDisplay extends SkldrVue { private style(n: number) { let color: string = '#ffffff'; if (n === this.chroma) { - color = this.$vuetify.theme.primary.toString(); + color = '#1976D2'; } else if (n === 1 || n === 3 || n === 6 || n === 8 || n === 10 || n === this.black) { color = '#000000'; } From 3d8b0008ab8b6db3abfd888cbbf4209263a805f9 Mon Sep 17 00:00:00 2001 From: NiloCK Date: Thu, 2 Jan 2025 00:57:26 -0400 Subject: [PATCH 3/6] vuetify 1->2 migration --- packages/vue/src/App.vue | 82 ++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/packages/vue/src/App.vue b/packages/vue/src/App.vue index e5cf4db6..eefd21a9 100644 --- a/packages/vue/src/App.vue +++ b/packages/vue/src/App.vue @@ -3,70 +3,70 @@ - - + + home - - - Home - - - - + + + Home + + + + school - - - Study - - - - + + + Study + + + + people - - - Classrooms - - - - + + + Classrooms + + + + bookmarks - - - Quilts - - - + + + --> - - + + - - + + - + - - + +

Available Quilts:

- - + + - - + + - Start a new Quilt + From 519efb1b21a22d70a959e32cc6d5c273255e8936 Mon Sep 17 00:00:00 2001 From: NiloCK Date: Thu, 2 Jan 2025 02:12:22 -0400 Subject: [PATCH 5/6] vuetify 1->2 migration --- .../Components/AudioAutoPlayer.vue | 10 ++- .../Components/MultipleChoiceOption.vue | 1 + .../components/Courses/CourseCardBrowser.vue | 84 +++++++++++-------- .../src/components/Courses/CourseEditor.vue | 82 +++++++++--------- .../components/Courses/CourseInformation.vue | 24 +++--- .../src/components/Courses/CourseStubCard.vue | 6 +- .../src/components/Courses/EloModeration.vue | 20 ++--- .../src/components/Courses/TagInformation.vue | 20 +++-- .../vue/src/components/Edit/CardBrowser.vue | 13 +-- .../vue/src/components/Edit/TagsInput.vue | 2 +- .../FieldInputs/MediaDragDropUploader.vue | 16 ++-- .../vue/src/components/PaginatingToolbar.vue | 8 +- packages/vue/src/components/SkMouseTrap.vue | 16 ++-- .../vue/src/components/SnackbarService.vue | 4 +- .../vue/src/components/Study/CardViewer.vue | 2 +- .../components/Study/SessionConfiguration.vue | 30 +++---- packages/vue/src/components/UserChip.vue | 42 +++++----- packages/vue/src/components/UserLogin.vue | 18 ++-- .../UserLoginAndRegistrationContainer.vue | 12 ++- .../vue/src/components/UserRegistration.vue | 22 +++-- 20 files changed, 229 insertions(+), 203 deletions(-) diff --git a/packages/vue/src/base-course/Components/AudioAutoPlayer.vue b/packages/vue/src/base-course/Components/AudioAutoPlayer.vue index e2320bca..da86faba 100644 --- a/packages/vue/src/base-course/Components/AudioAutoPlayer.vue +++ b/packages/vue/src/base-course/Components/AudioAutoPlayer.vue @@ -1,6 +1,12 @@ diff --git a/packages/vue/src/base-course/Components/MultipleChoiceOption.vue b/packages/vue/src/base-course/Components/MultipleChoiceOption.vue index 85fcee56..04d746bd 100644 --- a/packages/vue/src/base-course/Components/MultipleChoiceOption.vue +++ b/packages/vue/src/base-course/Components/MultipleChoiceOption.vue @@ -88,6 +88,7 @@ export default class MultipleChoiceOption extends Vue { padding-bottom: 5px; margin: 10px; min-width: 75px; /* prevent tiny click-btns on, eg, one-letter answers */ + transition: all 0.2s ease-in-out; } .selected { diff --git a/packages/vue/src/components/Courses/CourseCardBrowser.vue b/packages/vue/src/components/Courses/CourseCardBrowser.vue index c44f5ebf..bc4d3b0a 100644 --- a/packages/vue/src/components/Courses/CourseCardBrowser.vue +++ b/packages/vue/src/components/Courses/CourseCardBrowser.vue @@ -9,52 +9,68 @@ v-on:prev="prev" v-on:next="next" v-on:last="last" - v-on:set-page="n => setPage(n)" + v-on:set-page="(n) => setPage(n)" /> - - + + - - + - - open_in_full + close + + open_in_full + - bookmark + mdi-bookmark - flag + mdi-flag - - - + -
- Delete this card + Delete this card Are you sure? Confirm @@ -77,7 +93,7 @@ @prev="prev" @next="next" @last="last" - @set-page="n => setPage(n)" + @set-page="(n) => setPage(n)" /> @@ -140,7 +156,7 @@ export default class CourseCardBrowser extends SkldrVue { private delBtn: boolean = false; private clearSelections(exception: string = '') { - this.cards.forEach(card => { + this.cards.forEach((card) => { if (card.id !== exception) { card.isOpen = false; } @@ -152,7 +168,7 @@ export default class CourseCardBrowser extends SkldrVue { private async deleteCard(c: string) { const res = await this.courseDB.removeCard(c.split('-')[1]); if (res.ok) { - this.cards = this.cards.filter(card => card.id != c); + this.cards = this.cards.filter((card) => card.id != c); this.clearSelections(); } } @@ -189,7 +205,7 @@ export default class CourseCardBrowser extends SkldrVue { private async populateTableData() { if (this._tag) { const tag = await getTag(this._id, this._tag); - this.cards = tag.taggedCards.map(c => { + this.cards = tag.taggedCards.map((c) => { return { id: `${this._id}-${c}`, isOpen: false }; }); } else { @@ -200,7 +216,7 @@ export default class CourseCardBrowser extends SkldrVue { limit: 25, page: this.page - 1, // -1 for 0-index offset }) - ).map(c => { + ).map((c) => { return { id: c, isOpen: false, @@ -212,13 +228,13 @@ export default class CourseCardBrowser extends SkldrVue { const hydratedCardData = ( await getCourseDocs( this._id, - this.cards.map(c => c.id.split('-')[1]), + this.cards.map((c) => c.id.split('-')[1]), { include_docs: true, } ) ).rows - .filter(r => { + .filter((r) => { if (r.doc) { return true; } else { @@ -228,30 +244,30 @@ export default class CourseCardBrowser extends SkldrVue { return false; } }) - .map(r => r.doc!); + .map((r) => r.doc!); - this.cards = this.cards.filter(c => !toRemove.includes(c.id.split('-')[1])); + this.cards = this.cards.filter((c) => !toRemove.includes(c.id.split('-')[1])); - hydratedCardData.forEach(c => { + hydratedCardData.forEach((c) => { if (c && c.id_displayable_data) { // this allowed display. still not finished this.cardData[c._id] = c.id_displayable_data; } }); - this.cards.forEach(async c => { + this.cards.forEach(async (c) => { // this.log(`generating preview for ${c}`); const _courseID: string = c.id.split('-')[0]; const _cardID: string = c.id.split('-')[1]; - const tmpCardData = hydratedCardData.find(c => c._id == _cardID)!; + const tmpCardData = hydratedCardData.find((c) => c._id == _cardID)!; // this.log(`tmpCardData: ${JSON.stringify(tmpCardData)}`); const tmpView = Courses.getView(tmpCardData.id_view || 'default.question.BlanksCard.FillInView'); // todo 143 / perf: this fetch is non-blocking, but is making a db // query for each card. much much better to batch query by allDocs // with keys list - const tmpDataDocs = tmpCardData.id_displayable_data.map(id => { + const tmpDataDocs = tmpCardData.id_displayable_data.map((id) => { return getCourseDoc(_courseID, id, { attachments: false, binary: true, @@ -260,7 +276,7 @@ export default class CourseCardBrowser extends SkldrVue { const allDocs = await Promise.all(tmpDataDocs); await Promise.all( - allDocs.map(doc => { + allDocs.map((doc) => { const tmpData = []; tmpData.unshift(displayableDataToViewData(doc)); diff --git a/packages/vue/src/components/Courses/CourseEditor.vue b/packages/vue/src/components/Courses/CourseEditor.vue index a1ca7a69..1f35ad9a 100644 --- a/packages/vue/src/components/Courses/CourseEditor.vue +++ b/packages/vue/src/components/Courses/CourseEditor.vue @@ -1,53 +1,51 @@