diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b639ddd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +[*] +indent_style = space +indent_size = 4 + +[*.sass] +indent_size = 2 + +[*.json] +indent_size = 2 + +[*.yaml] +indent_size = 2 diff --git a/package.json b/package.json index 281a2e0..9e52976 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,15 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", + "serve": "vue-cli-service serve --port 3000", "build": "vue-cli-service build" }, "dependencies": { "core-js": "^3.6.5", "vue": "^3.0.0-0", "vue-router": "^4.0.0-0", - "vuex": "^4.0.0-0" + "vuex": "^4.0.0-0", + "vuex-persist": "^3.1.3" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", @@ -19,6 +20,8 @@ "@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-service": "~4.5.0", "@vue/compiler-sfc": "^3.0.0-0", + "pug": "2.0.4", + "pug-plain-loader": "1.0.0", "sass": "^1.26.5", "sass-loader": "^8.0.2", "typescript": "~3.9.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f917d49..eab36c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,13 +3,16 @@ dependencies: vue: 3.0.0 vue-router: 4.0.0-beta.12_vue@3.0.0 vuex: 4.0.0-beta.4_vue@3.0.0 + vuex-persist: 3.1.3_vuex@4.0.0-beta.4 devDependencies: '@vue/cli-plugin-babel': 4.5.6_@vue+cli-service@4.5.6+vue@3.0.0 '@vue/cli-plugin-router': 4.5.6_@vue+cli-service@4.5.6 '@vue/cli-plugin-typescript': 4.5.6_aad4367e7c82e10ca22fc4a15cb1f747 '@vue/cli-plugin-vuex': 4.5.6_@vue+cli-service@4.5.6 - '@vue/cli-service': 4.5.6_0521301699d431e160df5d1bd3c2a02e + '@vue/cli-service': 4.5.6_3c24ad0de21a253f90051e57049d7938 '@vue/compiler-sfc': 3.0.0_vue@3.0.0 + pug: 2.0.4 + pug-plain-loader: 1.0.0_pug@2.0.4 sass: 1.26.11 sass-loader: 8.0.2_sass@1.26.11 typescript: 3.9.7 @@ -1056,6 +1059,16 @@ packages: dev: true resolution: integrity: sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== + /@types/babel-types/7.0.9: + dev: true + resolution: + integrity: sha512-qZLoYeXSTgQuK1h7QQS16hqLGdmqtRmN8w/rl3Au/l5x/zkHx+a4VHrHyBsi1I1vtK2oBHxSzKIu0R5p6spdOA== + /@types/babylon/6.16.5: + dependencies: + '@types/babel-types': 7.0.9 + dev: true + resolution: + integrity: sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w== /@types/body-parser/1.19.0: dependencies: '@types/connect': 3.4.33 @@ -1344,7 +1357,7 @@ packages: dependencies: '@babel/core': 7.11.6 '@vue/babel-preset-app': 4.5.6_vue@3.0.0 - '@vue/cli-service': 4.5.6_0521301699d431e160df5d1bd3c2a02e + '@vue/cli-service': 4.5.6_3c24ad0de21a253f90051e57049d7938 '@vue/cli-shared-utils': 4.5.6 babel-loader: 8.1.0_d2a654c8b7ff226093b38eb7b56a78a8 cache-loader: 4.1.0_webpack@4.44.2 @@ -1358,7 +1371,7 @@ packages: integrity: sha512-jkeXIpvxg2Og+6igsck6qBMFwFN5poqbgDL7JEQP94DPRMAGt+AOoEz6Ultwvykd9lRDD/xLmzZ2MTeXvrpq4A== /@vue/cli-plugin-router/4.5.6_@vue+cli-service@4.5.6: dependencies: - '@vue/cli-service': 4.5.6_0521301699d431e160df5d1bd3c2a02e + '@vue/cli-service': 4.5.6_3c24ad0de21a253f90051e57049d7938 '@vue/cli-shared-utils': 4.5.6 dev: true peerDependencies: @@ -1368,7 +1381,7 @@ packages: /@vue/cli-plugin-typescript/4.5.6_aad4367e7c82e10ca22fc4a15cb1f747: dependencies: '@types/webpack-env': 1.15.3 - '@vue/cli-service': 4.5.6_0521301699d431e160df5d1bd3c2a02e + '@vue/cli-service': 4.5.6_3c24ad0de21a253f90051e57049d7938 '@vue/cli-shared-utils': 4.5.6 '@vue/compiler-sfc': 3.0.0_vue@3.0.0 cache-loader: 4.1.0_webpack@4.44.2 @@ -1394,13 +1407,13 @@ packages: integrity: sha512-zr/N1hX5gQQjR2BBFJdZPXatyKC9Scaw8vRDUhu6AE8phcQqf81DhRRVHICss9mMt7DTLKEHHjcYgFrotjEaew== /@vue/cli-plugin-vuex/4.5.6_@vue+cli-service@4.5.6: dependencies: - '@vue/cli-service': 4.5.6_0521301699d431e160df5d1bd3c2a02e + '@vue/cli-service': 4.5.6_3c24ad0de21a253f90051e57049d7938 dev: true peerDependencies: '@vue/cli-service': ^3.0.0 || ^4.0.0-0 resolution: integrity: sha512-cWxj0jIhhupU+oFl0mc1St3ig9iF5F01XKwAhKEbvvuHR97zHxLd29My/vvcRwojZMy4aY320oJ+0ljoCIbueQ== - /@vue/cli-service/4.5.6_0521301699d431e160df5d1bd3c2a02e: + /@vue/cli-service/4.5.6_3c24ad0de21a253f90051e57049d7938: dependencies: '@intervolga/optimize-cssnano-plugin': 1.0.6_webpack@4.44.2 '@soda/friendly-errors-webpack-plugin': 1.7.1_webpack@4.44.2 @@ -1447,6 +1460,7 @@ packages: pnp-webpack-plugin: 1.6.4_typescript@3.9.7 portfinder: 1.0.28 postcss-loader: 3.0.0 + pug-plain-loader: 1.0.0_pug@2.0.4 sass-loader: 8.0.2_sass@1.26.11 ssri: 7.1.0 terser-webpack-plugin: 2.3.8_webpack@4.44.2 @@ -1751,12 +1765,32 @@ packages: node: '>= 0.6' resolution: integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + /acorn-globals/3.1.0: + dependencies: + acorn: 4.0.13 + dev: true + resolution: + integrity: sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8= /acorn-walk/7.2.0: dev: true engines: node: '>=0.4.0' resolution: integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + /acorn/3.3.0: + dev: true + engines: + node: '>=0.4.0' + hasBin: true + resolution: + integrity: sha1-ReN/s56No/JbruP/U2niu18iAXo= + /acorn/4.0.13: + dev: true + engines: + node: '>=0.4.0' + hasBin: true + resolution: + integrity: sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= /acorn/6.4.1: dev: true engines: @@ -1811,6 +1845,16 @@ packages: dev: true resolution: integrity: sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag== + /align-text/0.1.4: + dependencies: + kind-of: 3.2.2 + longest: 1.0.1 + repeat-string: 1.6.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= /alphanum-sort/1.0.2: dev: true resolution: @@ -1955,6 +1999,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + /asap/2.0.6: + dev: true + resolution: + integrity: sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= /asn1.js/5.4.1: dependencies: bn.js: 4.11.9 @@ -2073,6 +2121,27 @@ packages: dev: true resolution: integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + /babel-runtime/6.26.0: + dependencies: + core-js: 2.6.11 + regenerator-runtime: 0.11.1 + dev: true + resolution: + integrity: sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + /babel-types/6.26.0: + dependencies: + babel-runtime: 6.26.0 + esutils: 2.0.3 + lodash: 4.17.20 + to-fast-properties: 1.0.3 + dev: true + resolution: + integrity: sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + /babylon/6.18.0: + dev: true + hasBin: true + resolution: + integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== /balanced-match/1.0.0: dev: true resolution: @@ -2453,6 +2522,12 @@ packages: dev: true resolution: integrity: sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= + /camelcase/1.2.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= /camelcase/5.3.1: dev: true engines: @@ -2488,6 +2563,15 @@ packages: dev: true resolution: integrity: sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + /center-align/0.1.3: + dependencies: + align-text: 0.1.4 + lazy-cache: 1.0.4 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-qg0yYptu6XIgBBHL1EYckHvCt60= /chalk/1.1.3: dependencies: ansi-styles: 2.2.1 @@ -2529,6 +2613,12 @@ packages: optional: true resolution: integrity: sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + /character-parser/2.2.0: + dependencies: + is-regex: 1.1.1 + dev: true + resolution: + integrity: sha1-x84o821LzZdE5f/CxfzeHHMmH8A= /check-types/8.0.3: dev: true resolution: @@ -2655,6 +2745,14 @@ packages: node: '>=8' resolution: integrity: sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ== + /cliui/2.1.0: + dependencies: + center-align: 0.1.3 + right-align: 0.1.3 + wordwrap: 0.0.2 + dev: true + resolution: + integrity: sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= /cliui/5.0.0: dependencies: string-width: 3.1.0 @@ -2837,6 +2935,15 @@ packages: node: '>= 0.10.0' resolution: integrity: sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ== + /constantinople/3.1.2: + dependencies: + '@types/babel-types': 7.0.9 + '@types/babylon': 6.16.5 + babel-types: 6.26.0 + babylon: 6.18.0 + dev: true + resolution: + integrity: sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw== /constants-browserify/1.0.0: dev: true resolution: @@ -2917,6 +3024,12 @@ packages: dev: true resolution: integrity: sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng== + /core-js/2.6.11: + deprecated: 'core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.' + dev: true + requiresBuild: true + resolution: + integrity: sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== /core-js/3.6.5: requiresBuild: true resolution: @@ -3282,10 +3395,8 @@ packages: resolution: integrity: sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ== /deepmerge/4.2.2: - dev: true engines: node: '>=0.10.0' - optional: true resolution: integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== /default-gateway/4.2.0: @@ -3424,6 +3535,10 @@ packages: dev: true resolution: integrity: sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= + /doctypes/1.1.0: + dev: true + resolution: + integrity: sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk= /dom-converter/0.2.0: dependencies: utila: 0.4.0 @@ -4029,6 +4144,10 @@ packages: node: '>=8' resolution: integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + /flatted/3.1.0: + dev: false + resolution: + integrity: sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA== /flush-write-stream/1.1.1: dependencies: inherits: 2.0.4 @@ -4945,6 +5064,13 @@ packages: hasBin: true resolution: integrity: sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== + /is-expression/3.0.0: + dependencies: + acorn: 4.0.13 + object-assign: 4.1.1 + dev: true + resolution: + integrity: sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8= /is-extendable/0.1.1: dev: true engines: @@ -5055,6 +5181,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + /is-promise/2.2.2: + dev: true + resolution: + integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== /is-regex/1.1.1: dependencies: has-symbols: 1.0.1 @@ -5172,6 +5302,10 @@ packages: node: '>=1.0.0' resolution: integrity: sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug= + /js-stringify/1.0.2: + dev: true + resolution: + integrity: sha1-Fzb939lyTyijaCrcYjCufk6Weds= /js-tokens/3.0.2: dev: true resolution: @@ -5275,6 +5409,13 @@ packages: '0': node >=0.6.0 resolution: integrity: sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + /jstransformer/1.0.0: + dependencies: + is-promise: 2.2.2 + promise: 7.3.1 + dev: true + resolution: + integrity: sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM= /killable/1.0.1: dev: true resolution: @@ -5320,6 +5461,12 @@ packages: dev: true resolution: integrity: sha512-On+V7K2uZK6wK7x691ycSUbLD/FyKKelArkbaAMSSJU8JmqmhwN2+mnJDNINuJWSrh2L0kDk+ZQtbC/gOWUwLw== + /lazy-cache/1.0.4: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-odePw6UEdMuAhF07O24dpJpEbo4= /leven/3.1.0: dev: true engines: @@ -5436,6 +5583,12 @@ packages: node: '>= 0.6.0' resolution: integrity: sha512-i2sY04nal5jDcagM3FMfG++T69GEEM8CYuOfeOIvmXzOIcwE9a/CJPR0MFM97pYMj/u10lzz7/zd7+qwhrBTqQ== + /longest/1.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= /loose-envify/1.4.0: dependencies: js-tokens: 4.0.0 @@ -6855,6 +7008,12 @@ packages: dev: true resolution: integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM= + /promise/7.3.1: + dependencies: + asap: 2.0.6 + dev: true + resolution: + integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== /proxy-addr/2.0.6: dependencies: forwarded: 0.1.2 @@ -6887,6 +7046,108 @@ packages: dev: true resolution: integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + /pug-attrs/2.0.4: + dependencies: + constantinople: 3.1.2 + js-stringify: 1.0.2 + pug-runtime: 2.0.5 + dev: true + resolution: + integrity: sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ== + /pug-code-gen/2.0.2: + dependencies: + constantinople: 3.1.2 + doctypes: 1.1.0 + js-stringify: 1.0.2 + pug-attrs: 2.0.4 + pug-error: 1.3.3 + pug-runtime: 2.0.5 + void-elements: 2.0.1 + with: 5.1.1 + dev: true + resolution: + integrity: sha512-kROFWv/AHx/9CRgoGJeRSm+4mLWchbgpRzTEn8XCiwwOy6Vh0gAClS8Vh5TEJ9DBjaP8wCjS3J6HKsEsYdvaCw== + /pug-error/1.3.3: + dev: true + resolution: + integrity: sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ== + /pug-filters/3.1.1: + dependencies: + clean-css: 4.2.3 + constantinople: 3.1.2 + jstransformer: 1.0.0 + pug-error: 1.3.3 + pug-walk: 1.1.8 + resolve: 1.17.0 + uglify-js: 2.8.29 + dev: true + resolution: + integrity: sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg== + /pug-lexer/4.1.0: + dependencies: + character-parser: 2.2.0 + is-expression: 3.0.0 + pug-error: 1.3.3 + dev: true + resolution: + integrity: sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA== + /pug-linker/3.0.6: + dependencies: + pug-error: 1.3.3 + pug-walk: 1.1.8 + dev: true + resolution: + integrity: sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg== + /pug-load/2.0.12: + dependencies: + object-assign: 4.1.1 + pug-walk: 1.1.8 + dev: true + resolution: + integrity: sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg== + /pug-parser/5.0.1: + dependencies: + pug-error: 1.3.3 + token-stream: 0.0.1 + dev: true + resolution: + integrity: sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA== + /pug-plain-loader/1.0.0_pug@2.0.4: + dependencies: + loader-utils: 1.4.0 + pug: 2.0.4 + dev: true + peerDependencies: + pug: ^2.0.0 + resolution: + integrity: sha512-mDfq/qvJJ0xdug38mZ1ObW0BQTx9kAHnKqotXC+C00XQkKmsWaMe90JUg/kN4lS6MU7tpVsMZ+rmcnBSPfDtHA== + /pug-runtime/2.0.5: + dev: true + resolution: + integrity: sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw== + /pug-strip-comments/1.0.4: + dependencies: + pug-error: 1.3.3 + dev: true + resolution: + integrity: sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw== + /pug-walk/1.1.8: + dev: true + resolution: + integrity: sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA== + /pug/2.0.4: + dependencies: + pug-code-gen: 2.0.2 + pug-filters: 3.1.1 + pug-lexer: 4.1.0 + pug-linker: 3.0.6 + pug-load: 2.0.12 + pug-parser: 5.0.1 + pug-runtime: 2.0.5 + pug-strip-comments: 1.0.4 + dev: true + resolution: + integrity: sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw== /pump/2.0.1: dependencies: end-of-stream: 1.4.4 @@ -7060,6 +7321,10 @@ packages: dev: true resolution: integrity: sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A== + /regenerator-runtime/0.11.1: + dev: true + resolution: + integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== /regenerator-runtime/0.13.7: dev: true resolution: @@ -7247,6 +7512,14 @@ packages: dev: true resolution: integrity: sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + /right-align/0.1.3: + dependencies: + align-text: 0.1.4 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-YTObci/mo1FWiSENJOFMlhSGE+8= /rimraf/2.7.1: dependencies: glob: 7.1.6 @@ -8074,6 +8347,12 @@ packages: dev: true resolution: integrity: sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + /to-fast-properties/1.0.3: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= /to-fast-properties/2.0.0: engines: node: '>=4' @@ -8121,6 +8400,10 @@ packages: node: '>=0.6' resolution: integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + /token-stream/0.0.1: + dev: true + resolution: + integrity: sha1-zu78cXp2xDFvEm0LnbqlXX598Bo= /toposort/1.0.7: dev: true resolution: @@ -8243,6 +8526,18 @@ packages: hasBin: true resolution: integrity: sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== + /uglify-js/2.8.29: + dependencies: + source-map: 0.5.7 + yargs: 3.10.0 + dev: true + engines: + node: '>=0.8.0' + hasBin: true + optionalDependencies: + uglify-to-browserify: 1.0.2 + resolution: + integrity: sha1-KcVzMUgFe7Th913zW3qcty5qWd0= /uglify-js/3.4.10: dependencies: commander: 2.19.0 @@ -8253,6 +8548,11 @@ packages: hasBin: true resolution: integrity: sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw== + /uglify-to-browserify/1.0.2: + dev: true + optional: true + resolution: + integrity: sha1-bgkk1r2mta/jSeOabWMoUKD4grc= /unicode-canonical-property-names-ecmascript/1.0.4: dev: true engines: @@ -8480,6 +8780,12 @@ packages: dev: true resolution: integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + /void-elements/2.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= /vue-hot-reload-api/2.3.4: dev: true resolution: @@ -8542,6 +8848,16 @@ packages: '@vue/shared': 3.0.0 resolution: integrity: sha512-ZMrAARZ32sGIaYKr7Fk2GZEBh/VhulSrGxcGBiAvbN4fhjl3tuJyNFbbbLFqGjndbLoBW66I2ECq8ICdvkKdJw== + /vuex-persist/3.1.3_vuex@4.0.0-beta.4: + dependencies: + deepmerge: 4.2.2 + flatted: 3.1.0 + vuex: 4.0.0-beta.4_vue@3.0.0 + dev: false + peerDependencies: + vuex: '>=2.5' + resolution: + integrity: sha512-QWOpP4SxmJDC5Y1+0+Yl/F4n7z27syd1St/oP+IYCGe0X0GFio0Zan6kngZFufdIhJm+5dFGDo3VG5kdkCGeRQ== /vuex/4.0.0-beta.4_vue@3.0.0: dependencies: vue: 3.0.0 @@ -8780,6 +9096,25 @@ packages: hasBin: true resolution: integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + /window-size/0.1.0: + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= + /with/5.1.1: + dependencies: + acorn: 3.3.0 + acorn-globals: 3.1.0 + dev: true + resolution: + integrity: sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4= + /wordwrap/0.0.2: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= /worker-farm/1.7.0: dependencies: errno: 0.1.7 @@ -8900,6 +9235,15 @@ packages: node: '>=8' resolution: integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + /yargs/3.10.0: + dependencies: + camelcase: 1.2.1 + cliui: 2.1.0 + decamelize: 1.2.0 + window-size: 0.1.0 + dev: true + resolution: + integrity: sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= /yorkie/2.0.0: dependencies: execa: 0.8.0 @@ -8920,9 +9264,12 @@ specifiers: '@vue/cli-service': ~4.5.0 '@vue/compiler-sfc': ^3.0.0-0 core-js: ^3.6.5 + pug: 2.0.4 + pug-plain-loader: 1.0.0 sass: ^1.26.5 sass-loader: ^8.0.2 typescript: ~3.9.3 vue: ^3.0.0-0 vue-router: ^4.0.0-0 vuex: ^4.0.0-0 + vuex-persist: ^3.1.3 diff --git a/public/img/Dragon_azul.webp b/public/img/Dragon_azul.webp new file mode 100644 index 0000000..4d4a2b1 Binary files /dev/null and b/public/img/Dragon_azul.webp differ diff --git a/public/img/Dragon_blanco.webp b/public/img/Dragon_blanco.webp new file mode 100644 index 0000000..431b70d Binary files /dev/null and b/public/img/Dragon_blanco.webp differ diff --git a/public/img/Dragon_negro.webp b/public/img/Dragon_negro.webp new file mode 100644 index 0000000..56c5eda Binary files /dev/null and b/public/img/Dragon_negro.webp differ diff --git a/public/img/Dragon_rojo.webp b/public/img/Dragon_rojo.webp new file mode 100644 index 0000000..09a8910 Binary files /dev/null and b/public/img/Dragon_rojo.webp differ diff --git a/public/img/Dragon_verde.webp b/public/img/Dragon_verde.webp new file mode 100644 index 0000000..37404b6 Binary files /dev/null and b/public/img/Dragon_verde.webp differ diff --git a/public/index.html b/public/index.html index 4123528..ef1c33d 100644 --- a/public/index.html +++ b/public/index.html @@ -1,17 +1,19 @@ - - + + <%= htmlWebpackPlugin.options.title %> - - - -
- - + + + + + +
+ + diff --git a/src/App.vue b/src/App.vue index 3fa872e..6f52e12 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,30 +1,19 @@ - +}); + + diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 4716a3f..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - diff --git a/src/components/carta.vue b/src/components/carta.vue new file mode 100644 index 0000000..2c8ecaa --- /dev/null +++ b/src/components/carta.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/components/grupo-cartas.vue b/src/components/grupo-cartas.vue new file mode 100644 index 0000000..9581f49 --- /dev/null +++ b/src/components/grupo-cartas.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/components/useDimensions.ts b/src/components/useDimensions.ts new file mode 100644 index 0000000..02a18ff --- /dev/null +++ b/src/components/useDimensions.ts @@ -0,0 +1,23 @@ +import {ref, computed, onMounted, onUnmounted} from "vue"; + +export const useDimensions = () => { + const pH = ref(Math.floor(window.innerHeight / 100)); + const pW = ref(Math.floor(window.innerWidth / 100)); + const phx = computed(() => pH.value + "px"); + const pwx = computed(() => pW.value + "px"); + + const listener = () => { + pH.value = Math.floor(window.innerHeight / 100); + pW.value = Math.floor(window.innerWidth / 100); + }; + + onMounted(() => { + window.addEventListener("resize", listener); + }); + + onUnmounted(() => { + window.removeEventListener("resize", listener); + }); + + return {pH, pW, phx, pwx}; +}; diff --git a/src/main.ts b/src/main.ts index a92f228..bd15d49 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,11 @@ -import { createApp } from 'vue' -import App from './App.vue' -import router from './router' -import store from './store' +import { createApp } from 'vue'; +import App from './App.vue'; +import router from './router'; +import store from './store'; +import "./styles/global.sass"; -createApp(App).use(store).use(router).mount('#app') +// @ts-ignore +createApp(App) + .use(store) + .use(router) + .mount('#app'); diff --git a/src/router/index.ts b/src/router/index.ts index a6021e1..66b2295 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,25 +1,34 @@ -import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router' -import Home from '../views/Home.vue' +import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; +import Inicio from "../views/Inicio/Inicio.vue"; +import Sala from "@/views/Sala/Sala.vue"; +import Juego from "@/views/Juego/Juego.vue"; const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') - } -] + { + path: '/', + name: 'Home', + component: Inicio + }, + { + path: "/sala/:id", + name: "Sala", + component: Sala + }, + { + path: "/juego/:id", + name: "Juego", + component: Juego + }, + { + path: "/ayuda", + name: "Ayuda", + component: () => import(/* webpackChunkName: "ayuda" */ "../views/Ayuda/Ayuda.vue") + } +]; const router = createRouter({ - history: createWebHistory(process.env.BASE_URL), - routes -}) + history: createWebHistory(process.env.BASE_URL), + routes +}); -export default router +export default router; diff --git a/src/store/index.ts b/src/store/index.ts index 5f05f19..8d9de7f 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,12 +1,34 @@ -import { createStore } from 'vuex' +import { createStore } from 'vuex'; +import VuexPersistence from "vuex-persist"; -export default createStore({ - state: { - }, - mutations: { - }, - actions: { - }, - modules: { - } -}) +const vuexLocal = new VuexPersistence({ + storage: window.localStorage +}); + +export interface RiMaJonState { + idUsuario: string | undefined, + nombreUsuario: string | undefined, + modoColor: string +} + +export default createStore({ + state: { + idUsuario: undefined, + nombreUsuario: undefined, + modoColor: "auto" + }, + mutations: { + setIdUsuario(state, id) { + state.idUsuario = id; + }, + setNombreUsuario(state, nombre) { + state.nombreUsuario = nombre; + }, + setModoColor(state, modo) { + state.modoColor = modo; + } + }, + actions: {}, + modules: {}, + plugins: [vuexLocal.plugin] +}); diff --git a/src/styles/global.sass b/src/styles/global.sass new file mode 100644 index 0000000..049d698 --- /dev/null +++ b/src/styles/global.sass @@ -0,0 +1,29 @@ +body + font-family: "Pt Serif", serif + background-color: var(--color-fondo) + color: var(--color-texto) + + +.tema-claro + --color-fondo: #ffffff + --color-texto: #151515 + --color-borde: gray + + +.tema-oscuro + --color-fondo: #151515 + --color-texto: #dedede + --color-borde: #c1c1c1 + + +.tema-automatico + --color-fondo: #ffffff + --color-texto: #151515 + --color-borde: gray + + +@media (prefers-color-scheme: dark) + .tema-automatico + --color-fondo: #151515 + --color-texto: #dedede + --color-borde: #c1c1c1 diff --git a/src/variables.ts b/src/variables.ts new file mode 100644 index 0000000..eb9aaef --- /dev/null +++ b/src/variables.ts @@ -0,0 +1,3 @@ +export const servidor = "0.0.0.0:8080"; // "rimajonb.araozu.dev"; // "0.0.0.0:8080"; // +export const servidorF = `http://${servidor}`; +export const wsServidor = `ws://${servidor}`; diff --git a/src/views/About.vue b/src/views/About.vue deleted file mode 100644 index 3fa2807..0000000 --- a/src/views/About.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/src/views/Ayuda/Ayuda.vue b/src/views/Ayuda/Ayuda.vue new file mode 100644 index 0000000..bc1b941 --- /dev/null +++ b/src/views/Ayuda/Ayuda.vue @@ -0,0 +1,402 @@ + + + + + diff --git a/src/views/Home.vue b/src/views/Home.vue deleted file mode 100644 index 50d8a19..0000000 --- a/src/views/Home.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/src/views/Inicio/Inicio.vue b/src/views/Inicio/Inicio.vue new file mode 100644 index 0000000..adf1beb --- /dev/null +++ b/src/views/Inicio/Inicio.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/views/Inicio/components/crear-sala.vue b/src/views/Inicio/components/crear-sala.vue new file mode 100644 index 0000000..80c7a8a --- /dev/null +++ b/src/views/Inicio/components/crear-sala.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/Inicio/components/crear-usuario.vue b/src/views/Inicio/components/crear-usuario.vue new file mode 100644 index 0000000..7e3ac20 --- /dev/null +++ b/src/views/Inicio/components/crear-usuario.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/views/Inicio/components/entrar-sala.vue b/src/views/Inicio/components/entrar-sala.vue new file mode 100644 index 0000000..df88988 --- /dev/null +++ b/src/views/Inicio/components/entrar-sala.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/views/Juego/Juego.vue b/src/views/Juego/Juego.vue new file mode 100644 index 0000000..936e58c --- /dev/null +++ b/src/views/Juego/Juego.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/views/Juego/components/contenedor-dora.vue b/src/views/Juego/components/contenedor-dora.vue new file mode 100644 index 0000000..dfd9fcd --- /dev/null +++ b/src/views/Juego/components/contenedor-dora.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/views/Juego/components/mano.vue b/src/views/Juego/components/mano.vue new file mode 100644 index 0000000..8135b27 --- /dev/null +++ b/src/views/Juego/components/mano.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/src/views/Sala/Sala.vue b/src/views/Sala/Sala.vue new file mode 100644 index 0000000..1097e2d --- /dev/null +++ b/src/views/Sala/Sala.vue @@ -0,0 +1,128 @@ + + + + +