diff --git a/.eslintrc.js b/.eslintrc.js index dd49b89..dd1a4ad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,6 +50,7 @@ module.exports = { "max-classes-per-file": ["error", 1], // "max-depth": ["warn", 4], // "max-lines": "warn", + "max-len": ["warn", { "code": 100 }], // "max-lines-per-function": "warn", // "max-nested-callbacks": "warn", // "max-params": "warn", diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 44ac035..4bd7ffd 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -151,7 +151,9 @@ export default function AppLayout(props: Immutable): JSX.Element { >
{`${titlePrefix} - ${ogTitle}`} @@ -183,7 +185,8 @@ export default function AppLayout(props: Immutable): JSX.Element { {/* Background when navbar is opened */}
): JSX.Element { contentPanel ) : (
-
+

{langui.select_option_sidebar}

@@ -223,7 +229,10 @@ export default function AppLayout(props: Immutable): JSX.Element { {/* Sub panel */} {subPanel && (
): JSX.Element { {/* Main panel */}
{/* Navbar */} -
+
{ @@ -285,7 +301,10 @@ export default function AppLayout(props: Immutable): JSX.Element { >

{langui.settings}

-
+
{router.locales && (

{langui.languages}

diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx index ebba2e8..b00f5c6 100644 --- a/src/components/Chip.tsx +++ b/src/components/Chip.tsx @@ -8,7 +8,9 @@ interface Props { export default function Chip(props: Immutable): JSX.Element { return (
{props.children}
diff --git a/src/components/Inputs/Select.tsx b/src/components/Inputs/Select.tsx index a4f5290..c8b936a 100644 --- a/src/components/Inputs/Select.tsx +++ b/src/components/Inputs/Select.tsx @@ -20,7 +20,9 @@ export default function Select(props: Immutable): JSX.Element { } ${props.className}`} >
@@ -48,7 +50,8 @@ export default function Select(props: Immutable): JSX.Element { <> {index !== props.state && (
{ diff --git a/src/components/Inputs/Switch.tsx b/src/components/Inputs/Switch.tsx index a6a19a1..49ef258 100644 --- a/src/components/Inputs/Switch.tsx +++ b/src/components/Inputs/Switch.tsx @@ -10,15 +10,17 @@ interface Props { export default function Switch(props: Immutable): JSX.Element { return (
{ props.setState(!props.state); }} >
diff --git a/src/components/Library/ContentLine.tsx b/src/components/Library/ContentLine.tsx index 14a7f58..87568d6 100644 --- a/src/components/Library/ContentLine.tsx +++ b/src/components/Library/ContentLine.tsx @@ -33,7 +33,8 @@ export default function ContentLine(props: Immutable): JSX.Element { opened && "bg-mid shadow-inner-sm shadow-shade h-auto py-3 my-2" }`} > -
+

setOpened(!opened)}> {content.attributes.content?.data?.attributes?.titles?.[0] diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index 36194a6..e2e14d5 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -101,7 +101,10 @@ export default function ScanSet(props: Immutable): JSX.Element { <> {selectedScan && (
-
+

{title}

@@ -198,11 +201,16 @@ export default function ScanSet(props: Immutable): JSX.Element { )}
-
+
{selectedScan.pages?.data.map((page, index) => (
{ const images: string[] = []; selectedScan.pages?.data.map((image) => { diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index 45559c6..c75f0fa 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -66,7 +66,10 @@ export default function ScanSetCover(props: Immutable): JSX.Element { <> {selectedScan && (
-
+

{"Cover"}

@@ -151,11 +154,16 @@ export default function ScanSetCover(props: Immutable): JSX.Element { )}
-
+
{coverImages.map((image, index) => (
{ const imgs: string[] = []; coverImages.map((img) => { diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx index 934814e..10d10e3 100644 --- a/src/components/PanelComponents/NavOption.tsx +++ b/src/components/PanelComponents/NavOption.tsx @@ -17,11 +17,15 @@ export default function NavOption(props: Immutable): JSX.Element { const router = useRouter(); const isActive = router.asPath.startsWith(props.url); const divActive = "bg-mid shadow-inner-sm shadow-shade"; + const border = "outline outline-mid outline-2 outline-offset-[-2px] hover:outline-[transparent]"; - const divCommon = `gap-x-5 w-full rounded-2xl cursor-pointer p-4 hover:bg-mid hover:shadow-inner-sm hover:shadow-shade hover:active:shadow-inner hover:active:shadow-shade transition-all ${ - props.border ? border : "" - } ${isActive ? divActive : ""}`; + + const divCommon = `gap-x-5 w-full rounded-2xl cursor-pointer p-4 hover:bg-mid + hover:shadow-inner-sm hover:shadow-shade hover:active:shadow-inner + hover:active:shadow-shade transition-all ${props.border ? border : ""} ${ + isActive ? divActive : "" + }`; return ( ): JSX.Element { return (
@@ -45,7 +46,9 @@ export default function MainPanel(props: Immutable): JSX.Element { onClick={() => appLayout.setMainPanelOpen(false)} className={`${ appLayout.mainPanelReduced && isDesktop ? "w-12" : "w-1/2" - } aspect-square cursor-pointer transition-colors [mask:url('/icons/accords.svg')] ![mask-size:contain] ![mask-repeat:no-repeat] ![mask-position:center] bg-black hover:bg-dark mb-4`} + } aspect-square cursor-pointer transition-colors [mask:url('/icons/accords.svg')] + ![mask-size:contain] ![mask-repeat:no-repeat] + ![mask-position:center] bg-black hover:bg-dark mb-4`} >
@@ -219,10 +222,22 @@ export default function MainPanel(props: Immutable): JSX.Element { className="transition-[filter] colorize-black hover:colorize-dark" href="https://creativecommons.org/licenses/by-sa/4.0/" > -
-
-
-
+
+
+
+

@@ -233,14 +248,18 @@ export default function MainPanel(props: Immutable): JSX.Element {

} placement="top" diff --git a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx index cc30e39..8d9fb77 100644 --- a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx @@ -74,7 +74,8 @@ export default function ChronologyItemComponent( if (props.item.attributes) { return (
{translation && ( <> -
+
{translation.status !== Enum_Componenttranslationschronologyitem_Status.Done && ( 1 - ? "before:content-['-'] before:text-dark before:inline-block before:w-4 before:ml-[-1em] mt-2 whitespace-pre-line" + ? `before:content-['-'] before:text-dark before:inline-block + before:w-4 before:ml-[-1em] mt-2 whitespace-pre-line` : "whitespace-pre-line" } > diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index 969febc..a37afea 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -10,8 +10,8 @@ import ContentPanel, { import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideoChannelQuery } from "graphql/generated"; -import { getReadySdk } from "graphql/sdk"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { getReadySdk } from "graphql/sdk"; import { getVideoThumbnailURL } from "helpers/videos"; import { GetStaticPathsContext, @@ -60,7 +60,11 @@ export default function Channel(props: Props): JSX.Element {

{channel?.title}

{channel?.subscribers.toLocaleString()} subscribers

-
+
{channel?.videos?.data.map((video) => ( <> {video.attributes && ( diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx index 5d26e5d..854a441 100644 --- a/src/pages/archives/videos/index.tsx +++ b/src/pages/archives/videos/index.tsx @@ -11,9 +11,9 @@ import ContentPanel, { import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideosPreviewQuery } from "graphql/generated"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; import { prettyDate } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getVideoThumbnailURL } from "helpers/videos"; import { GetStaticPropsContext } from "next"; import { useState } from "react"; @@ -80,7 +80,11 @@ export default function Videos(props: Props): JSX.Element { className="mb-12" /> -
+
{paginatedVideos[page].map((video) => ( <> {video.attributes && ( diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index af0043e..da4f604 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -70,7 +70,8 @@ export default function Contents(props: Immutable): JSX.Element { {name && (

{name} {`${items.length} ${ @@ -82,7 +83,8 @@ export default function Contents(props: Immutable): JSX.Element { )}
{items.map((item) => ( <> diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx index f881767..e6c0060 100644 --- a/src/pages/dev/checkup/libraryitems.tsx +++ b/src/pages/dev/checkup/libraryitems.tsx @@ -41,7 +41,8 @@ export default function CheckupLibraryItems( {testReport.lines.map((line, index) => (