Skip to content

Commit 0eb7065

Browse files
committed
Update frontend
1 parent 1454296 commit 0eb7065

81 files changed

Lines changed: 7771 additions & 8250 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frontend/.editorconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
root = true
2-
3-
[*]
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
42
charset = utf-8
5-
indent_style = space
63
indent_size = 2
4+
indent_style = space
75
end_of_line = lf
86
insert_final_newline = true
97
trim_trailing_whitespace = true

frontend/.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

frontend/.eslintrc.js

Lines changed: 0 additions & 64 deletions
This file was deleted.

frontend/.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

frontend/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ node_modules
55
# Quasar core related directories
66
.quasar
77
/dist
8+
/quasar.config.*.temporary.compiled*
89

910
# Cordova related directories and files
1011
/src-cordova/node_modules
@@ -27,3 +28,6 @@ yarn-error.log*
2728
*.ntvs*
2829
*.njsproj
2930
*.sln
31+
32+
# local .env files
33+
.env.local*

frontend/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# pnpm-related options
22
shamefully-hoist=true
33
strict-peer-dependencies=false
4+
# to get the latest compatible packages when creating the project https://github.com/pnpm/pnpm/issues/6463
5+
resolution-mode=highest

frontend/.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 100
6+
}

frontend/README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,43 @@
1-
# WebUI (quasar-project)
1+
# Server99 WebUI
22

3-
Web UI for managing libvirt based virtual machines
3+
A Quasar Project
44

55
## Install the dependencies
66

7-
`npm i -g @quasar/cli`
8-
`npm install`
7+
```bash
8+
yarn
9+
# or
10+
npm install
11+
```
912

1013
### Start the app in development mode (hot-code reloading, error reporting, etc.)
1114

12-
- Set `SOCKETIO_ENDPOINT` in `quasar.config.js` correctly
13-
- Set `API_ENDPOINT` in `quasar.config.js` correctly
14-
- Run `quasar dev`
15+
```bash
16+
quasar dev
17+
```
1518

1619
### Lint the files
1720

18-
`npm run lint`
21+
```bash
22+
yarn lint
23+
# or
24+
npm run lint
25+
```
1926

2027
### Format the files
2128

22-
`npm run format`
29+
```bash
30+
yarn format
31+
# or
32+
npm run format
33+
```
2334

2435
### Build the app for production
2536

26-
- Set `PRODUCTION_BACKEND_PORT` in `quasar.config.js` to the port of the backend
27-
- Run `quasar build`
28-
- Place files from dist/spa into backend/static except index.html
29-
- Place index.html into backend/templates
37+
```bash
38+
quasar build
39+
```
40+
41+
### Customize the configuration
42+
43+
See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js).

frontend/eslint.config.js

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import pluginVue from 'eslint-plugin-vue'
4+
import pluginQuasar from '@quasar/app-vite/eslint'
5+
import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'
6+
7+
export default [
8+
{
9+
/**
10+
* Ignore the following files.
11+
* Please note that pluginQuasar.configs.recommended() already ignores
12+
* the "node_modules" folder for you (and all other Quasar project
13+
* relevant folders and files).
14+
*
15+
* ESLint requires "ignores" key to be the only one in this object
16+
*/
17+
// ignores: []
18+
},
19+
20+
...pluginQuasar.configs.recommended(),
21+
js.configs.recommended,
22+
23+
/**
24+
* https://eslint.vuejs.org
25+
*
26+
* pluginVue.configs.base
27+
* -> Settings and rules to enable correct ESLint parsing.
28+
* pluginVue.configs[ 'flat/essential']
29+
* -> base, plus rules to prevent errors or unintended behavior.
30+
* pluginVue.configs["flat/strongly-recommended"]
31+
* -> Above, plus rules to considerably improve code readability and/or dev experience.
32+
* pluginVue.configs["flat/recommended"]
33+
* -> Above, plus rules to enforce subjective community defaults to ensure consistency.
34+
*/
35+
...pluginVue.configs['flat/essential'],
36+
37+
{
38+
languageOptions: {
39+
ecmaVersion: 'latest',
40+
sourceType: 'module',
41+
42+
globals: {
43+
...globals.browser,
44+
...globals.node, // SSR, Electron, config files
45+
process: 'readonly', // process.env.*
46+
ga: 'readonly', // Google Analytics
47+
cordova: 'readonly',
48+
Capacitor: 'readonly',
49+
chrome: 'readonly', // BEX related
50+
browser: 'readonly', // BEX related
51+
},
52+
},
53+
54+
// add your custom rules here
55+
rules: {
56+
'prefer-promise-reject-errors': 'off',
57+
58+
// allow debugger during development only
59+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
60+
},
61+
},
62+
63+
{
64+
files: ['src-pwa/custom-service-worker.js'],
65+
languageOptions: {
66+
globals: {
67+
...globals.serviceworker,
68+
},
69+
},
70+
},
71+
72+
prettierSkipFormatting,
73+
]

frontend/jsconfig.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
11
{
2-
"compilerOptions": {
3-
"baseUrl": ".",
4-
"paths": {
5-
"src/*": ["src/*"],
6-
"app/*": ["*"],
7-
"components/*": ["src/components/*"],
8-
"layouts/*": ["src/layouts/*"],
9-
"pages/*": ["src/pages/*"],
10-
"assets/*": ["src/assets/*"],
11-
"boot/*": ["src/boot/*"],
12-
"stores/*": ["src/stores/*"],
13-
"vue$": ["node_modules/vue/dist/vue.runtime.esm-bundler.js"]
14-
}
15-
},
16-
"exclude": ["dist", ".quasar", "node_modules"]
2+
"extends": "./.quasar/tsconfig.json"
173
}

0 commit comments

Comments
 (0)