From a52a4f814b4cc65e9687d9fd69f09be00303cb7c Mon Sep 17 00:00:00 2001 From: nairobi <61069237+nyairobi@users.noreply.github.com> Date: Fri, 24 May 2024 13:46:57 +0200 Subject: [PATCH] feat: add inohara as a default client (#1090) --- .../app/pages/dashboard/import/ImportPage.tsx | 7 +++ .../import/OngekiArtemisExportPage.tsx | 2 +- .../dashboard/import/OngekiInoharaPage.tsx | 47 +++++++++++++++++++ client/src/app/routes/ImportRoutes.tsx | 9 +++- .../lib/builtin-clients/builtin-clients.ts | 41 ++++++++++++++++ 5 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 client/src/app/pages/dashboard/import/OngekiInoharaPage.tsx diff --git a/client/src/app/pages/dashboard/import/ImportPage.tsx b/client/src/app/pages/dashboard/import/ImportPage.tsx index a92d2938c..21db9576e 100644 --- a/client/src/app/pages/dashboard/import/ImportPage.tsx +++ b/client/src/app/pages/dashboard/import/ImportPage.tsx @@ -336,6 +336,13 @@ function ImportInfoDisplayer({ game }: { game: Game }) { ); } else if (game === "ongeki") { Content.unshift( + , +

What is Inohara?

+
+ Inohara automatically sends O.N.G.E.K.I. scores to a server. {TachiConfig.NAME} is + compatible with what Inohara sends, so you can use her to submit scores! +
+ +

Setup Instructions

+
    +
  1. + Download the latest version of inohara.zip{" "} + + here + + . +
  2. +
  3. + Download your inohara.cfg config file{" "} + here + .
    + + This file contains an API Key, which is meant to be kept secret! + +
  4. +
  5. + Follow the installation instructions on{" "} + + Tendokyu + + . +
  6. +
  7. Your scores are now automatically uploaded to {TachiConfig.NAME}!
  8. +
+ + ); +} diff --git a/client/src/app/routes/ImportRoutes.tsx b/client/src/app/routes/ImportRoutes.tsx index f6f4725f5..4def42477 100644 --- a/client/src/app/routes/ImportRoutes.tsx +++ b/client/src/app/routes/ImportRoutes.tsx @@ -29,8 +29,9 @@ import ChunithmSiteImportPage from "app/pages/dashboard/import/ChunithmSiteImpor import SaekawaPage from "app/pages/dashboard/import/SaekawaPage"; import AquaArtemisExport from "app/pages/dashboard/import/AquaArtemisExportPage"; import ChunithmMYTExport from "app/pages/dashboard/import/ChunithmMYTExportPage"; -import OngekiArtemisExport from "app/pages/dashboard/import/OngekiArtemisExportPage"; +import OngekiArtemisExportPage from "app/pages/dashboard/import/OngekiArtemisExportPage"; import MytIntegrationPage from "components/imports/MYTIntegrationPage"; +import OngekiInoharaPage from "app/pages/dashboard/import/OngekiInoharaPage"; export default function ImportRoutes() { const { user } = useContext(UserContext); @@ -238,7 +239,11 @@ export default function ImportRoutes() { - + + + + + )} diff --git a/server/src/lib/builtin-clients/builtin-clients.ts b/server/src/lib/builtin-clients/builtin-clients.ts index 56a5aa40d..ad7d2ba50 100644 --- a/server/src/lib/builtin-clients/builtin-clients.ts +++ b/server/src/lib/builtin-clients/builtin-clients.ts @@ -223,6 +223,47 @@ import = '/ir/direct-manual/import' # Your Tachi API key api_key = '%%TACHI_KEY%%'`, }, + { + clientID: "CXInohara", + requestedPermissions: ["submit_score"], + name: "Inohara", + redirectUri: null, + webhookUri: null, + apiKeyFilename: "inohara.cfg", + apiKeyTemplate: `[Options] + +# Whether to enable score submissions +Enable = true + +# Timeout for web requests, in seconds +Timeout = 3 + +# Tachi instance base URL +BaseUrl = ${ServerConfig.OUR_URL} + +# Tachi status endpoint +Status = /api/v1/status + +# Tachi score import endpoint +Import = /ir/direct-manual/import + +# Whether to display status on-screen (rudimentarily) +EnableOSD = false + +# Whether to export your PBs for batch-manual (saved to batch-manual.json) +# This is very, very bad and should only be used as last resort +ExportPBs = false + +[Keys] + +* = %%TACHI_KEY%% + +# If you have a multi-user setup, you can configure +# keys per-profile: +# InGameUsername = TachiApiKey +# +# An * matches everyone else`, + }, ]; const BokuDefaultClients: DefaultClients = [