diff --git a/Core/Client/bun.lock b/Core/Client/bun.lock index 1ecdc14..ac3de86 100644 --- a/Core/Client/bun.lock +++ b/Core/Client/bun.lock @@ -4,7 +4,7 @@ "": { "name": "client", "dependencies": { - "@primevue/forms": "^4.3.6", + "@primevue/forms": "^4.3.9", "@tailwindcss/vite": "^4.1.11", "axios": "^1.10.0", "oh-vue-icons": "^1.0.0-rc3", @@ -16,6 +16,7 @@ "vite-plugin-vue-layouts-next": "^1.0.0", "vue": "^3.4.29", "vue-router": "4", + "yup": "^1.7.1", }, "devDependencies": { "@rushstack/eslint-patch": "^1.8.0", @@ -127,11 +128,11 @@ "@primeuix/styles": ["@primeuix/styles@1.2.1", "", { "dependencies": { "@primeuix/styled": "^0.7.0" } }, "sha512-Tri7pPgZgxrVmhJG8ijZZFolQ6vu27xnkGoAB9EFY8YlaKTM5iqkWzEcqdxy2KmgFWMXi+BrPHwO0RdQ6JCT+g=="], - "@primeuix/utils": ["@primeuix/utils@0.6.0", "", {}, "sha512-ULpB87ImNAiX36OMtyDeRceWB7N/mVlh6gGLqp/lx8UMKZlLIQH/UAFND86hYXHwNpXeNKcWfMGreb0Oc0hcZA=="], + "@primeuix/utils": ["@primeuix/utils@0.6.1", "", {}, "sha512-tQL/ZOPgCdD+NTimlUmhyD0ey8J1XmpZE4hDHM+/fnuBicVVmlKOd5HpS748LcOVRUKbWjmEPdHX4hi5XZoC1Q=="], - "@primevue/core": ["@primevue/core@4.3.6", "", { "dependencies": { "@primeuix/styled": "^0.7.0", "@primeuix/utils": "^0.6.0" }, "peerDependencies": { "vue": "^3.5.0" } }, "sha512-ZuP0gqpEbIkpz9Em/O4Du+fRj0qyOl2YYuxhlELAtRg8+YkMsSJDd2ai2GM623sYRWOIwMr5rWevZGB1WqukzQ=="], + "@primevue/core": ["@primevue/core@4.3.9", "", { "dependencies": { "@primeuix/styled": "^0.7.2", "@primeuix/utils": "^0.6.1" }, "peerDependencies": { "vue": "^3.5.0" } }, "sha512-P08MhVD8WrldbropVuiG25ku6il+v+cKKrspES6RijDc4NE/CrGMAwOlrdpOkpy7pcfTzqC9eIGBx5ifS28S5g=="], - "@primevue/forms": ["@primevue/forms@4.3.6", "", { "dependencies": { "@primeuix/forms": "^0.1.0", "@primeuix/utils": "^0.6.0", "@primevue/core": "4.3.6" } }, "sha512-IRYASPRjGAhOGIe3kkEPhFcuSDTnjiAf/qHLWgF33pqBXCE0C9JdPXMiVbWGqDbQDtS713N/DhS2zbUyRNWwBA=="], + "@primevue/forms": ["@primevue/forms@4.3.9", "", { "dependencies": { "@primeuix/forms": "^0.1.0", "@primeuix/utils": "^0.6.1", "@primevue/core": "4.3.9" } }, "sha512-j/GGxFwpfzP3kdxpfxezmsWohmFjoiNHTZlDxGwrNBGrXfb9GExghgoPPKc0K4OeAX5enufS+g8YGqcglABHAQ=="], "@primevue/icons": ["@primevue/icons@4.3.6", "", { "dependencies": { "@primeuix/utils": "^0.6.0", "@primevue/core": "4.3.6" } }, "sha512-QVFmfikMpo4/DObMSbB5kS8MH1OoQrx8N9prEZaMvfFzD3hixxK24l2VrcS5x5/0NnP3szwZwTCmEAutCygX6A=="], @@ -601,6 +602,8 @@ "primevue": ["primevue@4.3.6", "", { "dependencies": { "@primeuix/styled": "^0.7.0", "@primeuix/styles": "^1.2.0", "@primeuix/utils": "^0.6.0", "@primevue/core": "4.3.6", "@primevue/icons": "4.3.6" } }, "sha512-Wwg2dH6pBmOdkj9L/OnrCQf9AKPHfY5CcfnDyWeh0tNlR+XjYKGl8qvMdJOvGO9jjg6UdsX5MSaU8vDDsSG+sg=="], + "property-expr": ["property-expr@2.0.6", "", {}, "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA=="], + "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], @@ -661,13 +664,17 @@ "text-table": ["text-table@0.2.0", "", {}, "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw=="], + "tiny-case": ["tiny-case@1.0.3", "", {}, "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q=="], + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + "toposort": ["toposort@2.0.2", "", {}, "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg=="], + "ts-api-utils": ["ts-api-utils@1.4.3", "", { "peerDependencies": { "typescript": ">=4.2.0" } }, "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw=="], "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], - "type-fest": ["type-fest@0.20.2", "", {}, "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ=="], + "type-fest": ["type-fest@2.19.0", "", {}, "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="], "typescript": ["typescript@5.4.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ=="], @@ -717,6 +724,18 @@ "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + "yup": ["yup@1.7.1", "", { "dependencies": { "property-expr": "^2.0.5", "tiny-case": "^1.0.3", "toposort": "^2.0.2", "type-fest": "^2.19.0" } }, "sha512-GKHFX2nXul2/4Dtfxhozv701jLQHdf6J34YDh2cEkpqoo8le5Mg6/LrdseVLrFarmFygZTlfIhHx/QKfb/QWXw=="], + + "@primeuix/forms/@primeuix/utils": ["@primeuix/utils@0.6.0", "", {}, "sha512-ULpB87ImNAiX36OMtyDeRceWB7N/mVlh6gGLqp/lx8UMKZlLIQH/UAFND86hYXHwNpXeNKcWfMGreb0Oc0hcZA=="], + + "@primeuix/styled/@primeuix/utils": ["@primeuix/utils@0.6.0", "", {}, "sha512-ULpB87ImNAiX36OMtyDeRceWB7N/mVlh6gGLqp/lx8UMKZlLIQH/UAFND86hYXHwNpXeNKcWfMGreb0Oc0hcZA=="], + + "@primevue/core/@primeuix/styled": ["@primeuix/styled@0.7.3", "", { "dependencies": { "@primeuix/utils": "^0.6.1" } }, "sha512-qAzefzODuYZRaEh2b2uTJCtaT+qUMAt1WPCZhYgkbLUVQ8qt7hFL5BjTsqqCaiBWZCZtDkGmKhP19SRIL6hAlQ=="], + + "@primevue/icons/@primeuix/utils": ["@primeuix/utils@0.6.0", "", {}, "sha512-ULpB87ImNAiX36OMtyDeRceWB7N/mVlh6gGLqp/lx8UMKZlLIQH/UAFND86hYXHwNpXeNKcWfMGreb0Oc0hcZA=="], + + "@primevue/icons/@primevue/core": ["@primevue/core@4.3.6", "", { "dependencies": { "@primeuix/styled": "^0.7.0", "@primeuix/utils": "^0.6.0" }, "peerDependencies": { "vue": "^3.5.0" } }, "sha512-ZuP0gqpEbIkpz9Em/O4Du+fRj0qyOl2YYuxhlELAtRg8+YkMsSJDd2ai2GM623sYRWOIwMr5rWevZGB1WqukzQ=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.4.5", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.4", "tslib": "^2.4.0" }, "bundled": true }, "sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.4.5", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg=="], @@ -755,6 +774,8 @@ "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + "globals/type-fest": ["type-fest@0.20.2", "", {}, "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ=="], + "globby/fast-glob": ["fast-glob@3.3.2", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" } }, "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow=="], "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], @@ -763,6 +784,10 @@ "npm-run-all2/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + "primevue/@primeuix/utils": ["@primeuix/utils@0.6.0", "", {}, "sha512-ULpB87ImNAiX36OMtyDeRceWB7N/mVlh6gGLqp/lx8UMKZlLIQH/UAFND86hYXHwNpXeNKcWfMGreb0Oc0hcZA=="], + + "primevue/@primevue/core": ["@primevue/core@4.3.6", "", { "dependencies": { "@primeuix/styled": "^0.7.0", "@primeuix/utils": "^0.6.0" }, "peerDependencies": { "vue": "^3.5.0" } }, "sha512-ZuP0gqpEbIkpz9Em/O4Du+fRj0qyOl2YYuxhlELAtRg8+YkMsSJDd2ai2GM623sYRWOIwMr5rWevZGB1WqukzQ=="], + "unplugin/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], "vite-plugin-vue-layouts-next/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], diff --git a/Core/Client/package-lock.json b/Core/Client/package-lock.json index fd0744a..5fc6c33 100644 --- a/Core/Client/package-lock.json +++ b/Core/Client/package-lock.json @@ -8,7 +8,7 @@ "name": "client", "version": "0.0.0", "dependencies": { - "@primevue/forms": "^4.3.6", + "@primevue/forms": "^4.3.9", "@tailwindcss/vite": "^4.1.11", "axios": "^1.10.0", "oh-vue-icons": "^1.0.0-rc3", @@ -19,7 +19,8 @@ "tailwindcss-primeui": "^0.6.1", "vite-plugin-vue-layouts-next": "^1.0.0", "vue": "^3.4.29", - "vue-router": "4" + "vue-router": "4", + "yup": "^1.7.1" }, "devDependencies": { "@rushstack/eslint-patch": "^1.8.0", @@ -754,23 +755,23 @@ } }, "node_modules/@primevue/forms": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@primevue/forms/-/forms-4.3.7.tgz", - "integrity": "sha512-Hk52vSDZskMqJlwBiKmfjYtUL3lvTs4C4456OV7CeI++8ah094kuwlJsOulgAeYw9P2hzCoOrnMS4SoL3F3j6w==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/@primevue/forms/-/forms-4.3.9.tgz", + "integrity": "sha512-j/GGxFwpfzP3kdxpfxezmsWohmFjoiNHTZlDxGwrNBGrXfb9GExghgoPPKc0K4OeAX5enufS+g8YGqcglABHAQ==", "license": "MIT", "dependencies": { "@primeuix/forms": "^0.1.0", "@primeuix/utils": "^0.6.1", - "@primevue/core": "4.3.7" + "@primevue/core": "4.3.9" }, "engines": { "node": ">=12.11.0" } }, "node_modules/@primevue/forms/node_modules/@primevue/core": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@primevue/core/-/core-4.3.7.tgz", - "integrity": "sha512-rYmEZTKs/C2Re+xFluY9R02+n4TcyJshooPPOG6zc23v/bmhrfcqCiS5gNiuXF/lYoOh4y8VTcHF6eZCZW724Q==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/@primevue/core/-/core-4.3.9.tgz", + "integrity": "sha512-P08MhVD8WrldbropVuiG25ku6il+v+cKKrspES6RijDc4NE/CrGMAwOlrdpOkpy7pcfTzqC9eIGBx5ifS28S5g==", "license": "MIT", "dependencies": { "@primeuix/styled": "^0.7.2", @@ -4099,6 +4100,12 @@ "node": ">=12.11.0" } }, + "node_modules/property-expr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", + "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==", + "license": "MIT" + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -4476,6 +4483,12 @@ "dev": true, "license": "MIT" }, + "node_modules/tiny-case": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", + "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==", + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4488,6 +4501,12 @@ "node": ">=8.0" } }, + "node_modules/toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==", + "license": "MIT" + }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -4942,6 +4961,30 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/yup": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/yup/-/yup-1.7.1.tgz", + "integrity": "sha512-GKHFX2nXul2/4Dtfxhozv701jLQHdf6J34YDh2cEkpqoo8le5Mg6/LrdseVLrFarmFygZTlfIhHx/QKfb/QWXw==", + "license": "MIT", + "dependencies": { + "property-expr": "^2.0.5", + "tiny-case": "^1.0.3", + "toposort": "^2.0.2", + "type-fest": "^2.19.0" + } + }, + "node_modules/yup/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/Core/Client/package.json b/Core/Client/package.json index 5f79289..550933e 100644 --- a/Core/Client/package.json +++ b/Core/Client/package.json @@ -12,7 +12,7 @@ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" }, "dependencies": { - "@primevue/forms": "^4.3.6", + "@primevue/forms": "^4.3.9", "@tailwindcss/vite": "^4.1.11", "axios": "^1.10.0", "oh-vue-icons": "^1.0.0-rc3", @@ -23,7 +23,8 @@ "tailwindcss-primeui": "^0.6.1", "vite-plugin-vue-layouts-next": "^1.0.0", "vue": "^3.4.29", - "vue-router": "4" + "vue-router": "4", + "yup": "^1.7.1" }, "devDependencies": { "@rushstack/eslint-patch": "^1.8.0", diff --git a/Core/Client/src/App.vue b/Core/Client/src/App.vue index 0d0a5fe..896e59a 100644 --- a/Core/Client/src/App.vue +++ b/Core/Client/src/App.vue @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/Core/Client/src/assets/main.css b/Core/Client/src/assets/main.css index d79f8af..711d3f6 100644 --- a/Core/Client/src/assets/main.css +++ b/Core/Client/src/assets/main.css @@ -77,3 +77,13 @@ --p-text-hover-muted-color: var(--p-surface-300); } } + +.fade-enter-active, +.fade-leave-active { + transition: opacity 0.2s ease; +} + +.fade-enter-from, +.fade-leave-to { + opacity: 0; +} \ No newline at end of file diff --git a/Core/Client/src/pages/auth/index.vue b/Core/Client/src/pages/auth/index.vue index cb4f59b..f72aa1f 100644 --- a/Core/Client/src/pages/auth/index.vue +++ b/Core/Client/src/pages/auth/index.vue @@ -1,6 +1,9 @@ @@ -16,20 +21,28 @@ meta: \ No newline at end of file diff --git a/Core/Client/src/pages/auth/register.vue b/Core/Client/src/pages/auth/register.vue new file mode 100644 index 0000000..adab785 --- /dev/null +++ b/Core/Client/src/pages/auth/register.vue @@ -0,0 +1,65 @@ + + + +meta: + layout: auth + + + \ No newline at end of file diff --git a/Core/Client/src/volt/Fieldset.vue b/Core/Client/src/volt/Fieldset.vue new file mode 100644 index 0000000..66efd34 --- /dev/null +++ b/Core/Client/src/volt/Fieldset.vue @@ -0,0 +1,59 @@ + + + diff --git a/Core/Client/src/volt/InputNumber.vue b/Core/Client/src/volt/InputNumber.vue new file mode 100644 index 0000000..d91c634 --- /dev/null +++ b/Core/Client/src/volt/InputNumber.vue @@ -0,0 +1,83 @@ + + + diff --git a/Core/Client/src/volt/InputText.vue b/Core/Client/src/volt/InputText.vue new file mode 100644 index 0000000..ea3789a --- /dev/null +++ b/Core/Client/src/volt/InputText.vue @@ -0,0 +1,37 @@ + + + diff --git a/Core/Client/src/volt/Password.vue b/Core/Client/src/volt/Password.vue new file mode 100644 index 0000000..9a615e3 --- /dev/null +++ b/Core/Client/src/volt/Password.vue @@ -0,0 +1,70 @@ + + + diff --git a/Core/Client/typed-router.d.ts b/Core/Client/typed-router.d.ts index 89cb232..f00186c 100644 --- a/Core/Client/typed-router.d.ts +++ b/Core/Client/typed-router.d.ts @@ -20,5 +20,6 @@ declare module 'vue-router/auto-routes' { export interface RouteNamedMap { '/': RouteRecordInfo<'/', '/', Record, Record>, '/auth/': RouteRecordInfo<'/auth/', '/auth', Record, Record>, + '/auth/register': RouteRecordInfo<'/auth/register', '/auth/register', Record, Record>, } } diff --git a/Core/Server/Handlers/Common/OTAUpdates/ListPackageHandler.cs b/Core/Server/Handlers/Common/OTAUpdates/ListPackageHandler.cs index b016035..02b977d 100644 --- a/Core/Server/Handlers/Common/OTAUpdates/ListPackageHandler.cs +++ b/Core/Server/Handlers/Common/OTAUpdates/ListPackageHandler.cs @@ -15,7 +15,6 @@ public class ListPackageHandler: HandlerWithoutRequest { var package = new ListPackageResponse() { - Expire = 600, Status = 0 }; diff --git a/Core/Server/Models/Response/ListPackageResponse.cs b/Core/Server/Models/Response/ListPackageResponse.cs index b471f28..353a805 100644 --- a/Core/Server/Models/Response/ListPackageResponse.cs +++ b/Core/Server/Models/Response/ListPackageResponse.cs @@ -8,7 +8,4 @@ public class ListPackageResponse { [XmlAttribute("status")] public required int Status { get; set; } - - [XmlAttribute("expire")] - public required int Expire { get; set; } } \ No newline at end of file diff --git a/Core/Server/Program.cs b/Core/Server/Program.cs index 029a434..ff8976f 100644 --- a/Core/Server/Program.cs +++ b/Core/Server/Program.cs @@ -139,16 +139,27 @@ eamuseGroup.MapPost("/{m}", async (string m, [FromQuery] string model, [FromQuer var encoding = httpContext.Items["Encoding"]?.ToString() ?? "ShiftJIS"; - encoding = encoding switch + var encodingEnum = encoding switch { - "shift_jis" => "ShiftJIS", - "us-ascii" => "ASCII", - "utf-8" => "UTF8", - "euc-jp" => "EUC_JP", - _ => encoding + "shift_jis" or "ShiftJIS" or "SHIFT_JIS" => KnownEncodings.ShiftJIS, + "us-ascii" => KnownEncodings.ASCII, + "utf-8" => KnownEncodings.UTF8, + "euc-jp" => KnownEncodings.EUC_JP, + "iso-8859-1" => KnownEncodings.ISO_8859_1, + _ => throw new ArgumentException($"Unknown encoding: {encoding}") }; - var encodedBody = KbinConverter.Write(responseXml, Enum.Parse(encoding, true)); + if (amusementRequest.Module == "package") + { + logger.LogInformation("{xml}", responseXml); + } + + var encodedBody = KbinConverter.Write(responseXml, encodingEnum); + + if (amusementRequest.Module == "package") + { + File.WriteAllBytes("test.bin", encodedBody); + } if(compress) { @@ -206,15 +217,21 @@ eamuseGroup.MapPost("/", async ([FromQuery] string model, [FromQuery] string? mo var encoding = httpContext.Items["Encoding"]?.ToString() ?? "ShiftJIS"; - encoding = encoding switch + var encodingEnum = encoding switch { - "shift_jis" => "ShiftJIS", - "us-ascii" => "ASCII", - "utf-8" => "UTF8", - "euc-jp" => "EUC_JP", - _ => encoding + "shift_jis" or "ShiftJIS" or "SHIFT_JIS" => KnownEncodings.ShiftJIS, + "us-ascii" => KnownEncodings.ASCII, + "utf-8" => KnownEncodings.UTF8, + "euc-jp" => KnownEncodings.EUC_JP, + "iso-8859-1" => KnownEncodings.ISO_8859_1, + _ => throw new ArgumentException($"Unknown encoding: {encoding}") }; + if (amusementRequest.Module == "package") + { + logger.LogInformation("{xml}", responseXml); + } + byte[] encodedBody; if (httpContext.Request.Headers.TryGetValue("IsEncoded", out var value) && value == "false") @@ -224,7 +241,12 @@ eamuseGroup.MapPost("/", async ([FromQuery] string model, [FromQuery] string? mo } else { - encodedBody = KbinConverter.Write(responseXml, (KnownEncodings)Enum.Parse(typeof(KnownEncodings), encoding, true)); + encodedBody = KbinConverter.Write(responseXml, encodingEnum); + + if (amusementRequest.Module == "package") + { + File.WriteAllBytes("test.bin", encodedBody); + } } if(compress) { diff --git a/Core/Server/Server.csproj b/Core/Server/Server.csproj index 602fbe8..a4ae556 100644 --- a/Core/Server/Server.csproj +++ b/Core/Server/Server.csproj @@ -17,6 +17,9 @@ + + + @@ -33,6 +36,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -44,6 +48,10 @@ + + + +