diff --git a/code/frontend/src/PageSwitcher.js b/code/frontend/src/PageSwitcher.js index 309da02..bb070b0 100644 --- a/code/frontend/src/PageSwitcher.js +++ b/code/frontend/src/PageSwitcher.js @@ -1,4 +1,4 @@ -import React from "react" +import React from "react" import { Route, Switch } from "react-router" import PageLogin from "./routes/PageLogin" import PageRepositories from "./routes/PageRepositories" diff --git a/code/frontend/src/components/base/Button.js b/code/frontend/src/components/base/Button.js index 1e4079e..1c0dc3f 100644 --- a/code/frontend/src/components/base/Button.js +++ b/code/frontend/src/components/base/Button.js @@ -1,4 +1,4 @@ -import React from "react" +import React from "react" import Style from "./Button.module.css" import classNames from "classnames" import make_icon from "../../utils/make_icon" diff --git a/code/frontend/src/components/base/ButtonSidebar.js b/code/frontend/src/components/base/ButtonSidebar.js index 1f65a37..d0d3ef8 100644 --- a/code/frontend/src/components/base/ButtonSidebar.js +++ b/code/frontend/src/components/base/ButtonSidebar.js @@ -22,7 +22,7 @@ export default function ButtonSidebar({ icon, children, to, className, ...props path: to, strict: true, exact: true, - }); + }) if(match) { className = classNames(Style.Active, className) diff --git a/code/frontend/src/components/base/ButtonSmallX.js b/code/frontend/src/components/base/ButtonSmallX.js index ab55e25..7208596 100644 --- a/code/frontend/src/components/base/ButtonSmallX.js +++ b/code/frontend/src/components/base/ButtonSmallX.js @@ -1,7 +1,7 @@ import React from "react" import Style from "./ButtonSmallX.module.css" import classNames from "classnames" -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { faTimes } from "@fortawesome/free-solid-svg-icons" diff --git a/code/frontend/src/components/base/InputWithIcon.js b/code/frontend/src/components/base/InputWithIcon.js index da72870..bc84e3b 100644 --- a/code/frontend/src/components/base/InputWithIcon.js +++ b/code/frontend/src/components/base/InputWithIcon.js @@ -1,4 +1,4 @@ -import React, {useState} from "react" +import React, { useState } from "react" import Style from "./InputWithIcon.module.css" import classNames from "classnames" import make_icon from "../../utils/make_icon" @@ -17,7 +17,7 @@ import make_icon from "../../utils/make_icon" * @constructor */ export default function InputWithIcon({ icon, className, ...props }) { - const [isFocused, setFocused] = useState(false); + const [isFocused, setFocused] = useState(false) return (
diff --git a/code/frontend/src/components/base/Loading.js b/code/frontend/src/components/base/Loading.js index 02ad294..6307996 100644 --- a/code/frontend/src/components/base/Loading.js +++ b/code/frontend/src/components/base/Loading.js @@ -1,6 +1,6 @@ import React from "react" import { faSpinner } from "@fortawesome/free-solid-svg-icons" -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" /** diff --git a/code/frontend/src/components/base/Radio.js b/code/frontend/src/components/base/Radio.js index 3cc3058..e861487 100644 --- a/code/frontend/src/components/base/Radio.js +++ b/code/frontend/src/components/base/Radio.js @@ -2,6 +2,7 @@ import React from "react" import Style from "./Radio.module.css" import classNames from "classnames" + /** * A radio button. * diff --git a/code/frontend/src/components/base/TextArea.js b/code/frontend/src/components/base/TextArea.js index 75508be..1e19601 100644 --- a/code/frontend/src/components/base/TextArea.js +++ b/code/frontend/src/components/base/TextArea.js @@ -15,7 +15,10 @@ import classNames from "classnames" */ export default function TextArea({ resize, children, className, ...props }) { return ( - ) diff --git a/code/frontend/src/components/base/formparts/FormLabel.js b/code/frontend/src/components/base/formparts/FormLabel.js index febdcca..6efd9ca 100644 --- a/code/frontend/src/components/base/formparts/FormLabel.js +++ b/code/frontend/src/components/base/formparts/FormLabel.js @@ -16,7 +16,7 @@ import Style from "./FormLabel.module.css" export default function FormLabel({ children, text, htmlFor }) { return ( -
diff --git a/code/frontend/src/components/interactive/BoxLogin.js b/code/frontend/src/components/interactive/BoxLogin.js index 18e6286..13a6802 100644 --- a/code/frontend/src/components/interactive/BoxLogin.js +++ b/code/frontend/src/components/interactive/BoxLogin.js @@ -22,12 +22,12 @@ export default function BoxLogin({ ...props }) { const [password, setPassword] = useState("password") const [working, setWorking] = useState(false) const [error, setError] = useState(null) - const {login} = useContext(ContextUser) + const { login } = useContext(ContextUser) const history = useHistory() const doLogin = async () => { if(working) { - return; + return } setWorking(true) @@ -67,10 +67,10 @@ export default function BoxLogin({ ...props }) { /> {error ? - - {error.toString()} - - : null} + + {error.toString()} + + : null} 0) { contents = repositories.map(repo => ( 0) { contents = repositories.map(repo => ( - {e.preventDefault(); save()}}> + { + e.preventDefault() + save() + }} + > {error ? - - {error.toString()} - - : null} + + {error.toString()} + + : null} {id ? - - : - + + : + } diff --git a/code/frontend/src/components/interactive/BoxSetServer.js b/code/frontend/src/components/interactive/BoxSetServer.js index ada5c92..70006c3 100644 --- a/code/frontend/src/components/interactive/BoxSetServer.js +++ b/code/frontend/src/components/interactive/BoxSetServer.js @@ -15,7 +15,7 @@ import ContextServer from "../../contexts/ContextServer" * @constructor */ export default function BoxSetServer({ ...props }) { - const {server, setServer} = useContext(ContextServer); + const { server, setServer } = useContext(ContextServer) return ( diff --git a/code/frontend/src/components/interactive/ConditionBadge.js b/code/frontend/src/components/interactive/ConditionBadge.js index 896b705..fd1b3bc 100644 --- a/code/frontend/src/components/interactive/ConditionBadge.js +++ b/code/frontend/src/components/interactive/ConditionBadge.js @@ -1,7 +1,7 @@ import React, { useContext } from "react" import Style from "./ConditionBadge.module.css" import classNames from "classnames" -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import ButtonSmallX from "../base/ButtonSmallX" import { faAt, faClock, faGlobe, faHashtag, faMapPin } from "@fortawesome/free-solid-svg-icons" import ContextRepositoryEditor from "../../contexts/ContextRepositoryEditor" @@ -36,7 +36,7 @@ export default function ConditionBadge({ ...condition }) { const { id, type, content } = condition const color = CONDITION_COLORS[type] const icon = CONDITION_ICONS[type] - const {removeRawCondition} = useContext(ContextRepositoryEditor) + const { removeRawCondition } = useContext(ContextRepositoryEditor) let displayedContent = content if(type === 3) { @@ -65,10 +65,12 @@ export default function ConditionBadge({ ...condition }) { {displayedContent}
- { - console.debug(`Removing Condition: `, condition) - removeRawCondition(condition) - }}/> + { + console.debug(`Removing Condition: `, condition) + removeRawCondition(condition) + }} + />
) diff --git a/code/frontend/src/components/interactive/CurrentServer.js b/code/frontend/src/components/interactive/CurrentServer.js index 7508657..7c80c2b 100644 --- a/code/frontend/src/components/interactive/CurrentServer.js +++ b/code/frontend/src/components/interactive/CurrentServer.js @@ -1,5 +1,5 @@ import React, { useContext } from "react" -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { faGlobe } from "@fortawesome/free-solid-svg-icons" import ContextServer from "../../contexts/ContextServer" @@ -12,7 +12,7 @@ import ContextServer from "../../contexts/ContextServer" * @constructor */ export default function CurrentServer({ ...props }) { - const {server} = useContext(ContextServer); + const { server } = useContext(ContextServer) return ( diff --git a/code/frontend/src/components/interactive/Layout.module.css b/code/frontend/src/components/interactive/Layout.module.css index 6a19007..7f15bf0 100644 --- a/code/frontend/src/components/interactive/Layout.module.css +++ b/code/frontend/src/components/interactive/Layout.module.css @@ -8,8 +8,7 @@ display: grid; grid-template-areas: - "a b" - ; + "a b"; grid-template-columns: 250px 1fr; grid-gap: 10px; diff --git a/code/frontend/src/components/interactive/LoggedInUser.js b/code/frontend/src/components/interactive/LoggedInUser.js index 504dddb..cd6ae02 100644 --- a/code/frontend/src/components/interactive/LoggedInUser.js +++ b/code/frontend/src/components/interactive/LoggedInUser.js @@ -12,7 +12,7 @@ import ContextUser from "../../contexts/ContextUser" * @constructor */ export default function LoggedInUser({ ...props }) { - const {user} = useContext(ContextUser); + const { user } = useContext(ContextUser) if(!user) { return ( diff --git a/code/frontend/src/components/interactive/Logo.js b/code/frontend/src/components/interactive/Logo.js index be5e774..cff1d65 100644 --- a/code/frontend/src/components/interactive/Logo.js +++ b/code/frontend/src/components/interactive/Logo.js @@ -1,4 +1,4 @@ -import React, {useContext} from "react" +import React, { useContext } from "react" import Style from "./Logo.module.css" import LogoDark from "../../media/LogoDark.png" import LogoLight from "../../media/LogoLight.png" @@ -19,9 +19,9 @@ import classNames from "classnames" export default function Logo({ className, ...props }) { // I have no idea why IntelliJ is complaining about this line // It's perfectly fine! - const {theme} = useContext(ContextTheme) + const { theme } = useContext(ContextTheme) - let logo; + let logo if(theme === "ThemeDark") { logo = LogoDark } diff --git a/code/frontend/src/components/interactive/RepositorySummaryBase.js b/code/frontend/src/components/interactive/RepositorySummaryBase.js index dbba1f0..1eb66dd 100644 --- a/code/frontend/src/components/interactive/RepositorySummaryBase.js +++ b/code/frontend/src/components/interactive/RepositorySummaryBase.js @@ -1,7 +1,7 @@ import React, { useContext } from "react" import Style from "./RepositorySummaryBase.module.css" import classNames from "classnames" -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import Button from "../base/Button" import { faArchive, faPencilAlt, faTrash } from "@fortawesome/free-solid-svg-icons" import { useHistory } from "react-router" @@ -29,13 +29,13 @@ import ContextUser from "../../contexts/ContextUser" * @constructor */ export default function RepositorySummaryBase( - { id, refresh, owner, icon, name, start, end, is_active, canDelete, canEdit, canArchive, className, ...props } + { id, refresh, owner, icon, name, start, end, is_active, canDelete, canEdit, canArchive, className, ...props }, ) { - const {fetchDataAuth} = useContext(ContextUser) + const { fetchDataAuth } = useContext(ContextUser) const history = useHistory() - const {fetchNow: archiveThis} = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, {"close": true}) - const {fetchNow: unarchiveThis} = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, {"open": true}) - const {fetchNow: deletThis} = useData(fetchDataAuth, "DELETE", `/api/v1/repositories/${id}`) + const { fetchNow: archiveThis } = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, { "close": true }) + const { fetchNow: unarchiveThis } = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, { "open": true }) + const { fetchNow: deletThis } = useData(fetchDataAuth, "DELETE", `/api/v1/repositories/${id}`) const onEditClick = event => { history.push(`/repositories/${id}/edit`) @@ -79,32 +79,32 @@ export default function RepositorySummaryBase(
{canDelete ? - - : null} + + : null} {canEdit ? - - : null} + + : null} {canArchive ? - - : null} + + : null}
) diff --git a/code/frontend/src/components/interactive/RepositorySummaryBase.module.css b/code/frontend/src/components/interactive/RepositorySummaryBase.module.css index 2f21b39..481c0aa 100644 --- a/code/frontend/src/components/interactive/RepositorySummaryBase.module.css +++ b/code/frontend/src/components/interactive/RepositorySummaryBase.module.css @@ -17,8 +17,7 @@ "a b" "a c" "a d" - "a e" - ; + "a e"; grid-template-columns: auto 1fr; grid-template-rows: 5px 1fr 1fr 5px; diff --git a/code/frontend/src/components/interactive/SelectTheme.js b/code/frontend/src/components/interactive/SelectTheme.js index 60a7cc0..647c5ea 100644 --- a/code/frontend/src/components/interactive/SelectTheme.js +++ b/code/frontend/src/components/interactive/SelectTheme.js @@ -1,4 +1,4 @@ -import React, {useContext} from "react" +import React, { useContext } from "react" import Select from "../base/Select" import ContextTheme from "../../contexts/ContextTheme" @@ -12,7 +12,7 @@ import ContextTheme from "../../contexts/ContextTheme" * @constructor */ export default function SelectTheme({ ...props }) { - const {theme, setTheme} = useContext(ContextTheme); + const { theme, setTheme } = useContext(ContextTheme) return (