diff --git a/.eslintrc.js b/.eslintrc.js index 30fab69b..5a9584e0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { root: true, parserOptions: { - parser: 'babel-eslint', + parser: '@babel/eslint-parser', ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features sourceType: 'module' // Allows for the use of imports }, @@ -22,7 +22,7 @@ module.exports = { // Uncomment any of the lines below to choose desired strictness, // but leave only one uncommented! // See https://eslint.vuejs.org/rules/#available-rules - 'plugin:vue/essential', // Priority A: Essential (Error Prevention) + 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) 'plugin:vue/strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) 'plugin:vue/recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) 'standard' diff --git a/package.json b/package.json index b1d698b9..4aa31612 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,14 @@ "i18n:extract-report": "sh ./bin/vue-i18n-extract/extract.sh report" }, "dependencies": { - "@quasar/extras": "^1.12.2", + "@quasar/extras": "^1.14.0", + "@vuelidate/core": "2.0.2", + "@vuelidate/validators": "2.0.2", "async": "^3.2.2", + "axios": "0.21.4", "core-js": "^3.6.5", + "crypto": "npm:crypto-browserify", + "crypto-browserify": "^3.12.0", "decode-uri-component": "^0.4.0", "eventsource": "^2.0.2", "file-saver": "^2.0.2", @@ -42,39 +47,48 @@ "moment": "^2.29.4", "npm": "^9.0.0", "qrcode": "1.5.0", - "quasar": "^1.16.3", + "quasar": "2", + "stream": "npm:stream-browserify", + "stream-browserify": "^3.0.0", "terser": "^5.14.2", - "vue-i18n": "^8.0.0", - "vue-password-strength-meter": "^1.7.2", + "tiny-emitter": "2.1.0", + "vue": "3", + "vue-i18n": "9.2.2", "vue-resource": "^1.5.1", + "vue-router": "4", "vue-scrollto": "^2.18.2", - "vuelidate": "^0.7.5", - "zxcvbn": "^4.4.2" + "vuex": "4", + "zxcvbn": "^4.4.2", + "vue-simple-password-meter": "1.3.4" }, "devDependencies": { - "@quasar/app": "^2.2.11", - "@quasar/cli": "1.2.2", - "@quasar/quasar-app-extension-testing": "^1.0.5", - "@quasar/quasar-app-extension-testing-unit-jest": "^1.0.1", - "babel-eslint": "^10.0.1", + "@babel/eslint-parser": "^7.0.0", + "@quasar/app-webpack": "3", + "@quasar/cli": "1.3.2", + "@quasar/quasar-app-extension-testing": "1.0.5", + "@quasar/quasar-app-extension-testing-unit-jest": "2.2.5", "commander": "6.2.1", "decomment": "0.9.4", "dot-object": "2.1.4", - "eslint": "^6.8.0", - "eslint-config-standard": "^14.1.0", - "eslint-loader": "^3.0.3", - "eslint-plugin-import": "^2.14.0", + "eslint": "^8.10.0", + "eslint-config-standard": "^16.0.2", + "eslint-plugin-import": "^2.19.1", "eslint-plugin-node": "^11.0.0", - "eslint-plugin-promise": "^4.0.1", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-quasar": "^1.0.0", "eslint-plugin-standard": "^4.0.0", - "eslint-plugin-vue": "^6.1.2", + "eslint-plugin-vue": "^9.0.0", + "eslint-webpack-plugin": "^3.1.1", "generate-password": "^1.5.1", "glob": "7.1.6", "is-valid-glob": "1.0.0", "js-yaml": "3.14.1", "parseuri": "^0.0.6", + "stylus": "0.59.0", + "stylus-loader": "7.1.3", "uuid": "8.3.1", - "vue-wait": "1.4.8" + "vue-wait": "^1.5.3", + "vuelidate": "^0.7.7" }, "browserslist": [ "last 10 Chrome versions", diff --git a/quasar.conf.js b/quasar.conf.js index 31a41c48..0481c05f 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -6,6 +6,10 @@ // Configuration for your app // https://quasar.dev/quasar-cli/quasar-conf-js + +const ESLintPlugin = require('eslint-webpack-plugin') +const webpack = require('webpack') + module.exports = function (ctx) { let devServerConfig = {} try { @@ -27,10 +31,10 @@ module.exports = function (ctx) { // https://quasar.dev/quasar-cli/boot-files boot: [ 'appConfig', + 'i18n', + 'api', 'filters', 'vuelidate', - 'i18n', - 'vue-resource', 'ngcp-call', 'user', 'routes', @@ -38,13 +42,14 @@ module.exports = function (ctx) { 'constants', 'vue-wait', 'e2e-testing', - 'branding' + 'branding', + 'event-bus' ], // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css css: [ - 'app.fonts.styl', - 'app.styl' + 'app.fonts.sass', + 'app.sass' ], // https://github.com/quasarframework/quasar/tree/dev/extras @@ -61,11 +66,44 @@ module.exports = function (ctx) { 'material-icons' // optional, you are not bound to it ], + // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework + framework: { + iconSet: 'material-icons', // Quasar icon set + lang: 'en-US', // Quasar language pack + config: {}, + + // Possible values for "importStrategy": + // * 'auto' - (DEFAULT) Auto-import needed Quasar components & directives + // * 'all' - Manually specify what to import + importStrategy: 'auto', + + // For special cases outside of where "auto" importStrategy can have an impact + // (like functional components as one of the examples), + // you can manually specify Quasar components/directives to be available everywhere: + // + // components: [], + // directives: [], + + // Quasar plugins + plugins: [ + 'Loading', + 'Notify', + 'Dialog', + 'SessionStorage', + 'LocalStorage', + 'Dark', + 'Meta' + ] + }, + // https://quasar.dev/quasar-cli/supporting-ts supportTS: false, // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build build: { + env: { + ...process.env + }, vueRouterMode: 'hash', // available values: 'hash', 'history' // transpile: false, @@ -86,12 +124,19 @@ module.exports = function (ctx) { // https://quasar.dev/quasar-cli/handling-webpack extendWebpack (cfg) { - cfg.module.rules.push({ - enforce: 'pre', - test: /\.(js|vue)$/, - loader: 'eslint-loader', - exclude: /node_modules/ - }) + cfg.plugins.push( + new ESLintPlugin({ extensions: ['js', 'vue'] }) + ) + cfg.plugins.push( + new webpack.ProvidePlugin({ + process: 'process/browser' + }) + ) + cfg.plugins.push( + new webpack.DefinePlugin({ + 'process.env': JSON.stringify(process.env) + }) + ) } }, @@ -100,52 +145,32 @@ module.exports = function (ctx) { https: false, port: 8080, open: true, // opens browser window automatically, - public: devServerConfig.public, - publicPath: devServerConfig.publicPath, - ...(!devServerConfig.proxyAPI2localhost ? {} : { - https: true, - publicPath: devServerConfig.publicPath || '/v2/', - proxy: { - [`!${devServerConfig.publicPath || '/v2/'}`]: { - target: devServerConfig.proxyAPIFromURL, - secure: false + devMiddleware: { + publicPath: devServerConfig.publicPath, + ...(!devServerConfig.proxyAPI2localhost + ? {} + : { + publicPath: devServerConfig.publicPath || '/v2/' + } + ) + }, + ...(!devServerConfig.proxyAPI2localhost + ? {} + : { + https: true, + proxy: { + [`!${devServerConfig.publicPath || '/v2/'}`]: { + target: devServerConfig.proxyAPIFromURL, + secure: false + } + }, + onBeforeSetupMiddleware: (devServer) => { + devServer.app.get('/', function (req, res) { + res.redirect(301, devServerConfig.publicPath || '/v2/') + }) } - }, - before: function (app, server, compiler) { - app.get('/', function (req, res) { - res.redirect(301, devServerConfig.publicPath || '/v2/') - }) } - }) - }, - - // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework - framework: { - iconSet: 'material-icons', // Quasar icon set - lang: 'en-us', // Quasar language pack - config: {}, - - // Possible values for "importStrategy": - // * 'auto' - (DEFAULT) Auto-import needed Quasar components & directives - // * 'all' - Manually specify what to import - importStrategy: 'auto', - - // For special cases outside of where "auto" importStrategy can have an impact - // (like functional components as one of the examples), - // you can manually specify Quasar components/directives to be available everywhere: - // - // components: [], - // directives: [], - - // Quasar plugins - plugins: [ - 'Notify', - 'Dialog', - 'SessionStorage', - 'LocalStorage', - 'Dark', - 'Meta' - ] + ) }, // animations: 'all', // --- includes all animations diff --git a/src/App.vue b/src/App.vue index 7ba70dea..e7e2dd8c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,5 @@ - diff --git a/src/components/CscAlertInfo.vue b/src/components/CscAlertInfo.vue index 4642d171..5314a7bb 100644 --- a/src/components/CscAlertInfo.vue +++ b/src/components/CscAlertInfo.vue @@ -28,14 +28,14 @@ export default { } - diff --git a/src/components/CscAudioPlayer.vue b/src/components/CscAudioPlayer.vue index 5975566e..ffbc8bcb 100644 --- a/src/components/CscAudioPlayer.vue +++ b/src/components/CscAudioPlayer.vue @@ -80,6 +80,7 @@ export default { default: false } }, + emits: ['load', 'stopped', 'playing', 'loading'], data () { return { playing: false, @@ -178,19 +179,19 @@ export default { } - diff --git a/src/components/CscCallDialpad.vue b/src/components/CscCallDialpad.vue index de7a4c5d..84608b86 100644 --- a/src/components/CscCallDialpad.vue +++ b/src/components/CscCallDialpad.vue @@ -73,6 +73,7 @@ export default { default: false } }, + emits: ['click', 'remove', 'remove-all'], data () { return {} }, @@ -101,41 +102,41 @@ export default { } - diff --git a/src/components/CscChangePasswordDialog.vue b/src/components/CscChangePasswordDialog.vue index 9c3d2c6d..32c7acb2 100644 --- a/src/components/CscChangePasswordDialog.vue +++ b/src/components/CscChangePasswordDialog.vue @@ -9,17 +9,17 @@ @input="$emit('input')" @hide="$emit('dialog-closed')" > -
-
-
+ - diff --git a/src/components/CscConfirmationDialog.vue b/src/components/CscConfirmationDialog.vue index 4a583a03..16d0e0c6 100644 --- a/src/components/CscConfirmationDialog.vue +++ b/src/components/CscConfirmationDialog.vue @@ -7,20 +7,23 @@ :opened="opened" @close="onClose()" > -
{{ message }} -
- + @@ -58,16 +61,17 @@ export default { default: 'primary' } }, + emits: ['confirm', 'cancel', 'closed'], data () { return { } }, methods: { open () { - this.$refs.dialogComp.open() + this.$refs.dialogComp.show() }, close () { - this.$refs.dialogComp.close() + this.$refs.dialogComp.hide() }, onClose () { this.$emit('closed') @@ -84,5 +88,5 @@ export default { } - diff --git a/src/components/CscDataTableEditInput.vue b/src/components/CscDataTableEditInput.vue index 2ad9718b..ed511dcc 100644 --- a/src/components/CscDataTableEditInput.vue +++ b/src/components/CscDataTableEditInput.vue @@ -19,6 +19,7 @@ - diff --git a/src/components/CscListAddButton.vue b/src/components/CscListAddButton.vue index 30909b8e..ede5b83a 100644 --- a/src/components/CscListAddButton.vue +++ b/src/components/CscListAddButton.vue @@ -24,6 +24,7 @@ export default { default: '' } }, + emits: ['click'], data () { return {} }, diff --git a/src/components/CscListItem.vue b/src/components/CscListItem.vue index 5c387d01..8a89e441 100644 --- a/src/components/CscListItem.vue +++ b/src/components/CscListItem.vue @@ -111,6 +111,7 @@ export default { default: true } }, + emits: ['toggle'], data () { return { moreMenu: false @@ -139,64 +140,65 @@ export default { } - diff --git a/src/components/CscListItemSubtitle.vue b/src/components/CscListItemSubtitle.vue index 35785fc3..e1ad73b6 100644 --- a/src/components/CscListItemSubtitle.vue +++ b/src/components/CscListItemSubtitle.vue @@ -15,5 +15,5 @@ export default { } - diff --git a/src/components/CscListItemTitle.vue b/src/components/CscListItemTitle.vue index 8b2b314b..e6f770ef 100644 --- a/src/components/CscListItemTitle.vue +++ b/src/components/CscListItemTitle.vue @@ -31,5 +31,5 @@ export default { } - diff --git a/src/components/CscListMenuItem.vue b/src/components/CscListMenuItem.vue index f8e6e3f6..ffae9ac4 100644 --- a/src/components/CscListMenuItem.vue +++ b/src/components/CscListMenuItem.vue @@ -32,6 +32,7 @@ export default { default: '' } }, + emits: ['click'], data () { return {} }, @@ -43,5 +44,5 @@ export default { } - diff --git a/src/components/CscLogo.vue b/src/components/CscLogo.vue index 03e72fca..f6f38701 100644 --- a/src/components/CscLogo.vue +++ b/src/components/CscLogo.vue @@ -141,23 +141,23 @@ export default { } - diff --git a/src/components/CscMainMenu.vue b/src/components/CscMainMenu.vue index 973d7253..5450d3d9 100644 --- a/src/components/CscMainMenu.vue +++ b/src/components/CscMainMenu.vue @@ -5,7 +5,7 @@ > - diff --git a/src/components/CscMainMenuNewFeatures.vue b/src/components/CscMainMenuNewFeatures.vue index d8ec87c7..5062e8c9 100644 --- a/src/components/CscMainMenuNewFeatures.vue +++ b/src/components/CscMainMenuNewFeatures.vue @@ -13,9 +13,6 @@ - diff --git a/src/components/CscMoreMenu.vue b/src/components/CscMoreMenu.vue index 7641831f..70962a3b 100644 --- a/src/components/CscMoreMenu.vue +++ b/src/components/CscMoreMenu.vue @@ -11,14 +11,14 @@ >