From f112cf091214635ca719d40b03f3bc054fbcc08a Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Sat, 29 Apr 2023 20:35:37 -0500 Subject: [PATCH] Updates --- backend/src/app/controllers/job/put.ts | 1 - backend/src/app/models/Job.ts | 5 - frontend/src/components/Help/Delimiter.jsx | 41 -------- frontend/src/pages/Home.jsx | 29 +----- processor/src/__main__.py | 71 ++++++++++---- processor/src/common.py | 3 +- processor/src/curse_downloader.py | 107 ++++++++++++++++----- processor/src/mgmt_tools.py | 1 - processor/src/modrinth_uploader.py | 34 ++++--- 9 files changed, 160 insertions(+), 132 deletions(-) delete mode 100644 frontend/src/components/Help/Delimiter.jsx diff --git a/backend/src/app/controllers/job/put.ts b/backend/src/app/controllers/job/put.ts index 3e8ba87..defd9f5 100644 --- a/backend/src/app/controllers/job/put.ts +++ b/backend/src/app/controllers/job/put.ts @@ -36,7 +36,6 @@ export default async (req: Request, res: Response) => { githubPat: fern.encrypt(req.body.githubPat), curseforgeSlug: req.body.curseforgeSlug, modrinthId: req.body.modrinthId, - delimiter: req.body.delimiter || "-", queuePlace: await getNextQueuePlace(), }); diff --git a/backend/src/app/models/Job.ts b/backend/src/app/models/Job.ts index 34e05c2..3e6357a 100644 --- a/backend/src/app/models/Job.ts +++ b/backend/src/app/models/Job.ts @@ -7,7 +7,6 @@ export type JobType = Document & { githubPat: string; curseforgeSlug: string; modrinthId: string; - delimiter: string; logs: string; status: number; queuePlace: number; @@ -31,10 +30,6 @@ const JobSchema = new Schema({ type: String, required: true, }, - delimiter: { - type: String, - required: true, - }, logs: { type: String, default: "", diff --git a/frontend/src/components/Help/Delimiter.jsx b/frontend/src/components/Help/Delimiter.jsx deleted file mode 100644 index 691a420..0000000 --- a/frontend/src/components/Help/Delimiter.jsx +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react'; -import { Modal } from 'react-bootstrap'; - -export default ({ show, onHide }) => ( - - -
-

- This is the splitter between parts of the filename. Many mods use the format - {' '} - MODNAME-MCVER-MAJOR.MINOR.PATCH - , where - {' '} - - - {' '} - is the delimiter. -

-

- Using this logic, it is assumed that the Minecraft version for this - {' '} - .jar - -file is between the first and second delimiter, and that the mod version is between - the second and the end of the file. Formatting aside from this is not supported, - unfortunately, as I've got a bit of trauma - {' '} - (/s) - {' '} - from - {' '} - - this Regular Expression I wrote. - -

-
-
-
-); diff --git a/frontend/src/pages/Home.jsx b/frontend/src/pages/Home.jsx index 28f482a..a886459 100644 --- a/frontend/src/pages/Home.jsx +++ b/frontend/src/pages/Home.jsx @@ -3,10 +3,9 @@ import React, { useState, useEffect } from 'react'; import { Form, Button, Container, Accordion, Image, } from 'react-bootstrap'; -import { TbInfoHexagon, TbHelp } from 'react-icons/tb'; +import { TbInfoHexagon } from 'react-icons/tb'; import OutputLog from '../components/OutputLog'; import Info from '../components/Help/Info'; -import Delimiter from '../components/Help/Delimiter'; import HeaderImg from '../img/ctm.png'; export default () => { @@ -58,7 +57,6 @@ export default () => { return (
setModals({ ...modals, info: false })} /> - setModals({ ...modals, delim: false })} /> @@ -124,31 +122,6 @@ export default () => { /> - - - Delimiter (Optional) - {' '} - {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} - setModals({ ...modals, delim: true })} - style={{ textDecoration: 'none', fontSize: '16px' }} - href="#" - label="delimiter_help" - > - - - - setFormData({ - ...formData, - delimiter: x.target.value, - })} - /> - -