├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .postcssrc.js ├── .prettierrc ├── .vscode ├── extensions.json └── settings.json ├── README.md ├── babel.config.js ├── package.json ├── public ├── favicon.ico └── img │ └── icons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── android-chrome-maskable-192x192.png │ ├── android-chrome-maskable-512x512.png │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-180x180.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── msapplication-icon-144x144.png │ ├── mstile-150x150.png │ └── safari-pinned-tab.svg ├── quasar.conf.js ├── src ├── App.vue ├── boot │ ├── .gitkeep │ ├── axios.ts │ └── socket.ts ├── components │ ├── layout │ │ ├── drawer.vue │ │ └── header.vue │ └── widget │ │ └── card.vue ├── css │ ├── app.scss │ └── quasar.variables.scss ├── env.d.ts ├── index.template.html ├── layouts │ └── MainLayout.vue ├── pages │ ├── chat.vue │ ├── dashboard.vue │ └── plugins.vue ├── quasar.d.ts ├── router │ ├── index.ts │ └── routes.ts └── shims-vue.d.ts ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /src-bex/www 3 | /src-capacitor 4 | /src-cordova 5 | /.quasar 6 | /node_modules 7 | .eslintrc.js 8 | babel.config.js 9 | /src-ssr -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require('path'); 2 | module.exports = { 3 | // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy 4 | // This option interrupts the configuration hierarchy at this file 5 | // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) 6 | root: true, 7 | 8 | // https://eslint.vuejs.org/user-guide/#how-to-use-custom-parser 9 | // Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working 10 | // `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted 11 | parserOptions: { 12 | // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration 13 | // https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#eslint 14 | // Needed to make the parser take into account 'vue' files 15 | extraFileExtensions: ['.vue'], 16 | parser: '@typescript-eslint/parser', 17 | project: resolve(__dirname, './tsconfig.json'), 18 | tsconfigRootDir: __dirname, 19 | ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features 20 | sourceType: 'module', // Allows for the use of imports 21 | }, 22 | 23 | env: { 24 | browser: true, 25 | }, 26 | 27 | // Rules order is important, please avoid shuffling them 28 | extends: [ 29 | // Base ESLint recommended rules 30 | // 'eslint:recommended', 31 | 32 | // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage 33 | // ESLint typescript rules 34 | 'plugin:@typescript-eslint/recommended', 35 | // consider disabling this class of rules if linting takes too long 36 | 'plugin:@typescript-eslint/recommended-requiring-type-checking', 37 | 38 | // Uncomment any of the lines below to choose desired strictness, 39 | // but leave only one uncommented! 40 | // See https://eslint.vuejs.org/rules/#available-rules 41 | 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) 42 | // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) 43 | // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) 44 | 45 | // https://github.com/prettier/eslint-config-prettier#installation 46 | // usage with Prettier, provided by 'eslint-config-prettier'. 47 | 'prettier', 48 | ], 49 | 50 | plugins: [ 51 | // required to apply rules which need type information 52 | '@typescript-eslint', 53 | 54 | // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file 55 | // required to lint *.vue files 56 | 'vue', 57 | 58 | // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 59 | // Prettier has not been included as plugin to avoid performance impact 60 | // add it as an extension for your IDE 61 | ], 62 | 63 | globals: { 64 | ga: 'readonly', // Google Analytics 65 | cordova: 'readonly', 66 | __statics: 'readonly', 67 | __QUASAR_SSR__: 'readonly', 68 | __QUASAR_SSR_SERVER__: 'readonly', 69 | __QUASAR_SSR_CLIENT__: 'readonly', 70 | __QUASAR_SSR_PWA__: 'readonly', 71 | process: 'readonly', 72 | Capacitor: 'readonly', 73 | chrome: 'readonly', 74 | }, 75 | 76 | // add your custom rules here 77 | rules: { 78 | 'vue/multi-word-component-names': 'off', 79 | 'prefer-promise-reject-errors': 'off', 80 | 81 | // TypeScript 82 | quotes: ['warn', 'single', { avoidEscape: true }], 83 | '@typescript-eslint/explicit-function-return-type': 'off', 84 | '@typescript-eslint/explicit-module-boundary-types': 'off', 85 | 86 | // allow debugger during development only 87 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 88 | }, 89 | }; 90 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .thumbs.db 3 | node_modules 4 | 5 | # Quasar core related directories 6 | .quasar 7 | /dist 8 | 9 | # Cordova related directories and files 10 | /src-cordova/node_modules 11 | /src-cordova/platforms 12 | /src-cordova/plugins 13 | /src-cordova/www 14 | 15 | # Capacitor related directories and files 16 | /src-capacitor/www 17 | /src-capacitor/node_modules 18 | 19 | # BEX related directories and files 20 | /src-bex/www 21 | /src-bex/js/core 22 | 23 | # Log files 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Editor directories and files 29 | .idea 30 | *.suo 31 | *.ntvs* 32 | *.njsproj 33 | *.sln 34 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | plugins: [ 5 | // to edit target browsers: use "browserslist" field in package.json 6 | require('autoprefixer') 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": true 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "editorconfig.editorconfig", 6 | "johnsoncodehk.volar", 7 | "wayou.vscode-todo-highlight" 8 | ], 9 | "unwantedRecommendations": [ 10 | "octref.vetur", 11 | "hookyqr.beautify", 12 | "dbaeumer.jshint", 13 | "ms-vscode.vscode-typescript-tslint-plugin" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.bracketPairColorization.enabled": true, 3 | "editor.guides.bracketPairs": true, 4 | "editor.formatOnSave": true, 5 | "editor.defaultFormatter": "esbenp.prettier-vscode", 6 | "editor.codeActionsOnSave": ["source.fixAll.eslint"], 7 | "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"], 8 | "typescript.tsdk": "node_modules/typescript/lib" 9 | } 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OPQ (panel) 2 | 3 | OPQ RST UVW XYZ 4 | 5 | ## Install the dependencies 6 | ```bash 7 | yarn 8 | ``` 9 | 10 | ### Start the app in development mode (hot-code reloading, error reporting, etc.) 11 | ```bash 12 | quasar dev 13 | ``` 14 | 15 | ### Lint the files 16 | ```bash 17 | yarn run lint 18 | ``` 19 | 20 | ### Build the app for production 21 | ```bash 22 | quasar build 23 | ``` 24 | 25 | ### Customize the configuration 26 | See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-js). 27 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | module.exports = api => { 4 | return { 5 | presets: [ 6 | [ 7 | '@quasar/babel-preset-app', 8 | api.caller(caller => caller && caller.target === 'node') 9 | ? { targets: { node: 'current' } } 10 | : {} 11 | ] 12 | ] 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "panel", 3 | "version": "0.0.1", 4 | "description": "OPQ RST UVW XYZ", 5 | "productName": "OPQ", 6 | "author": "Teeoo ", 7 | "private": true, 8 | "scripts": { 9 | "lint": "eslint --ext .js,.ts,.vue ./", 10 | "test": "echo \"No test specified\" && exit 0" 11 | }, 12 | "dependencies": { 13 | "@quasar/extras": "^1.12.5", 14 | "axios": "^0.26.0", 15 | "core-js": "^3.21.1", 16 | "countup.js": "^2.0.8", 17 | "echarts": "^5.3.0", 18 | "quasar": "^2.5.5", 19 | "socket.io-client": "^2.4.0", 20 | "vue": "^3.2.31", 21 | "vue-echarts": "^6.0.2", 22 | "vue-json-viewer": "3", 23 | "vue-router": "^4.0.12", 24 | "vue3-ace-editor": "^2.2.2" 25 | }, 26 | "devDependencies": { 27 | "@babel/eslint-parser": "^7.17.0", 28 | "@quasar/app": "^3.3.3", 29 | "@types/node": "^17.0.21", 30 | "@types/socket.io-client": "^1.4.32", 31 | "@typescript-eslint/eslint-plugin": "^5.12.1", 32 | "@typescript-eslint/parser": "^5.12.1", 33 | "eslint": "^8.9.0", 34 | "eslint-config-prettier": "^8.4.0", 35 | "eslint-plugin-vue": "^8.5.0" 36 | }, 37 | "browserslist": [ 38 | "last 10 Chrome versions", 39 | "last 10 Firefox versions", 40 | "last 4 Edge versions", 41 | "last 7 Safari versions", 42 | "last 8 Android versions", 43 | "last 8 ChromeAndroid versions", 44 | "last 8 FirefoxAndroid versions", 45 | "last 10 iOS versions", 46 | "last 5 Opera versions" 47 | ], 48 | "engines": { 49 | "node": ">= 12.22.1", 50 | "npm": ">= 6.13.4", 51 | "yarn": ">= 1.21.1" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/favicon.ico -------------------------------------------------------------------------------- /public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-maskable-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/android-chrome-maskable-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-maskable-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/android-chrome-maskable-512x512.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /quasar.conf.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file runs in a Node context (it's NOT transpiled by Babel), so use only 3 | * the ES6 features that are supported by your Node version. https://node.green/ 4 | */ 5 | 6 | // Configuration for your app 7 | // https://quasar.dev/quasar-cli/quasar-conf-js 8 | 9 | /* eslint-env node */ 10 | /* eslint-disable @typescript-eslint/no-var-requires */ 11 | const { configure } = require('quasar/wrappers'); 12 | 13 | module.exports = configure(function (ctx) { 14 | return { 15 | // https://quasar.dev/quasar-cli/supporting-ts 16 | supportTS: { 17 | tsCheckerConfig: { 18 | eslint: { 19 | enabled: true, 20 | files: './src/**/*.{ts,tsx,js,jsx,vue}', 21 | }, 22 | }, 23 | }, 24 | 25 | // https://quasar.dev/quasar-cli/prefetch-feature 26 | // preFetch: true, 27 | 28 | // app boot file (/src/boot) 29 | // --> boot files are part of "main.js" 30 | // https://quasar.dev/quasar-cli/boot-files 31 | boot: ['axios', 'socket'], 32 | 33 | // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css 34 | css: ['app.scss'], 35 | 36 | // https://github.com/quasarframework/quasar/tree/dev/extras 37 | extras: [ 38 | // 'ionicons-v4', 39 | 'mdi-v5', 40 | // 'fontawesome-v5', 41 | // 'eva-icons', 42 | // 'themify', 43 | // 'line-awesome', 44 | // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! 45 | 46 | 'roboto-font', // optional, you are not bound to it 47 | 'material-icons', // optional, you are not bound to it 48 | ], 49 | 50 | // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build 51 | build: { 52 | vueRouterMode: 'hash', // available values: 'hash', 'history' 53 | 54 | // transpile: false, 55 | // publicPath: '/', 56 | 57 | // Add dependencies for transpiling with Babel (Array of string/regex) 58 | // (from node_modules, which are by default not transpiled). 59 | // Applies only if "transpile" is set to true. 60 | // transpileDependencies: [], 61 | 62 | // rtl: true, // https://quasar.dev/options/rtl-support 63 | // preloadChunks: true, 64 | // showProgress: false, 65 | // gzip: true, 66 | // analyze: true, 67 | 68 | // Options below are automatically set depending on the env, set them if you want to override 69 | // extractCSS: false, 70 | 71 | // https://quasar.dev/quasar-cli/handling-webpack 72 | // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain 73 | chainWebpack(/* chain */) { 74 | // 75 | }, 76 | }, 77 | 78 | // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer 79 | devServer: { 80 | server: { 81 | type: 'http', 82 | }, 83 | port: 8080, 84 | open: true, // opens browser window automatically 85 | }, 86 | 87 | // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework 88 | framework: { 89 | config: {}, 90 | 91 | // iconSet: 'material-icons', // Quasar icon set 92 | // lang: 'en-US', // Quasar language pack 93 | 94 | // For special cases outside of where the auto-import strategy can have an impact 95 | // (like functional components as one of the examples), 96 | // you can manually specify Quasar components/directives to be available everywhere: 97 | // 98 | // components: [], 99 | // directives: [], 100 | 101 | // Quasar plugins 102 | plugins: [ 103 | 'Notify', 104 | 'Loading', 105 | 'AddressbarColor', 106 | 'LoadingBar', 107 | 'LocalStorage', 108 | 'SessionStorage', 109 | 'AppFullscreen', 110 | ], 111 | }, 112 | 113 | // animations: 'all', // --- includes all animations 114 | // https://quasar.dev/options/animations 115 | animations: [], 116 | 117 | // https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr 118 | ssr: { 119 | pwa: false, 120 | 121 | // manualStoreHydration: true, 122 | // manualPostHydrationTrigger: true, 123 | 124 | prodPort: 3000, // The default port that the production server should use 125 | // (gets superseded if process.env.PORT is specified at runtime) 126 | 127 | maxAge: 1000 * 60 * 60 * 24 * 30, 128 | // Tell browser when a file from the server should expire from cache (in ms) 129 | 130 | chainWebpackWebserver(/* chain */) { 131 | // 132 | }, 133 | 134 | middlewares: [ 135 | ctx.prod ? 'compression' : '', 136 | 'render', // keep this as last one 137 | ], 138 | }, 139 | 140 | // https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa 141 | pwa: { 142 | workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest' 143 | workboxOptions: {}, // only for GenerateSW 144 | 145 | // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts]) 146 | // if using workbox in InjectManifest mode 147 | chainWebpackCustomSW(/* chain */) { 148 | // 149 | }, 150 | 151 | manifest: { 152 | name: 'OPQ', 153 | short_name: 'OPQ', 154 | description: 'OPQ RST UVW XYZ', 155 | display: 'standalone', 156 | orientation: 'portrait', 157 | background_color: '#ffffff', 158 | theme_color: '#027be3', 159 | icons: [ 160 | { 161 | src: 'icons/icon-128x128.png', 162 | sizes: '128x128', 163 | type: 'image/png', 164 | }, 165 | { 166 | src: 'icons/icon-192x192.png', 167 | sizes: '192x192', 168 | type: 'image/png', 169 | }, 170 | { 171 | src: 'icons/icon-256x256.png', 172 | sizes: '256x256', 173 | type: 'image/png', 174 | }, 175 | { 176 | src: 'icons/icon-384x384.png', 177 | sizes: '384x384', 178 | type: 'image/png', 179 | }, 180 | { 181 | src: 'icons/icon-512x512.png', 182 | sizes: '512x512', 183 | type: 'image/png', 184 | }, 185 | ], 186 | }, 187 | }, 188 | 189 | // Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova 190 | cordova: { 191 | // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing 192 | }, 193 | 194 | // Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor 195 | capacitor: { 196 | hideSplashscreen: true, 197 | }, 198 | 199 | // Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron 200 | electron: { 201 | bundler: 'packager', // 'packager' or 'builder' 202 | 203 | packager: { 204 | // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options 205 | // OS X / Mac App Store 206 | // appBundleId: '', 207 | // appCategoryType: '', 208 | // osxSign: '', 209 | // protocol: 'myapp://path', 210 | // Windows only 211 | // win32metadata: { ... } 212 | }, 213 | 214 | builder: { 215 | // https://www.electron.build/configuration/configuration 216 | 217 | appId: 'panel', 218 | }, 219 | 220 | // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain 221 | chainWebpack(/* chain */) { 222 | // do something with the Electron main process Webpack cfg 223 | // extendWebpackMain also available besides this chainWebpackMain 224 | }, 225 | 226 | // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain 227 | chainWebpackPreload(/* chain */) { 228 | // do something with the Electron main process Webpack cfg 229 | // extendWebpackPreload also available besides this chainWebpackPreload 230 | }, 231 | }, 232 | }; 233 | }); 234 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 11 | -------------------------------------------------------------------------------- /src/boot/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opq-osc/panel/99bb07ee594a9b5662804ad2d844a3281dd9ff54/src/boot/.gitkeep -------------------------------------------------------------------------------- /src/boot/axios.ts: -------------------------------------------------------------------------------- 1 | import { boot } from 'quasar/wrappers'; 2 | import axios, { AxiosError, AxiosInstance, AxiosResponse } from 'axios'; 3 | import { LoadingBar } from 'quasar'; 4 | 5 | declare module '@vue/runtime-core' { 6 | interface ComponentCustomProperties { 7 | $axios: AxiosInstance; 8 | } 9 | } 10 | 11 | // Be careful when using SSR for cross-request state pollution 12 | // due to creating a Singleton instance here; 13 | // If any client changes this (global) instance, it might be a 14 | // good idea to move this instance creation inside of the 15 | // "export default () => {}" function below (which runs individually 16 | // for each client) 17 | const api = axios.create({ baseURL: '/v1/' }); 18 | 19 | api.interceptors.request.use( 20 | async (request) => { 21 | LoadingBar.start(); 22 | return Promise.resolve(request); 23 | }, 24 | async (error) => { 25 | LoadingBar.stop(); 26 | return Promise.reject(error); 27 | } 28 | ); 29 | 30 | api.interceptors.response.use(async (response: AxiosResponse) => { 31 | LoadingBar.stop(); 32 | return Promise.resolve(response.data); 33 | }, 34 | async (error: AxiosError) => { 35 | LoadingBar.stop(); 36 | return Promise.reject(error.response?.data); 37 | } 38 | ); 39 | 40 | 41 | export default boot(({ app }) => { 42 | // for use inside Vue files (Options API) through this.$axios and this.$api 43 | 44 | app.config.globalProperties.$axios = axios; 45 | // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form) 46 | // so you won't necessarily have to import axios in each vue file 47 | 48 | app.config.globalProperties.$api = api; 49 | // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form) 50 | // so you can easily perform requests against your app's API 51 | }); 52 | 53 | export { api }; 54 | -------------------------------------------------------------------------------- /src/boot/socket.ts: -------------------------------------------------------------------------------- 1 | import { Notify } from 'quasar'; 2 | import { boot } from 'quasar/wrappers' 3 | import io from 'socket.io-client' 4 | 5 | export default boot(({ app }) => { 6 | const protocol = location.protocol == 'http:' ? 'ws://' : 'wss://'; 7 | const url = `${protocol}${location.host}` 8 | const ws = io(url, { 9 | upgrade: true, 10 | autoConnect: true, 11 | transports: ['websocket'] 12 | }) 13 | ws.on('connect', () => { 14 | Notify.create({ 15 | progress: true, 16 | position: 'bottom', 17 | message: `成功建立ws连接 ${ws.id}` 18 | }); 19 | }); 20 | app.provide('ws', ws) 21 | }) 22 | -------------------------------------------------------------------------------- /src/components/layout/drawer.vue: -------------------------------------------------------------------------------- 1 | 59 | 106 | -------------------------------------------------------------------------------- /src/components/layout/header.vue: -------------------------------------------------------------------------------- 1 | 31 | 48 | -------------------------------------------------------------------------------- /src/components/widget/card.vue: -------------------------------------------------------------------------------- 1 | 20 | 45 | -------------------------------------------------------------------------------- /src/css/app.scss: -------------------------------------------------------------------------------- 1 | // app global css in SCSS form 2 | -------------------------------------------------------------------------------- /src/css/quasar.variables.scss: -------------------------------------------------------------------------------- 1 | // Quasar SCSS (& Sass) Variables 2 | // -------------------------------------------------- 3 | // To customize the look and feel of this app, you can override 4 | // the Sass/SCSS variables found in Quasar's source Sass/SCSS files. 5 | 6 | // Check documentation for full list of Quasar variables 7 | 8 | // Your own variables (that are declared here) and Quasar's own 9 | // ones will be available out of the box in your .vue/.scss/.sass files 10 | 11 | // It's highly recommended to change the default colors 12 | // to match your app's branding. 13 | // Tip: Use the "Theme Builder" on Quasar's documentation website. 14 | 15 | $primary : #1976D2; 16 | $secondary : #26A69A; 17 | $accent : #9C27B0; 18 | 19 | $dark : #1D1D1D; 20 | 21 | $positive : #21BA45; 22 | $negative : #C10015; 23 | $info : #31CCEC; 24 | $warning : #F2C037; 25 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace NodeJS { 2 | interface ProcessEnv { 3 | NODE_ENV: string; 4 | VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined; 5 | VUE_ROUTER_BASE: string | undefined; 6 | } 7 | } 8 | declare module 'vue-json-viewer'; 9 | -------------------------------------------------------------------------------- /src/index.template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= productName %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /src/layouts/MainLayout.vue: -------------------------------------------------------------------------------- 1 | 84 | 85 | 130 | -------------------------------------------------------------------------------- /src/pages/chat.vue: -------------------------------------------------------------------------------- 1 | 75 | 160 | -------------------------------------------------------------------------------- /src/pages/dashboard.vue: -------------------------------------------------------------------------------- 1 | 114 | 365 | 370 | -------------------------------------------------------------------------------- /src/pages/plugins.vue: -------------------------------------------------------------------------------- 1 | 32 | 68 | -------------------------------------------------------------------------------- /src/quasar.d.ts: -------------------------------------------------------------------------------- 1 | // Forces TS to apply `@quasar/app` augmentations of `quasar` package 2 | // Removing this would break `quasar/wrappers` imports as those typings are declared 3 | // into `@quasar/app` 4 | // As a side effect, since `@quasar/app` reference `quasar` to augment it, 5 | // this declaration also apply `quasar` own 6 | // augmentations (eg. adds `$q` into Vue component context) 7 | /// 8 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { route } from 'quasar/wrappers'; 2 | import { 3 | createMemoryHistory, 4 | createRouter, 5 | createWebHashHistory, 6 | createWebHistory, 7 | } from 'vue-router'; 8 | import routes from './routes'; 9 | 10 | /* 11 | * If not building with SSR mode, you can 12 | * directly export the Router instantiation; 13 | * 14 | * The function below can be async too; either use 15 | * async/await or return a Promise which resolves 16 | * with the Router instance. 17 | */ 18 | 19 | export default route(function (/* { store, ssrContext } */) { 20 | const createHistory = process.env.SERVER 21 | ? createMemoryHistory 22 | : (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory); 23 | 24 | const Router = createRouter({ 25 | scrollBehavior: () => ({ left: 0, top: 0 }), 26 | routes, 27 | 28 | // Leave this as is and make changes in quasar.conf.js instead! 29 | // quasar.conf.js -> build -> vueRouterMode 30 | // quasar.conf.js -> build -> publicPath 31 | history: createHistory( 32 | process.env.MODE === 'ssr' ? void 0 : process.env.VUE_ROUTER_BASE 33 | ), 34 | }); 35 | 36 | return Router; 37 | }); 38 | -------------------------------------------------------------------------------- /src/router/routes.ts: -------------------------------------------------------------------------------- 1 | import { RouteRecordRaw } from 'vue-router'; 2 | 3 | const routes: RouteRecordRaw[] = [ 4 | { 5 | path: '/', 6 | component: () => import('layouts/MainLayout.vue'), 7 | redirect: 'dashboard', 8 | children: [ 9 | { path: 'dashboard', component: () => import('pages/dashboard.vue') }, 10 | { path: 'plugins', component: () => import('pages/plugins.vue') }, 11 | { path: 'chat', component: () => import('pages/chat.vue') }, 12 | ], 13 | }, 14 | ]; 15 | 16 | export default routes; 17 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | // Mocks all files ending in `.vue` showing them as plain Vue instances 2 | /* eslint-disable */ 3 | declare module '*.vue' { 4 | import type { DefineComponent } from 'vue'; 5 | const component: DefineComponent<{}, {}, any>; 6 | export default component; 7 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@quasar/app/tsconfig-preset", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | } 6 | } 7 | --------------------------------------------------------------------------------