From 982c0b929d569c9beefe66465e6aeb229533e5b5 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sat, 13 Nov 2021 21:05:19 +0000 Subject: [PATCH] Add proper Chunitachi Page --- client/package.json | 1 + client/pnpm-lock.yaml | 20 ++++++++ .../pages/dashboard/import/ChunitachiPage.tsx | 44 ++++++++++++++++++ .../dashboard/users/UserIntegrationsPage.tsx | 4 +- .../dashboard/users/UserSettingsPage.tsx | 2 +- client/src/app/routes/ImportRoutes.tsx | 5 ++ .../tables/components/TachiTable.tsx | 46 ++++++++++++++++--- .../src/components/util/table/useZTable.tsx | 1 + client/src/util/misc.ts | 5 +- 9 files changed, 118 insertions(+), 10 deletions(-) create mode 100644 client/src/app/pages/dashboard/import/ChunitachiPage.tsx diff --git a/client/package.json b/client/package.json index 3947de89c..94c0bb950 100644 --- a/client/package.json +++ b/client/package.json @@ -54,6 +54,7 @@ "hash.js": "^1.1.7", "html-webpack-plugin": "^4.5.2", "humanize-duration": "3.27.0", + "json-2-csv": "^3.14.4", "luxon": "2.0.1", "mini-css-extract-plugin": "0.8.0", "nanoid": "3.1.23", diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 0e76b7f02..a50d78c8e 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -50,6 +50,7 @@ specifiers: html-webpack-plugin: ^4.5.2 humanize-duration: 3.27.0 is-wsl: ^1.1.0 + json-2-csv: ^3.14.4 luxon: 2.0.1 mini-css-extract-plugin: 0.8.0 nanoid: 3.1.23 @@ -125,6 +126,7 @@ dependencies: hash.js: 1.1.7 html-webpack-plugin: 4.5.2_webpack@4.41.0 humanize-duration: 3.27.0 + json-2-csv: 3.14.4 luxon: 2.0.1 mini-css-extract-plugin: 0.8.0_webpack@4.41.0 nanoid: 3.1.23 @@ -5079,6 +5081,11 @@ packages: resolution: {integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=} engines: {node: '>=0.10'} + /deeks/2.5.1: + resolution: {integrity: sha512-fqrBeUz7f1UqaXDRzVB5RG2EfPk15HJRrb2pMZj8mLlSTtz4tRPsK5leFOskoHFPuyZ6+7aRM9j657fvXLkJ7Q==} + engines: {node: '>= 12'} + dev: false + /deep-equal/1.1.1: resolution: {integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==} dependencies: @@ -5244,6 +5251,11 @@ packages: buffer-indexof: 1.1.1 dev: true + /doc-path/3.0.2: + resolution: {integrity: sha512-VRlA2OKSjTbHWj6wmSanxJ338fE/YN8pqmZ0FIWK5JWkIJMFRc4KmD35JtOrnjvVG0WrzOtDDNHx1lN1tkb+lA==} + engines: {node: '>=12'} + dev: false + /doctrine/2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} @@ -7255,6 +7267,14 @@ packages: hasBin: true dev: false + /json-2-csv/3.14.4: + resolution: {integrity: sha512-6Dg4ZJb5g1Lu6gVM2jJGpu1WUo0/b3xS1b35+dXAWmYzlu2AqTXSFrUzA3l5/aYptjhoiGxCN7CZbxBwrUmhig==} + engines: {node: '>= 12'} + dependencies: + deeks: 2.5.1 + doc-path: 3.0.2 + dev: false + /json-parse-better-errors/1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} diff --git a/client/src/app/pages/dashboard/import/ChunitachiPage.tsx b/client/src/app/pages/dashboard/import/ChunitachiPage.tsx new file mode 100644 index 000000000..b4d3c846c --- /dev/null +++ b/client/src/app/pages/dashboard/import/ChunitachiPage.tsx @@ -0,0 +1,44 @@ +import useSetSubheader from "components/layout/header/useSetSubheader"; +import Divider from "components/util/Divider"; +import ExternalLink from "components/util/ExternalLink"; +import { TachiConfig } from "lib/config"; +import React from "react"; + +export default function ChunitachiPage() { + useSetSubheader(["Import Scores", "Chunitachi"]); + + return ( +
.dll file that hooks into CHUNITHM and automatically
+ sends the scores to a server. {TachiConfig.name} is compatible with what Chunitachi
+ sends, so you can use it to submit scores!
+ chunitachi.dll from{" "}
+ ChunItachi.ini config file{" "}
+