mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-13 09:48:27 +03:00
fix: allow decimals for mmdx imports (HACK)
This commit is contained in:
@@ -88,7 +88,11 @@ function InnerShowRecentImports({ user }: { user: UserDocument }) {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
if (data.length === 0) {
|
||||
const filteredData = data.filter(
|
||||
(e) => e.importType.startsWith("file/") || e.importType.startsWith("api/")
|
||||
);
|
||||
|
||||
if (filteredData.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -97,16 +101,12 @@ function InnerShowRecentImports({ user }: { user: UserDocument }) {
|
||||
<h4>Recently Used Import Methods</h4>
|
||||
<Divider />
|
||||
<Row>
|
||||
{data
|
||||
.filter(
|
||||
(e) => e.importType.startsWith("file/") || e.importType.startsWith("api/")
|
||||
)
|
||||
.map((e) => (
|
||||
<ImportTypeInfoCard
|
||||
key={e.importType}
|
||||
importType={e.importType as FileUploadImportTypes | APIImportTypes}
|
||||
/>
|
||||
))}
|
||||
{filteredData.map((e) => (
|
||||
<ImportTypeInfoCard
|
||||
key={e.importType}
|
||||
importType={e.importType as FileUploadImportTypes | APIImportTypes}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1296,8 +1296,14 @@ const PR_HIT_META = (game: Game): PrudenceSchema => {
|
||||
const PR_BATCH_MANUAL_SCORE = (game: Game, playtype: Playtype): PrudenceSchema => {
|
||||
const gptConfig = GetGamePTConfig(game, playtype);
|
||||
|
||||
const scoreChecker =
|
||||
game === "itg" || game === "gitadora" ? p.isBetween(0, 100) : p.isPositiveInteger;
|
||||
let scoreChecker: ValidSchemaValue = p.isPositiveInteger;
|
||||
|
||||
// DISGUSTING TEMPORARY HACK. NEEDS REFACTOR
|
||||
if (game === "itg" || game === "gitadora") {
|
||||
scoreChecker = p.isBetween(0, 100);
|
||||
} else if (game === "maimaidx") {
|
||||
scoreChecker = p.isBetween(0, 101);
|
||||
}
|
||||
|
||||
return {
|
||||
score: scoreChecker,
|
||||
|
||||
Reference in New Issue
Block a user