diff --git a/.gitignore b/.gitignore index 553e1345c..889ff5b2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store .thumbs.db node_modules +junit.xml # Quasar core related directories .quasar diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a870d0f04..5c8908497 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,7 +3,7 @@ "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "editorconfig.editorconfig", - "johnsoncodehk.volar", + "Vue.volar", "wayou.vscode-todo-highlight" ], "unwantedRecommendations": [ diff --git a/.vscode/settings.json b/.vscode/settings.json index 59aa4abd3..ecc1d50d7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,7 +2,7 @@ "editor.bracketPairColorization.enabled": true, "editor.guides.bracketPairs": true, "editor.formatOnSave": true, - "editor.defaultFormatter": "johnsoncodehk.volar", + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": ["source.fixAll.eslint"], "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"], "json.schemas": [ @@ -11,9 +11,6 @@ "url": "https://on.cypress.io/cypress.schema.json" } ], - "[javascript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" - }, "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" } diff --git a/package-lock.json b/package-lock.json index 1af3be8e6..4b651824f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,10 +8,11 @@ "name": "salix-front", "version": "0.0.1", "dependencies": { - "@quasar/extras": "^1.15.5", + "@quasar/extras": "^1.15.6", "axios": "^0.21.1", "core-js": "^3.6.5", - "quasar": "^2.10.0", + "pinia": "^2.0.24", + "quasar": "^2.10.2", "validator": "^13.7.0", "vue": "^3.0.0", "vue-i18n": "^9.0.0", @@ -20,6 +21,7 @@ "devDependencies": { "@babel/eslint-parser": "^7.13.14", "@intlify/vue-i18n-loader": "^4.1.0", + "@pinia/testing": "^0.0.14", "@quasar/app-webpack": "^3.6.2", "@quasar/quasar-app-extension-testing-e2e-cypress": "^4.2.2", "@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-alpha.10", @@ -3271,6 +3273,47 @@ "node": ">= 8" } }, + "node_modules/@pinia/testing": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@pinia/testing/-/testing-0.0.14.tgz", + "integrity": "sha512-ZmZwVNd/NnKYLIfjfuKl0zlJ3UdiXFpsHzSlL6wCeezSlyrqGMxsIQKv0J6fleu38gyCNTPBEipfxrt8V4+VIg==", + "dev": true, + "dependencies": { + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "pinia": ">=2.0.19" + } + }, + "node_modules/@pinia/testing/node_modules/vue-demi": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.21", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", @@ -3519,9 +3562,9 @@ } }, "node_modules/@quasar/extras": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.15.5.tgz", - "integrity": "sha512-JzKKx5/eKAip3X3bZUEJOOWT9NudqjF01gcce6rtyviko49OU4r+ekyJU3QQIKF8ZqnjZ+DpsVpMWBBZnO6hSQ==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.15.6.tgz", + "integrity": "sha512-lG3wrcz47c86N/j1ULZugmyVfwpmnsJpjtSWh+LhaFfe0g1kTMdAnxkWGKsa3ouZ4QBcnkrNan0kYSnKc3MiBg==", "funding": { "type": "github", "url": "https://donate.quasar.dev" @@ -4307,9 +4350,9 @@ } }, "node_modules/@vue/devtools-api": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.1.3.tgz", - "integrity": "sha512-79InfO2xHv+WHIrH1bHXQUiQD/wMls9qBk6WVwGCbdwP7/3zINtvqPNMtmSHXsIKjvUAHc8L0ouOj6ZQQRmcXg==" + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.4.5.tgz", + "integrity": "sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==" }, "node_modules/@vue/reactivity": { "version": "3.2.31", @@ -15743,6 +15786,56 @@ "node": ">=0.10.0" } }, + "node_modules/pinia": { + "version": "2.0.24", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.24.tgz", + "integrity": "sha512-DDLd4Iphyc+6PYYYbx7jkb6WP9gecgu9bz9huyB5rb7CdJI3DhzYiZI+/Ih8MLewRrP9DSpslF/BgSNrJtZU7A==", + "dependencies": { + "@vue/devtools-api": "^6.4.5", + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "@vue/composition-api": "^1.4.0", + "typescript": ">=4.4.4", + "vue": "^2.6.14 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/pinia/node_modules/vue-demi": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/pirates": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", @@ -16622,9 +16715,9 @@ } }, "node_modules/quasar": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.10.0.tgz", - "integrity": "sha512-PHGcrzPQfFa4tv9a5Z/3D2uat48D4WC9Ad/imzHk/k3G41t0eFMH6glCjAvpCWF2q8dBYIg4nEchiPhlujbKsw==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.10.2.tgz", + "integrity": "sha512-y6suu0f2hJKrnFPHzx+p2EBVGzDF6xHaqYGkDIsMNkhxsrO9Qi2+dZCjq1J6+48EJiqPEOn8t9X/gT7yLSSnLw==", "engines": { "node": ">= 10.18.1", "npm": ">= 6.13.4", @@ -19517,7 +19610,7 @@ "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -23355,6 +23448,24 @@ "fastq": "^1.6.0" } }, + "@pinia/testing": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@pinia/testing/-/testing-0.0.14.tgz", + "integrity": "sha512-ZmZwVNd/NnKYLIfjfuKl0zlJ3UdiXFpsHzSlL6wCeezSlyrqGMxsIQKv0J6fleu38gyCNTPBEipfxrt8V4+VIg==", + "dev": true, + "requires": { + "vue-demi": "*" + }, + "dependencies": { + "vue-demi": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", + "dev": true, + "requires": {} + } + } + }, "@polka/url": { "version": "1.0.0-next.21", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", @@ -23528,9 +23639,9 @@ } }, "@quasar/extras": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.15.5.tgz", - "integrity": "sha512-JzKKx5/eKAip3X3bZUEJOOWT9NudqjF01gcce6rtyviko49OU4r+ekyJU3QQIKF8ZqnjZ+DpsVpMWBBZnO6hSQ==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.15.6.tgz", + "integrity": "sha512-lG3wrcz47c86N/j1ULZugmyVfwpmnsJpjtSWh+LhaFfe0g1kTMdAnxkWGKsa3ouZ4QBcnkrNan0kYSnKc3MiBg==" }, "@quasar/fastclick": { "version": "1.1.5", @@ -24211,9 +24322,9 @@ } }, "@vue/devtools-api": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.1.3.tgz", - "integrity": "sha512-79InfO2xHv+WHIrH1bHXQUiQD/wMls9qBk6WVwGCbdwP7/3zINtvqPNMtmSHXsIKjvUAHc8L0ouOj6ZQQRmcXg==" + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.4.5.tgz", + "integrity": "sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==" }, "@vue/reactivity": { "version": "3.2.31", @@ -32797,6 +32908,23 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, + "pinia": { + "version": "2.0.24", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.24.tgz", + "integrity": "sha512-DDLd4Iphyc+6PYYYbx7jkb6WP9gecgu9bz9huyB5rb7CdJI3DhzYiZI+/Ih8MLewRrP9DSpslF/BgSNrJtZU7A==", + "requires": { + "@vue/devtools-api": "^6.4.5", + "vue-demi": "*" + }, + "dependencies": { + "vue-demi": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", + "requires": {} + } + } + }, "pirates": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", @@ -33385,9 +33513,9 @@ } }, "quasar": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.10.0.tgz", - "integrity": "sha512-PHGcrzPQfFa4tv9a5Z/3D2uat48D4WC9Ad/imzHk/k3G41t0eFMH6glCjAvpCWF2q8dBYIg4nEchiPhlujbKsw==" + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.10.2.tgz", + "integrity": "sha512-y6suu0f2hJKrnFPHzx+p2EBVGzDF6xHaqYGkDIsMNkhxsrO9Qi2+dZCjq1J6+48EJiqPEOn8t9X/gT7yLSSnLw==" }, "queue-microtask": { "version": "1.2.3", @@ -35619,7 +35747,7 @@ "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true + "devOptional": true }, "uglify-js": { "version": "3.15.3", diff --git a/package.json b/package.json index 3060e75ac..36a49575e 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,11 @@ "test:e2e:ci": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress run\"" }, "dependencies": { - "@quasar/extras": "^1.15.5", + "@quasar/extras": "^1.15.6", "axios": "^0.21.1", "core-js": "^3.6.5", - "quasar": "^2.10.0", + "pinia": "^2.0.24", + "quasar": "^2.10.2", "validator": "^13.7.0", "vue": "^3.0.0", "vue-i18n": "^9.0.0", @@ -30,6 +31,7 @@ "devDependencies": { "@babel/eslint-parser": "^7.13.14", "@intlify/vue-i18n-loader": "^4.1.0", + "@pinia/testing": "^0.0.14", "@quasar/app-webpack": "^3.6.2", "@quasar/quasar-app-extension-testing-e2e-cypress": "^4.2.2", "@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-alpha.10", diff --git a/quasar.config.js b/quasar.config.js index 83265295f..83a3abf3e 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -23,7 +23,7 @@ module.exports = configure(function (ctx) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli-webpack/boot-files - boot: ['i18n', 'axios'], + boot: ['i18n', 'axios', 'pinia'], // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-css css: ['app.scss'], @@ -38,8 +38,9 @@ module.exports = configure(function (ctx) { // 'line-awesome', // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! - 'roboto-font', // optional, you are not bound to it - 'material-icons', // optional, you are not bound to it + 'roboto-font', + 'material-icons-outlined', + 'material-symbols-outlined', ], // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-build diff --git a/src/App.vue b/src/App.vue index f381d2576..2ef0843bd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,4 +1,5 @@ + diff --git a/src/components/LeftMenuItemGroup.vue b/src/components/LeftMenuItemGroup.vue new file mode 100644 index 000000000..8305c2ec4 --- /dev/null +++ b/src/components/LeftMenuItemGroup.vue @@ -0,0 +1,51 @@ + + diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index ec407ace5..cb1283eb5 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useState } from 'src/composables/useState'; import { useSession } from 'src/composables/useSession'; import UserPanel from 'components/UserPanel.vue'; -import FavoriteModules from './FavoriteModules.vue'; +import PinnedModules from './PinnedModules.vue'; const { t } = useI18n(); const session = useSession(); @@ -43,11 +43,11 @@ function onToggleDrawer() {
- + - {{ t('globals.favoriteModules') }} + {{ t('globals.pinnedModules') }} - + diff --git a/src/components/FavoriteModules.vue b/src/components/PinnedModules.vue similarity index 63% rename from src/components/FavoriteModules.vue rename to src/components/PinnedModules.vue index 1a01bd1c7..27767a248 100644 --- a/src/components/FavoriteModules.vue +++ b/src/components/PinnedModules.vue @@ -1,14 +1,16 @@