commit
742da61016
51 changed files with 10395 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||||
|
root = true |
||||
|
|
||||
|
[*] |
||||
|
charset = utf-8 |
||||
|
indent_style = space |
||||
|
indent_size = 2 |
||||
|
end_of_line = lf |
||||
|
insert_final_newline = true |
||||
|
trim_trailing_whitespace = true |
@ -0,0 +1,7 @@ |
|||||
|
/dist |
||||
|
/src-capacitor |
||||
|
/src-cordova |
||||
|
/.quasar |
||||
|
/node_modules |
||||
|
.eslintrc.cjs |
||||
|
/quasar.config.*.temporary.compiled* |
@ -0,0 +1,77 @@ |
|||||
|
module.exports = { |
||||
|
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy |
||||
|
// This option interrupts the configuration hierarchy at this file |
||||
|
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) |
||||
|
root: true, |
||||
|
|
||||
|
parserOptions: { |
||||
|
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features |
||||
|
}, |
||||
|
|
||||
|
env: { |
||||
|
node: true, |
||||
|
browser: true |
||||
|
}, |
||||
|
|
||||
|
// Rules order is important, please avoid shuffling them |
||||
|
extends: [ |
||||
|
// Base ESLint recommended rules |
||||
|
// 'eslint:recommended', |
||||
|
|
||||
|
// 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/vue3-essential', // Priority A: Essential (Error Prevention) |
||||
|
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) |
||||
|
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) |
||||
|
|
||||
|
'standard' |
||||
|
|
||||
|
], |
||||
|
|
||||
|
plugins: [ |
||||
|
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files |
||||
|
// required to lint *.vue files |
||||
|
'vue', |
||||
|
|
||||
|
], |
||||
|
|
||||
|
globals: { |
||||
|
ga: 'readonly', // Google Analytics |
||||
|
cordova: 'readonly', |
||||
|
__statics: 'readonly', |
||||
|
__QUASAR_SSR__: 'readonly', |
||||
|
__QUASAR_SSR_SERVER__: 'readonly', |
||||
|
__QUASAR_SSR_CLIENT__: 'readonly', |
||||
|
__QUASAR_SSR_PWA__: 'readonly', |
||||
|
process: 'readonly', |
||||
|
Capacitor: 'readonly', |
||||
|
chrome: 'readonly' |
||||
|
}, |
||||
|
|
||||
|
// add your custom rules here |
||||
|
rules: { |
||||
|
|
||||
|
// allow async-await |
||||
|
'generator-star-spacing': 'off', |
||||
|
// allow paren-less arrow functions |
||||
|
'arrow-parens': 'off', |
||||
|
'one-var': 'off', |
||||
|
'no-void': 'off', |
||||
|
'multiline-ternary': 'off', |
||||
|
|
||||
|
'import/first': 'off', |
||||
|
'import/named': 'error', |
||||
|
'import/namespace': 'error', |
||||
|
'import/default': 'error', |
||||
|
'import/export': 'error', |
||||
|
'import/extensions': 'off', |
||||
|
'import/no-unresolved': 'off', |
||||
|
'import/no-extraneous-dependencies': 'off', |
||||
|
|
||||
|
'prefer-promise-reject-errors': 'off', |
||||
|
|
||||
|
// allow debugger during development only |
||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' |
||||
|
} |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
.DS_Store |
||||
|
.thumbs.db |
||||
|
node_modules |
||||
|
|
||||
|
# Quasar core related directories |
||||
|
.quasar |
||||
|
/dist |
||||
|
/quasar.config.*.temporary.compiled* |
||||
|
|
||||
|
# Cordova related directories and files |
||||
|
/src-cordova/node_modules |
||||
|
/src-cordova/platforms |
||||
|
/src-cordova/plugins |
||||
|
/src-cordova/www |
||||
|
|
||||
|
# Capacitor related directories and files |
||||
|
/src-capacitor/www |
||||
|
/src-capacitor/node_modules |
||||
|
|
||||
|
# Log files |
||||
|
npm-debug.log* |
||||
|
yarn-debug.log* |
||||
|
yarn-error.log* |
||||
|
|
||||
|
# Editor directories and files |
||||
|
.idea |
||||
|
*.suo |
||||
|
*.ntvs* |
||||
|
*.njsproj |
||||
|
*.sln |
||||
|
|
||||
|
# local .env files |
||||
|
.env.local* |
||||
|
|
||||
|
pocketbase/pb_data/* |
@ -0,0 +1,5 @@ |
|||||
|
# pnpm-related options |
||||
|
shamefully-hoist=true |
||||
|
strict-peer-dependencies=false |
||||
|
# to get the latest compatible packages when creating the project https://github.com/pnpm/pnpm/issues/6463 |
||||
|
resolution-mode=highest |
@ -0,0 +1,14 @@ |
|||||
|
{ |
||||
|
"recommendations": [ |
||||
|
"dbaeumer.vscode-eslint", |
||||
|
"editorconfig.editorconfig", |
||||
|
"vue.volar", |
||||
|
"wayou.vscode-todo-highlight" |
||||
|
], |
||||
|
"unwantedRecommendations": [ |
||||
|
"octref.vetur", |
||||
|
"hookyqr.beautify", |
||||
|
"dbaeumer.jshint", |
||||
|
"ms-vscode.vscode-typescript-tslint-plugin" |
||||
|
] |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
{ |
||||
|
"editor.bracketPairColorization.enabled": true, |
||||
|
"editor.guides.bracketPairs": true, |
||||
|
"editor.formatOnSave": true, |
||||
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint", |
||||
|
"editor.codeActionsOnSave": [ |
||||
|
"source.fixAll.eslint" |
||||
|
], |
||||
|
"eslint.validate": [ |
||||
|
"javascript", |
||||
|
"javascriptreact", |
||||
|
"typescript", |
||||
|
"vue" |
||||
|
] |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
# Gyoza (gyoza2) |
||||
|
|
||||
|
HFSPlay stock management |
||||
|
|
||||
|
## Install the dependencies |
||||
|
```bash |
||||
|
yarn |
||||
|
# or |
||||
|
npm install |
||||
|
``` |
||||
|
|
||||
|
### Start the app in development mode (hot-code reloading, error reporting, etc.) |
||||
|
```bash |
||||
|
quasar dev |
||||
|
``` |
||||
|
|
||||
|
|
||||
|
### Lint the files |
||||
|
```bash |
||||
|
yarn lint |
||||
|
# or |
||||
|
npm run lint |
||||
|
``` |
||||
|
|
||||
|
|
||||
|
|
||||
|
### Build the app for production |
||||
|
```bash |
||||
|
quasar build |
||||
|
``` |
||||
|
|
||||
|
### Customize the configuration |
||||
|
See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js). |
@ -0,0 +1,21 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<title><%= productName %></title> |
||||
|
|
||||
|
<meta charset="utf-8"> |
||||
|
<meta name="description" content="<%= productDescription %>"> |
||||
|
<meta name="format-detection" content="telephone=no"> |
||||
|
<meta name="msapplication-tap-highlight" content="no"> |
||||
|
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"> |
||||
|
|
||||
|
<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png"> |
||||
|
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png"> |
||||
|
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png"> |
||||
|
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png"> |
||||
|
<link rel="icon" type="image/ico" href="favicon.ico"> |
||||
|
</head> |
||||
|
<body> |
||||
|
<!-- quasar:entry-point --> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,39 @@ |
|||||
|
{ |
||||
|
"compilerOptions": { |
||||
|
"baseUrl": ".", |
||||
|
"paths": { |
||||
|
"src/*": [ |
||||
|
"src/*" |
||||
|
], |
||||
|
"app/*": [ |
||||
|
"*" |
||||
|
], |
||||
|
"components/*": [ |
||||
|
"src/components/*" |
||||
|
], |
||||
|
"layouts/*": [ |
||||
|
"src/layouts/*" |
||||
|
], |
||||
|
"pages/*": [ |
||||
|
"src/pages/*" |
||||
|
], |
||||
|
"assets/*": [ |
||||
|
"src/assets/*" |
||||
|
], |
||||
|
"boot/*": [ |
||||
|
"src/boot/*" |
||||
|
], |
||||
|
"stores/*": [ |
||||
|
"src/stores/*" |
||||
|
], |
||||
|
"vue$": [ |
||||
|
"node_modules/vue/dist/vue.runtime.esm-bundler.js" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
"exclude": [ |
||||
|
"dist", |
||||
|
".quasar", |
||||
|
"node_modules" |
||||
|
] |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,45 @@ |
|||||
|
{ |
||||
|
"name": "gyoza2", |
||||
|
"version": "0.0.1", |
||||
|
"description": "HFSPlay stock management", |
||||
|
"productName": "Gyoza", |
||||
|
"author": "mcarquigny <matthieu.carquigny@gmail.com>", |
||||
|
"private": true, |
||||
|
"scripts": { |
||||
|
"lint": "eslint --ext .js,.vue ./", |
||||
|
"test": "echo \"No test specified\" && exit 0", |
||||
|
"dev": "quasar dev", |
||||
|
"build": "quasar build", |
||||
|
"import-categories": "node ./scripts/import_categories.js", |
||||
|
"import-stock": "node ./scripts/import_stock.js", |
||||
|
"import-history": "node ./scripts/import_history.js", |
||||
|
"import-history-files": "node ./scripts/import_history_files.js" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"@quasar/extras": "^1.16.4", |
||||
|
"axios": "^1.2.1", |
||||
|
"pocketbase": "^0.25.2", |
||||
|
"quasar": "^2.16.0", |
||||
|
"sharp": "^0.33.5", |
||||
|
"vue": "^3.4.18", |
||||
|
"vue-router": "^4.0.12", |
||||
|
"vuex": "^4.0.1" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@quasar/app-vite": "^1.9.0", |
||||
|
"autoprefixer": "^10.4.2", |
||||
|
"eslint": "^8.57.0", |
||||
|
"eslint-config-standard": "^17.0.0", |
||||
|
"eslint-plugin-import": "^2.19.1", |
||||
|
"eslint-plugin-n": "^15.0.0", |
||||
|
"eslint-plugin-promise": "^6.0.0", |
||||
|
"eslint-plugin-vue": "^9.0.0", |
||||
|
"postcss": "^8.4.14", |
||||
|
"vite-plugin-checker": "^0.6.4" |
||||
|
}, |
||||
|
"engines": { |
||||
|
"node": "^20 || ^18 || ^16", |
||||
|
"npm": ">= 6.13.4", |
||||
|
"yarn": ">= 1.21.1" |
||||
|
} |
||||
|
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,17 @@ |
|||||
|
The MIT License (MIT) |
||||
|
Copyright (c) 2022 - present, Gani Georgiev |
||||
|
|
||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
||||
|
and associated documentation files (the "Software"), to deal in the Software without restriction, |
||||
|
including without limitation the rights to use, copy, modify, merge, publish, distribute, |
||||
|
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software |
||||
|
is furnished to do so, subject to the following conditions: |
||||
|
|
||||
|
The above copyright notice and this permission notice shall be included in all copies or |
||||
|
substantial portions of the Software. |
||||
|
|
||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
||||
|
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
@ -0,0 +1,85 @@ |
|||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||
|
migrate((app) => { |
||||
|
const collection = new Collection({ |
||||
|
"createRule": "", |
||||
|
"deleteRule": "", |
||||
|
"fields": [ |
||||
|
{ |
||||
|
"autogeneratePattern": "[a-z0-9]{15}", |
||||
|
"hidden": false, |
||||
|
"id": "text3208210256", |
||||
|
"max": 15, |
||||
|
"min": 15, |
||||
|
"name": "id", |
||||
|
"pattern": "^[a-z0-9]+$", |
||||
|
"presentable": false, |
||||
|
"primaryKey": true, |
||||
|
"required": true, |
||||
|
"system": true, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text1997877400", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "code", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text1579384326", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "name", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "autodate2990389176", |
||||
|
"name": "created", |
||||
|
"onCreate": true, |
||||
|
"onUpdate": false, |
||||
|
"presentable": false, |
||||
|
"system": false, |
||||
|
"type": "autodate" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "autodate3332085495", |
||||
|
"name": "updated", |
||||
|
"onCreate": true, |
||||
|
"onUpdate": true, |
||||
|
"presentable": false, |
||||
|
"system": false, |
||||
|
"type": "autodate" |
||||
|
} |
||||
|
], |
||||
|
"id": "pbc_3292755704", |
||||
|
"indexes": [], |
||||
|
"listRule": "", |
||||
|
"name": "categories", |
||||
|
"system": false, |
||||
|
"type": "base", |
||||
|
"updateRule": "", |
||||
|
"viewRule": "" |
||||
|
}); |
||||
|
|
||||
|
return app.save(collection); |
||||
|
}, (app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3292755704"); |
||||
|
|
||||
|
return app.delete(collection); |
||||
|
}) |
@ -0,0 +1,170 @@ |
|||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||
|
migrate((app) => { |
||||
|
const collection = new Collection({ |
||||
|
"createRule": null, |
||||
|
"deleteRule": null, |
||||
|
"fields": [ |
||||
|
{ |
||||
|
"autogeneratePattern": "[a-z0-9]{15}", |
||||
|
"hidden": false, |
||||
|
"id": "text3208210256", |
||||
|
"max": 15, |
||||
|
"min": 15, |
||||
|
"name": "id", |
||||
|
"pattern": "^[a-z0-9]+$", |
||||
|
"presentable": false, |
||||
|
"primaryKey": true, |
||||
|
"required": true, |
||||
|
"system": true, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "bool2777654405", |
||||
|
"name": "available", |
||||
|
"presentable": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "bool" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text2490651244", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "comment", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "bool3946532403", |
||||
|
"name": "deleted", |
||||
|
"presentable": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "bool" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text1579384326", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "name", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text3479234172", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "owner", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text342834851", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "ref", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text2744374011", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "state", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text2363381545", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "type", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "bool1301941636", |
||||
|
"name": "working", |
||||
|
"presentable": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "bool" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "autodate2990389176", |
||||
|
"name": "created", |
||||
|
"onCreate": true, |
||||
|
"onUpdate": false, |
||||
|
"presentable": false, |
||||
|
"system": false, |
||||
|
"type": "autodate" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "autodate3332085495", |
||||
|
"name": "updated", |
||||
|
"onCreate": true, |
||||
|
"onUpdate": true, |
||||
|
"presentable": false, |
||||
|
"system": false, |
||||
|
"type": "autodate" |
||||
|
} |
||||
|
], |
||||
|
"id": "pbc_2154883211", |
||||
|
"indexes": [ |
||||
|
"CREATE UNIQUE INDEX `idx_2zYk2QimpB` ON `stock` (`ref`)" |
||||
|
], |
||||
|
"listRule": null, |
||||
|
"name": "stock", |
||||
|
"system": false, |
||||
|
"type": "base", |
||||
|
"updateRule": null, |
||||
|
"viewRule": null |
||||
|
}); |
||||
|
|
||||
|
return app.save(collection); |
||||
|
}, (app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_2154883211"); |
||||
|
|
||||
|
return app.delete(collection); |
||||
|
}) |
@ -0,0 +1,115 @@ |
|||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||
|
migrate((app) => { |
||||
|
const collection = new Collection({ |
||||
|
"createRule": null, |
||||
|
"deleteRule": null, |
||||
|
"fields": [ |
||||
|
{ |
||||
|
"autogeneratePattern": "[a-z0-9]{15}", |
||||
|
"hidden": false, |
||||
|
"id": "text3208210256", |
||||
|
"max": 15, |
||||
|
"min": 15, |
||||
|
"name": "id", |
||||
|
"pattern": "^[a-z0-9]+$", |
||||
|
"presentable": false, |
||||
|
"primaryKey": true, |
||||
|
"required": true, |
||||
|
"system": true, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text342834851", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "ref", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text999008199", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "text", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text2375276105", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "user", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"autogeneratePattern": "", |
||||
|
"hidden": false, |
||||
|
"id": "text3309110367", |
||||
|
"max": 0, |
||||
|
"min": 0, |
||||
|
"name": "image", |
||||
|
"pattern": "", |
||||
|
"presentable": false, |
||||
|
"primaryKey": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "autodate2990389176", |
||||
|
"name": "created", |
||||
|
"onCreate": true, |
||||
|
"onUpdate": false, |
||||
|
"presentable": false, |
||||
|
"system": false, |
||||
|
"type": "autodate" |
||||
|
}, |
||||
|
{ |
||||
|
"hidden": false, |
||||
|
"id": "autodate3332085495", |
||||
|
"name": "updated", |
||||
|
"onCreate": true, |
||||
|
"onUpdate": true, |
||||
|
"presentable": false, |
||||
|
"system": false, |
||||
|
"type": "autodate" |
||||
|
} |
||||
|
], |
||||
|
"id": "pbc_3068727201", |
||||
|
"indexes": [ |
||||
|
"CREATE UNIQUE INDEX `idx_hzzU2smrUc` ON `history` (`ref`)" |
||||
|
], |
||||
|
"listRule": null, |
||||
|
"name": "history", |
||||
|
"system": false, |
||||
|
"type": "base", |
||||
|
"updateRule": null, |
||||
|
"viewRule": null |
||||
|
}); |
||||
|
|
||||
|
return app.save(collection); |
||||
|
}, (app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201"); |
||||
|
|
||||
|
return app.delete(collection); |
||||
|
}) |
@ -0,0 +1,24 @@ |
|||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||
|
migrate((app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201") |
||||
|
|
||||
|
// update collection data
|
||||
|
unmarshal({ |
||||
|
"indexes": [ |
||||
|
"CREATE INDEX `idx_hzzU2smrUc` ON `history` (`ref`)" |
||||
|
] |
||||
|
}, collection) |
||||
|
|
||||
|
return app.save(collection) |
||||
|
}, (app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201") |
||||
|
|
||||
|
// update collection data
|
||||
|
unmarshal({ |
||||
|
"indexes": [ |
||||
|
"CREATE UNIQUE INDEX `idx_hzzU2smrUc` ON `history` (`ref`)" |
||||
|
] |
||||
|
}, collection) |
||||
|
|
||||
|
return app.save(collection) |
||||
|
}) |
@ -0,0 +1,26 @@ |
|||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||
|
migrate((app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201") |
||||
|
|
||||
|
// add field
|
||||
|
collection.fields.addAt(5, new Field({ |
||||
|
"hidden": false, |
||||
|
"id": "date2862495610", |
||||
|
"max": "", |
||||
|
"min": "", |
||||
|
"name": "date", |
||||
|
"presentable": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"type": "date" |
||||
|
})) |
||||
|
|
||||
|
return app.save(collection) |
||||
|
}, (app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201") |
||||
|
|
||||
|
// remove field
|
||||
|
collection.fields.removeById("date2862495610") |
||||
|
|
||||
|
return app.save(collection) |
||||
|
}) |
@ -0,0 +1,29 @@ |
|||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||
|
migrate((app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201") |
||||
|
|
||||
|
// add field
|
||||
|
collection.fields.addAt(6, new Field({ |
||||
|
"hidden": false, |
||||
|
"id": "file2124799118", |
||||
|
"maxSelect": 1, |
||||
|
"maxSize": 0, |
||||
|
"mimeTypes": [], |
||||
|
"name": "image_file", |
||||
|
"presentable": false, |
||||
|
"protected": false, |
||||
|
"required": false, |
||||
|
"system": false, |
||||
|
"thumbs": [], |
||||
|
"type": "file" |
||||
|
})) |
||||
|
|
||||
|
return app.save(collection) |
||||
|
}, (app) => { |
||||
|
const collection = app.findCollectionByNameOrId("pbc_3068727201") |
||||
|
|
||||
|
// remove field
|
||||
|
collection.fields.removeById("file2124799118") |
||||
|
|
||||
|
return app.save(collection) |
||||
|
}) |
Binary file not shown.
@ -0,0 +1,27 @@ |
|||||
|
/* eslint-disable */ |
||||
|
// https://github.com/michael-ciniawsky/postcss-load-config |
||||
|
|
||||
|
module.exports = { |
||||
|
plugins: [ |
||||
|
// https://github.com/postcss/autoprefixer |
||||
|
require('autoprefixer')({ |
||||
|
overrideBrowserslist: [ |
||||
|
'last 4 Chrome versions', |
||||
|
'last 4 Firefox versions', |
||||
|
'last 4 Edge versions', |
||||
|
'last 4 Safari versions', |
||||
|
'last 4 Android versions', |
||||
|
'last 4 ChromeAndroid versions', |
||||
|
'last 4 FirefoxAndroid versions', |
||||
|
'last 4 iOS versions' |
||||
|
] |
||||
|
}) |
||||
|
|
||||
|
// https://github.com/elchininet/postcss-rtlcss |
||||
|
// If you want to support RTL css, then |
||||
|
// 1. yarn/npm install postcss-rtlcss |
||||
|
// 2. optionally set quasar.config.js > framework > lang to an RTL language |
||||
|
// 3. uncomment the following line: |
||||
|
// require('postcss-rtlcss') |
||||
|
] |
||||
|
} |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 859 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 9.4 KiB |
@ -0,0 +1,205 @@ |
|||||
|
/* eslint-env node */ |
||||
|
|
||||
|
/* |
||||
|
* This file runs in a Node context (it's NOT transpiled by Babel), so use only |
||||
|
* the ES6 features that are supported by your Node version. https://node.green/
|
||||
|
*/ |
||||
|
|
||||
|
// Configuration for your app
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
|
||||
|
|
||||
|
const { configure } = require('quasar/wrappers') |
||||
|
|
||||
|
module.exports = configure(function (/* ctx */) { |
||||
|
return { |
||||
|
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
|
||||
|
// preFetch: true,
|
||||
|
|
||||
|
// app boot file (/src/boot)
|
||||
|
// --> boot files are part of "main.js"
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/boot-files
|
||||
|
boot: [ |
||||
|
|
||||
|
'axios' |
||||
|
], |
||||
|
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
||||
|
css: [ |
||||
|
'app.scss' |
||||
|
], |
||||
|
|
||||
|
// https://github.com/quasarframework/quasar/tree/dev/extras
|
||||
|
extras: [ |
||||
|
// 'ionicons-v4',
|
||||
|
// 'mdi-v7',
|
||||
|
// 'fontawesome-v6',
|
||||
|
// 'eva-icons',
|
||||
|
// 'themify',
|
||||
|
// '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
|
||||
|
], |
||||
|
|
||||
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
||||
|
build: { |
||||
|
target: { |
||||
|
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], |
||||
|
node: 'node20' |
||||
|
}, |
||||
|
|
||||
|
vueRouterMode: 'hash', // available values: 'hash', 'history'
|
||||
|
// vueRouterBase,
|
||||
|
// vueDevtools,
|
||||
|
// vueOptionsAPI: false,
|
||||
|
|
||||
|
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
|
||||
|
|
||||
|
// publicPath: '/',
|
||||
|
// analyze: true,
|
||||
|
// env: {},
|
||||
|
// rawDefine: {}
|
||||
|
// ignorePublicFolder: true,
|
||||
|
// minify: false,
|
||||
|
// polyfillModulePreload: true,
|
||||
|
// distDir
|
||||
|
|
||||
|
// extendViteConf (viteConf) {},
|
||||
|
// viteVuePluginOptions: {},
|
||||
|
|
||||
|
vitePlugins: [ |
||||
|
['vite-plugin-checker', { |
||||
|
eslint: { |
||||
|
lintCommand: 'eslint "./**/*.{js,mjs,cjs,vue}"' |
||||
|
} |
||||
|
}, { server: false }] |
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
|
||||
|
devServer: { |
||||
|
// https: true
|
||||
|
open: true // opens browser window automatically
|
||||
|
}, |
||||
|
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
||||
|
framework: { |
||||
|
config: {}, |
||||
|
|
||||
|
// iconSet: 'material-icons', // Quasar icon set
|
||||
|
// lang: 'en-US', // Quasar language pack
|
||||
|
|
||||
|
// For special cases outside of where the auto-import strategy 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: [] |
||||
|
}, |
||||
|
|
||||
|
// animations: 'all', // --- includes all animations
|
||||
|
// https://v2.quasar.dev/options/animations
|
||||
|
animations: [], |
||||
|
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
|
||||
|
// sourceFiles: {
|
||||
|
// rootComponent: 'src/App.vue',
|
||||
|
// router: 'src/router/index',
|
||||
|
// store: 'src/store/index',
|
||||
|
// registerServiceWorker: 'src-pwa/register-service-worker',
|
||||
|
// serviceWorker: 'src-pwa/custom-service-worker',
|
||||
|
// pwaManifestFile: 'src-pwa/manifest.json',
|
||||
|
// electronMain: 'src-electron/electron-main',
|
||||
|
// electronPreload: 'src-electron/electron-preload'
|
||||
|
// },
|
||||
|
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
|
||||
|
ssr: { |
||||
|
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
|
||||
|
// will mess up SSR
|
||||
|
|
||||
|
// extendSSRWebserverConf (esbuildConf) {},
|
||||
|
// extendPackageJson (json) {},
|
||||
|
|
||||
|
pwa: false, |
||||
|
|
||||
|
// manualStoreHydration: true,
|
||||
|
// manualPostHydrationTrigger: true,
|
||||
|
|
||||
|
prodPort: 3000, // The default port that the production server should use
|
||||
|
// (gets superseded if process.env.PORT is specified at runtime)
|
||||
|
|
||||
|
middlewares: [ |
||||
|
'render' // keep this as last one
|
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
// https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
|
||||
|
pwa: { |
||||
|
workboxMode: 'generateSW', // or 'injectManifest'
|
||||
|
injectPwaMetaTags: true, |
||||
|
swFilename: 'sw.js', |
||||
|
manifestFilename: 'manifest.json', |
||||
|
useCredentialsForManifestTag: false |
||||
|
// useFilenameHashes: true,
|
||||
|
// extendGenerateSWOptions (cfg) {}
|
||||
|
// extendInjectManifestOptions (cfg) {},
|
||||
|
// extendManifestJson (json) {}
|
||||
|
// extendPWACustomSWConf (esbuildConf) {}
|
||||
|
}, |
||||
|
|
||||
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
|
||||
|
cordova: { |
||||
|
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
|
||||
|
}, |
||||
|
|
||||
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
|
||||
|
capacitor: { |
||||
|
hideSplashscreen: true |
||||
|
}, |
||||
|
|
||||
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
|
||||
|
electron: { |
||||
|
// extendElectronMainConf (esbuildConf)
|
||||
|
// extendElectronPreloadConf (esbuildConf)
|
||||
|
|
||||
|
// specify the debugging port to use for the Electron app when running in development mode
|
||||
|
inspectPort: 5858, |
||||
|
|
||||
|
bundler: 'packager', // 'packager' or 'builder'
|
||||
|
|
||||
|
packager: { |
||||
|
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
|
||||
|
|
||||
|
// OS X / Mac App Store
|
||||
|
// appBundleId: '',
|
||||
|
// appCategoryType: '',
|
||||
|
// osxSign: '',
|
||||
|
// protocol: 'myapp://path',
|
||||
|
|
||||
|
// Windows only
|
||||
|
// win32metadata: { ... }
|
||||
|
}, |
||||
|
|
||||
|
builder: { |
||||
|
// https://www.electron.build/configuration/configuration
|
||||
|
|
||||
|
appId: 'gyoza2' |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
|
||||
|
bex: { |
||||
|
contentScripts: [ |
||||
|
'my-content-script' |
||||
|
] |
||||
|
|
||||
|
// extendBexScriptsConf (esbuildConf) {}
|
||||
|
// extendBexManifestJson (json) {}
|
||||
|
} |
||||
|
} |
||||
|
}) |
@ -0,0 +1,28 @@ |
|||||
|
const PocketBase = require('pocketbase').default |
||||
|
|
||||
|
// Initialize the PocketBase client
|
||||
|
const pb = new PocketBase('http://127.0.0.1:8090') |
||||
|
|
||||
|
async function main () { |
||||
|
try { |
||||
|
// Authenticate as an admin
|
||||
|
await pb.admins.authWithPassword('karkinge@gmail.com', 'PBk4rk1ng3*') // Replace with your admin credentials
|
||||
|
|
||||
|
// Parse JSON file with categories
|
||||
|
const data = require('../../gyoza/database_backups/20250320.json') |
||||
|
console.log(data.categories) |
||||
|
|
||||
|
// Perform some operations, e.g., create a new record in the 'categories' collection
|
||||
|
for (let category of data.categories) { |
||||
|
const newCategory = await pb.collection('categories').create({ |
||||
|
code: category.code, |
||||
|
name: category.name |
||||
|
}) |
||||
|
console.log('New category created:', newCategory) |
||||
|
} |
||||
|
} catch (error) { |
||||
|
console.error('Error:', error) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
main() |
@ -0,0 +1,37 @@ |
|||||
|
const PocketBase = require('pocketbase').default |
||||
|
|
||||
|
// Initialize the PocketBase client
|
||||
|
const pb = new PocketBase('http://127.0.0.1:8090') |
||||
|
|
||||
|
async function main () { |
||||
|
try { |
||||
|
// Authenticate as an admin
|
||||
|
await pb.admins.authWithPassword('karkinge@gmail.com', 'PBk4rk1ng3*') // Replace with your admin credentials
|
||||
|
|
||||
|
// Parse JSON file with categories
|
||||
|
const data = require('../../gyoza/database_backups/20250320.json') |
||||
|
|
||||
|
// Perform some operations, e.g., create a new record in the 'categories' collection
|
||||
|
for (let history of data.history) { |
||||
|
if (!history) continue |
||||
|
if (history.image) { |
||||
|
// Extract the filename from a url like : "https://firebasestorage.googleapis.com/v0/b/gyoza-hfs-stock.appspot.com/o/1678571846485IMG_20230311_225636.jpg?alt=media&token=215c00a8-e873-497f-8f11-b75c7e2fab42"
|
||||
|
const filename = history.image.split('?')[0].split('/').pop() |
||||
|
history.image = filename |
||||
|
} |
||||
|
let newData = { |
||||
|
ref: history.ref, |
||||
|
text: history.text, |
||||
|
user: history.user, |
||||
|
image: history.image, |
||||
|
date: new Date(history.timestamp).toISOString() |
||||
|
} |
||||
|
console.log(newData) |
||||
|
const newHistory = await pb.collection('history').create(newData) |
||||
|
} |
||||
|
} catch (error) { |
||||
|
console.error('Error:', error) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
main() |
@ -0,0 +1,37 @@ |
|||||
|
const PocketBase = require('pocketbase').default |
||||
|
const sharp = require('sharp') |
||||
|
|
||||
|
// Initialize the PocketBase client
|
||||
|
const pb = new PocketBase('http://127.0.0.1:8090') |
||||
|
|
||||
|
async function main () { |
||||
|
try { |
||||
|
// Authenticate as an admin
|
||||
|
await pb.admins.authWithPassword('karkinge@gmail.com', 'PBk4rk1ng3*') // Replace with your admin credentials
|
||||
|
|
||||
|
// Parse JSON file with categories
|
||||
|
const filesPath = '../gyoza/storage/' |
||||
|
|
||||
|
// Get history collection
|
||||
|
const historyCollection = await pb.collection('history').getFullList({ filter: 'image_file = null' }) |
||||
|
for (let hist of historyCollection) { |
||||
|
if (hist.image) { |
||||
|
console.log(hist) |
||||
|
let fullPath = filesPath + hist.image |
||||
|
// Compress the image with a 80% quality
|
||||
|
const compressedImage = await sharp(fullPath) |
||||
|
.resize({ width: 2000, height: 2000, fit: 'inside' }) |
||||
|
.jpeg({ quality: 80 }) |
||||
|
.toBuffer() |
||||
|
|
||||
|
// Create a JS file object from the file's content
|
||||
|
const file = new File([compressedImage], hist.image) |
||||
|
await pb.collection('history').update(hist.id, { image_file: file }) |
||||
|
} |
||||
|
} |
||||
|
} catch (error) { |
||||
|
console.error('Error:', error) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
main() |
@ -0,0 +1,36 @@ |
|||||
|
const PocketBase = require('pocketbase').default |
||||
|
|
||||
|
// Initialize the PocketBase client
|
||||
|
const pb = new PocketBase('http://127.0.0.1:8090') |
||||
|
|
||||
|
async function main () { |
||||
|
try { |
||||
|
// Authenticate as an admin
|
||||
|
await pb.admins.authWithPassword('karkinge@gmail.com', 'PBk4rk1ng3*') // Replace with your admin credentials
|
||||
|
|
||||
|
// Parse JSON file with categories
|
||||
|
const data = require('../../gyoza/database_backups/20250320.json') |
||||
|
console.log('Data ok:', data.categories) |
||||
|
|
||||
|
// Perform some operations, e.g., create a new record in the 'categories' collection
|
||||
|
for (let stock of data.stock) { |
||||
|
if (!stock) continue |
||||
|
const newStock = await pb.collection('stock').create({ |
||||
|
available: stock.available, |
||||
|
comment: stock.comment, |
||||
|
deleted: stock.deleted, |
||||
|
name: stock.name, |
||||
|
owner: stock.owner, |
||||
|
ref: stock.ref, |
||||
|
state: stock.state, |
||||
|
type: stock.type, |
||||
|
working: stock.working |
||||
|
}) |
||||
|
console.log('New stock created:', newStock) |
||||
|
} |
||||
|
} catch (error) { |
||||
|
console.error('Error:', error) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
main() |
@ -0,0 +1,11 @@ |
|||||
|
<template> |
||||
|
<router-view /> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { defineComponent } from 'vue' |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
name: 'App' |
||||
|
}) |
||||
|
</script> |
After Width: | Height: | Size: 4.4 KiB |
@ -0,0 +1,24 @@ |
|||||
|
import { boot } from 'quasar/wrappers' |
||||
|
import axios from 'axios' |
||||
|
|
||||
|
// Be careful when using SSR for cross-request state pollution
|
||||
|
// due to creating a Singleton instance here;
|
||||
|
// If any client changes this (global) instance, it might be a
|
||||
|
// good idea to move this instance creation inside of the
|
||||
|
// "export default () => {}" function below (which runs individually
|
||||
|
// for each client)
|
||||
|
const api = axios.create({ baseURL: 'https://api.example.com' }) |
||||
|
|
||||
|
export default boot(({ app }) => { |
||||
|
// for use inside Vue files (Options API) through this.$axios and this.$api
|
||||
|
|
||||
|
app.config.globalProperties.$axios = axios |
||||
|
// ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
|
||||
|
// so you won't necessarily have to import axios in each vue file
|
||||
|
|
||||
|
app.config.globalProperties.$api = api |
||||
|
// ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
|
||||
|
// so you can easily perform requests against your app's API
|
||||
|
}) |
||||
|
|
||||
|
export { api } |
@ -0,0 +1,49 @@ |
|||||
|
<template> |
||||
|
<q-item |
||||
|
clickable |
||||
|
tag="a" |
||||
|
target="_blank" |
||||
|
:href="link" |
||||
|
> |
||||
|
<q-item-section |
||||
|
v-if="icon" |
||||
|
avatar |
||||
|
> |
||||
|
<q-icon :name="icon" /> |
||||
|
</q-item-section> |
||||
|
|
||||
|
<q-item-section> |
||||
|
<q-item-label>{{ title }}</q-item-label> |
||||
|
<q-item-label caption>{{ caption }}</q-item-label> |
||||
|
</q-item-section> |
||||
|
</q-item> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { defineComponent } from 'vue' |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
name: 'EssentialLink', |
||||
|
props: { |
||||
|
title: { |
||||
|
type: String, |
||||
|
required: true |
||||
|
}, |
||||
|
|
||||
|
caption: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
|
||||
|
link: { |
||||
|
type: String, |
||||
|
default: '#' |
||||
|
}, |
||||
|
|
||||
|
icon: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
</script> |
@ -0,0 +1 @@ |
|||||
|
// app global css in SCSS form |
@ -0,0 +1,25 @@ |
|||||
|
// Quasar SCSS (& Sass) Variables |
||||
|
// -------------------------------------------------- |
||||
|
// To customize the look and feel of this app, you can override |
||||
|
// the Sass/SCSS variables found in Quasar's source Sass/SCSS files. |
||||
|
|
||||
|
// Check documentation for full list of Quasar variables |
||||
|
|
||||
|
// Your own variables (that are declared here) and Quasar's own |
||||
|
// ones will be available out of the box in your .vue/.scss/.sass files |
||||
|
|
||||
|
// It's highly recommended to change the default colors |
||||
|
// to match your app's branding. |
||||
|
// Tip: Use the "Theme Builder" on Quasar's documentation website. |
||||
|
|
||||
|
$primary : #1976D2; |
||||
|
$secondary : #26A69A; |
||||
|
$accent : #9C27B0; |
||||
|
|
||||
|
$dark : #1D1D1D; |
||||
|
$dark-page : #121212; |
||||
|
|
||||
|
$positive : #21BA45; |
||||
|
$negative : #C10015; |
||||
|
$info : #31CCEC; |
||||
|
$warning : #F2C037; |
@ -0,0 +1,117 @@ |
|||||
|
<template> |
||||
|
<q-layout view="lHh Lpr lFf"> |
||||
|
<q-header elevated> |
||||
|
<q-toolbar> |
||||
|
<q-btn |
||||
|
flat |
||||
|
dense |
||||
|
round |
||||
|
icon="menu" |
||||
|
aria-label="Menu" |
||||
|
@click="toggleLeftDrawer" |
||||
|
/> |
||||
|
|
||||
|
<q-toolbar-title> |
||||
|
Quasar App |
||||
|
</q-toolbar-title> |
||||
|
|
||||
|
<div>Quasar v{{ $q.version }}</div> |
||||
|
</q-toolbar> |
||||
|
</q-header> |
||||
|
|
||||
|
<q-drawer |
||||
|
v-model="leftDrawerOpen" |
||||
|
show-if-above |
||||
|
bordered |
||||
|
> |
||||
|
<q-list> |
||||
|
<q-item-label |
||||
|
header |
||||
|
> |
||||
|
Essential Links |
||||
|
</q-item-label> |
||||
|
|
||||
|
<EssentialLink |
||||
|
v-for="link in linksList" |
||||
|
:key="link.title" |
||||
|
v-bind="link" |
||||
|
/> |
||||
|
</q-list> |
||||
|
</q-drawer> |
||||
|
|
||||
|
<q-page-container> |
||||
|
<router-view /> |
||||
|
</q-page-container> |
||||
|
</q-layout> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { defineComponent, ref } from 'vue' |
||||
|
import EssentialLink from 'components/EssentialLink.vue' |
||||
|
|
||||
|
const linksList = [ |
||||
|
{ |
||||
|
title: 'Docs', |
||||
|
caption: 'quasar.dev', |
||||
|
icon: 'school', |
||||
|
link: 'https://quasar.dev' |
||||
|
}, |
||||
|
{ |
||||
|
title: 'Github', |
||||
|
caption: 'github.com/quasarframework', |
||||
|
icon: 'code', |
||||
|
link: 'https://github.com/quasarframework' |
||||
|
}, |
||||
|
{ |
||||
|
title: 'Discord Chat Channel', |
||||
|
caption: 'chat.quasar.dev', |
||||
|
icon: 'chat', |
||||
|
link: 'https://chat.quasar.dev' |
||||
|
}, |
||||
|
{ |
||||
|
title: 'Forum', |
||||
|
caption: 'forum.quasar.dev', |
||||
|
icon: 'record_voice_over', |
||||
|
link: 'https://forum.quasar.dev' |
||||
|
}, |
||||
|
{ |
||||
|
title: 'Twitter', |
||||
|
caption: '@quasarframework', |
||||
|
icon: 'rss_feed', |
||||
|
link: 'https://twitter.quasar.dev' |
||||
|
}, |
||||
|
{ |
||||
|
title: 'Facebook', |
||||
|
caption: '@QuasarFramework', |
||||
|
icon: 'public', |
||||
|
link: 'https://facebook.quasar.dev' |
||||
|
}, |
||||
|
{ |
||||
|
title: 'Quasar Awesome', |
||||
|
caption: 'Community Quasar projects', |
||||
|
icon: 'favorite', |
||||
|
link: 'https://awesome.quasar.dev' |
||||
|
} |
||||
|
] |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
name: 'MainLayout', |
||||
|
|
||||
|
components: { |
||||
|
EssentialLink |
||||
|
}, |
||||
|
|
||||
|
data () { |
||||
|
return { |
||||
|
linksList, |
||||
|
leftDrawerOpen: false |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
toggleLeftDrawer () { |
||||
|
this.leftDrawerOpen = !this.leftDrawerOpen |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
</script> |
@ -0,0 +1,31 @@ |
|||||
|
<template> |
||||
|
<div class="fullscreen bg-blue text-white text-center q-pa-md flex flex-center"> |
||||
|
<div> |
||||
|
<div style="font-size: 30vh"> |
||||
|
404 |
||||
|
</div> |
||||
|
|
||||
|
<div class="text-h2" style="opacity:.4"> |
||||
|
Oops. Nothing here... |
||||
|
</div> |
||||
|
|
||||
|
<q-btn |
||||
|
class="q-mt-xl" |
||||
|
color="white" |
||||
|
text-color="blue" |
||||
|
unelevated |
||||
|
to="/" |
||||
|
label="Go Home" |
||||
|
no-caps |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { defineComponent } from 'vue' |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
name: 'ErrorNotFound' |
||||
|
}) |
||||
|
</script> |
@ -0,0 +1,17 @@ |
|||||
|
<template> |
||||
|
<q-page class="flex flex-center"> |
||||
|
<img |
||||
|
alt="Quasar logo" |
||||
|
src="~assets/quasar-logo-vertical.svg" |
||||
|
style="width: 200px; height: 200px" |
||||
|
> |
||||
|
</q-page> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { defineComponent } from 'vue' |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
name: 'IndexPage' |
||||
|
}) |
||||
|
</script> |
@ -0,0 +1,30 @@ |
|||||
|
import { route } from 'quasar/wrappers' |
||||
|
import { createRouter, createMemoryHistory, createWebHistory, createWebHashHistory } from 'vue-router' |
||||
|
import routes from './routes' |
||||
|
|
||||
|
/* |
||||
|
* If not building with SSR mode, you can |
||||
|
* directly export the Router instantiation; |
||||
|
* |
||||
|
* The function below can be async too; either use |
||||
|
* async/await or return a Promise which resolves |
||||
|
* with the Router instance. |
||||
|
*/ |
||||
|
|
||||
|
export default route(function (/* { store, ssrContext } */) { |
||||
|
const createHistory = process.env.SERVER |
||||
|
? createMemoryHistory |
||||
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory) |
||||
|
|
||||
|
const Router = createRouter({ |
||||
|
scrollBehavior: () => ({ left: 0, top: 0 }), |
||||
|
routes, |
||||
|
|
||||
|
// Leave this as is and make changes in quasar.conf.js instead!
|
||||
|
// quasar.conf.js -> build -> vueRouterMode
|
||||
|
// quasar.conf.js -> build -> publicPath
|
||||
|
history: createHistory(process.env.VUE_ROUTER_BASE) |
||||
|
}) |
||||
|
|
||||
|
return Router |
||||
|
}) |
@ -0,0 +1,18 @@ |
|||||
|
const routes = [ |
||||
|
{ |
||||
|
path: '/', |
||||
|
component: () => import('layouts/MainLayout.vue'), |
||||
|
children: [ |
||||
|
{ path: '', component: () => import('pages/IndexPage.vue') } |
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
// Always leave this as last one,
|
||||
|
// but you can also remove it
|
||||
|
{ |
||||
|
path: '/:catchAll(.*)*', |
||||
|
component: () => import('pages/ErrorNotFound.vue') |
||||
|
} |
||||
|
] |
||||
|
|
||||
|
export default routes |
@ -0,0 +1,27 @@ |
|||||
|
import { store } from 'quasar/wrappers' |
||||
|
import { createStore } from 'vuex' |
||||
|
|
||||
|
// import example from './module-example'
|
||||
|
|
||||
|
/* |
||||
|
* If not building with SSR mode, you can |
||||
|
* directly export the Store instantiation; |
||||
|
* |
||||
|
* The function below can be async too; either use |
||||
|
* async/await or return a Promise which resolves |
||||
|
* with the Store instance. |
||||
|
*/ |
||||
|
|
||||
|
export default store(function (/* { ssrContext } */) { |
||||
|
const Store = createStore({ |
||||
|
modules: { |
||||
|
// example
|
||||
|
}, |
||||
|
|
||||
|
// enable strict mode (adds overhead!)
|
||||
|
// for dev mode and --debug builds only
|
||||
|
strict: process.env.DEBUGGING |
||||
|
}) |
||||
|
|
||||
|
return Store |
||||
|
}) |
@ -0,0 +1,2 @@ |
|||||
|
export function someAction (/* context */) { |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
export function someGetter (/* state */) { |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
import state from './state' |
||||
|
import * as getters from './getters' |
||||
|
import * as mutations from './mutations' |
||||
|
import * as actions from './actions' |
||||
|
|
||||
|
export default { |
||||
|
namespaced: true, |
||||
|
getters, |
||||
|
mutations, |
||||
|
actions, |
||||
|
state |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
export function someMutation (/* state */) { |
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
export default function () { |
||||
|
return { |
||||
|
//
|
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
/* eslint-disable */ |
||||
|
// THIS FEATURE-FLAG FILE IS AUTOGENERATED,
|
||||
|
// REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
|
||||
|
import "quasar/dist/types/feature-flag"; |
||||
|
|
||||
|
declare module "quasar/dist/types/feature-flag" { |
||||
|
interface QuasarFeatureFlags { |
||||
|
store: true; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue