Skip to content

Commit

Permalink
fix: various fixes to the client (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
j1nxie authored Aug 14, 2023
1 parent b35b4d2 commit 39a4c95
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 3 deletions.
26 changes: 26 additions & 0 deletions client/src/app/pages/dashboard/import/ChunithmSiteImportPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 ChunithmSiteImportPage() {
useSetSubheader(["Import Scores", "CHUNITHM Site Importer"]);

return (
<div>
<h1 className="text-center mb-4">What is the CHUNITHM DX site importer?</h1>
<div>
The CHUNITHM Site Importer is a script that will scrape your profile on the CHUNITHM
website and import it to {TachiConfig.name}.
</div>
<Divider />
<h1 className="text-center my-4">Setup Instructions</h1>
Instructions are available on{" "}
<ExternalLink href="https://github.com/beerpiss/kt-chunithm-site-importer">
the GitHub repository
</ExternalLink>
.
</div>
);
}
17 changes: 17 additions & 0 deletions client/src/app/pages/dashboard/import/ImportPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ function ImportInfoDisplayer({ game }: { game: Game }) {
desc="Automatically import scores, whenever you get them!"
moreInfo="This is the recommended way to import CHUNITHM scores, as it provides high quality data in real-time."
key="Chunitachi"
/>,
<ImportInfoCard
name="CHUNITHM Site Importer"
href="kt-chunithm-site-importer"
desc="Use your data from CHUNITHM NET."
moreInfo="If you are currently playing on CHUNITHM International, you can import play data from it here."
key="CHUNITHM Site Importer"
/>
);
} else if (game === "bms") {
Expand Down Expand Up @@ -262,6 +269,16 @@ function ImportInfoDisplayer({ game }: { game: Game }) {
key="WACCA MyPage Scraper"
/>
);
} else if (game === "maimaidx") {
Content.unshift(
<ImportInfoCard
name="maimai DX Site Importer"
href="kt-maimaidx-site-importer"
desc="Use your data from maimai DX NET."
moreInfo="If you are currently playing on maimai DX International, you can import play data from it here."
key="maimai DX NET Importer"
/>
);
} else if (game === "museca") {
Content.unshift(
<ImportTypeInfoCard key="api/cg-dev-museca" importType="api/cg-dev-museca" />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function MaimaiDXSiteImportPage() {

return (
<div>
<h1 className="text-center mb-4">What is the maimai DX site importer?</h1>
<h1 className="text-center mb-4">What is the maimai DX Site Importer?</h1>
<div>
The maimai DX Site Importer is a script that will scrape your profile on the maimai
DX website and import it to {TachiConfig.name}.
Expand Down
10 changes: 10 additions & 0 deletions client/src/app/routes/ImportRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import React, { useContext } from "react";
import { Link, Redirect, Route, Switch } from "react-router-dom";
import CGIntegrationPage from "components/imports/CGIntegrationPage";
import ITGHookPage from "app/pages/dashboard/import/ITGHookPage";
import MaimaiDXSiteImportPage from "app/pages/dashboard/import/MaimaiDXSiteImportPage";
import ChunithmSiteImportPage from "app/pages/dashboard/import/ChunithmSiteImportPage";

export default function ImportRoutes() {
const { user } = useContext(UserContext);
Expand Down Expand Up @@ -121,6 +123,10 @@ export default function ImportRoutes() {
<ChunitachiPage />
</Route>

<Route exact path="/import/kt-chunithm-site-importer">
<ChunithmSiteImportPage />
</Route>

<Route exact path="/import/iidx-flo">
<KAIIntegrationPage
hash="6f64b82107cea90aa4c51a33705cd57c1883c8cdc22a634730ca461a431744b3"
Expand Down Expand Up @@ -199,6 +205,10 @@ export default function ImportRoutes() {
<Route exact path="/import/wacca-mypage-scraper">
<WACCAMyPageScraperPage />
</Route>

<Route exact path="/import/kt-maimaidx-site-importer">
<MaimaiDXSiteImportPage />
</Route>
</>
)}
</Route>
Expand Down
9 changes: 7 additions & 2 deletions client/src/components/activity/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,11 @@ function QuestActivity({
<div className="timeline-content-title">
<span style={{ fontSize: "1.15rem" }}>
<span className="me-2">
<ProfilePicture size="sm" user={user} toGPT={`${game}/${playtype}`} />
<ProfilePicture
size="sm"
user={user}
toGPT={`${game}/${playtype}`}
/>
</span>
<UGPTLink reqUser={user} game={game} playtype={playtype} /> completed
the{" "}
Expand Down Expand Up @@ -641,7 +645,8 @@ function ClassAchievementActivity({
<div className="timeline-content-inner">
<div className="timeline-content-title">
<span className="me-2">
<ProfilePicture size="sm"
<ProfilePicture
size="sm"
user={user}
toGPT={`${data.game}/${data.playtype}`}
/>
Expand Down
1 change: 1 addition & 0 deletions docs/docs/game-support/games/chunithm-Single.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ The folowing judgements are defined:
| ID | Pretty Name |
| :: | :: |
| `paradiselost` | Paradise Lost |
| `sun` | SUN |

## Supported Match Types

Expand Down
1 change: 1 addition & 0 deletions docs/docs/game-support/games/maimaidx-Single.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ The default rating algorithm is `naiveRate`.
| :: | :: |
| `universeplus` | UNiVERSE PLUS |
| `festival` | FESTiVAL |
| `festivalplus` | FESTiVAL PLUS |

## Supported Match Types

Expand Down

0 comments on commit 39a4c95

Please sign in to comment.