UI tweaks
This commit is contained in:
parent
6c88006795
commit
760c272596
4 changed files with 64 additions and 13 deletions
|
|
@ -15,10 +15,6 @@ button.info {
|
|||
padding: 0.5rem !important;
|
||||
}
|
||||
|
||||
button.info svg {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.ctm-root {
|
||||
margin: auto;
|
||||
max-width: 768px;
|
||||
|
|
@ -36,3 +32,20 @@ button.info svg {
|
|||
filter: drop-shadow(1.15px 1.15px 0 #ffffff30)
|
||||
drop-shadow(-1.15px -1.15px 0 #ffffff30);
|
||||
}
|
||||
|
||||
.anchor-disguised:target,
|
||||
.anchor-disguised:focus-visible,
|
||||
.anchor-disguised:target,
|
||||
.anchor-disguised:target {
|
||||
border: 1px solid #ffffff99 !important;
|
||||
}
|
||||
|
||||
.anchor-disguised {
|
||||
padding: 0 !important;
|
||||
text-align: center;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
button svg {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
|
|
|||
30
frontend/src/components/Help/ModrinthProjId.jsx
Normal file
30
frontend/src/components/Help/ModrinthProjId.jsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import React from 'react';
|
||||
import { Image, Modal } from 'react-bootstrap';
|
||||
import Example from '../../img/mpjid.png';
|
||||
|
||||
export default ({ show, onHide }) => (
|
||||
<Modal
|
||||
centered
|
||||
show={show}
|
||||
onHide={onHide}
|
||||
>
|
||||
<Modal.Header closeButton>
|
||||
<h4>Modrinth Project IDs and You</h4>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<div>
|
||||
<p>
|
||||
Your Modrinth Project ID is *not* the same as the Slug/Name.
|
||||
It can instead be found in the sidebar of your project
|
||||
(even if your project is still pending approval), like so:
|
||||
{' '}
|
||||
<Image
|
||||
className="d-block m-auto p-5"
|
||||
src={Example}
|
||||
rounded
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
);
|
||||
BIN
frontend/src/img/mpjid.png
Normal file
BIN
frontend/src/img/mpjid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
|
|
@ -3,14 +3,15 @@ import React, { useState, useEffect } from 'react';
|
|||
import {
|
||||
Form, Button, Container, Accordion, Image,
|
||||
} from 'react-bootstrap';
|
||||
import { TbInfoHexagon } from 'react-icons/tb';
|
||||
import { TbInfoHexagon, TbHelp } from 'react-icons/tb';
|
||||
import OutputLog from '../components/OutputLog';
|
||||
import Info from '../components/Help/Info';
|
||||
import HeaderImg from '../img/ctm.png';
|
||||
import ModrinthProjId from '../components/Help/ModrinthProjId';
|
||||
|
||||
export default () => {
|
||||
const [dark, setDark] = useState(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
const [modals, setModals] = useState({ info: false, delim: false });
|
||||
const [modals, setModals] = useState({ info: false, mpid: false });
|
||||
const [jobId, setJobId] = useState(window.localStorage.getItem('last-jobid'));
|
||||
const [formData, setFormData] = useState({
|
||||
githubPat: '',
|
||||
|
|
@ -57,6 +58,7 @@ export default () => {
|
|||
return (
|
||||
<div className="ctm-root">
|
||||
<Info override={modals.info} propagateOnHide={() => setModals({ ...modals, info: false })} />
|
||||
<ModrinthProjId show={modals.mpid} onHide={() => setModals({ ...modals, mpid: false })} />
|
||||
|
||||
<Container style={{ margin: '1rem auto', maxWidth: '512px' }}>
|
||||
<Image className="d-block mb-3 mx-auto w-50 headerimg" src={HeaderImg} />
|
||||
|
|
@ -109,7 +111,19 @@ export default () => {
|
|||
</Form.Group>
|
||||
|
||||
<Form.Group className="mb-3" controlId="projId">
|
||||
<Form.Label>Modrinth Project ID</Form.Label>
|
||||
<Form.Label>
|
||||
Modrinth Project ID
|
||||
{' '}
|
||||
<Button
|
||||
size="lg"
|
||||
className="anchor-disguised"
|
||||
onClick={() => setModals({ ...modals, mpid: true })}
|
||||
type="button"
|
||||
variant=""
|
||||
>
|
||||
<TbHelp fontSize="1.5rem" />
|
||||
</Button>
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
required
|
||||
|
|
@ -148,12 +162,6 @@ export default () => {
|
|||
</Accordion>
|
||||
)}
|
||||
</Container>
|
||||
|
||||
{/* <Button
|
||||
|
||||
className="info"
|
||||
variant="light"
|
||||
/> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue