diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 6afd3a7..044ab83 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -15,9 +15,9 @@ import { useEffect, useState } from "react"; import { useSwipeable } from "react-swipeable"; import { ImageQuality } from "./Img"; import OrderableList from "./Inputs/OrderableList"; +import Select from "./Inputs/Select"; import MainPanel from "./Panels/MainPanel"; import Popup from "./Popup"; -import Select from "./Inputs/Select"; interface Props extends AppStaticProps { subPanel?: React.ReactNode; diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index 030afb4..d98b958 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -1,8 +1,8 @@ import { AppStaticProps } from "queries/getAppStaticProps"; import { prettyLanguage } from "queries/helpers"; import { Dispatch, SetStateAction } from "react"; -import Button from "./Button"; import ToolTip from "../ToolTip"; +import Button from "./Button"; interface Props { className?: string; diff --git a/src/components/Library/ContentLine.tsx b/src/components/Library/ContentLine.tsx index 167eeff..e1dc01f 100644 --- a/src/components/Library/ContentLine.tsx +++ b/src/components/Library/ContentLine.tsx @@ -1,5 +1,5 @@ -import Button from "components/Inputs/Button"; import Chip from "components/Chip"; +import Button from "components/Inputs/Button"; import { GetLibraryItemQuery } from "graphql/generated"; import { AppStaticProps } from "queries/getAppStaticProps"; import { prettyinlineTitle, prettySlug } from "queries/helpers"; diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index 5931edc..c3c8392 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -1,6 +1,6 @@ -import Button from "components/Inputs/Button"; import Chip from "components/Chip"; import Img, { getAssetURL, ImageQuality } from "components/Img"; +import Button from "components/Inputs/Button"; import LanguageSwitcher from "components/Inputs/LanguageSwitcher"; import RecorderChip from "components/RecorderChip"; import ToolTip from "components/ToolTip"; diff --git a/src/components/PanelComponents/ReturnButton.tsx b/src/components/PanelComponents/ReturnButton.tsx index ffd7aa5..b7347a2 100644 --- a/src/components/PanelComponents/ReturnButton.tsx +++ b/src/components/PanelComponents/ReturnButton.tsx @@ -1,5 +1,5 @@ -import Button from "components/Inputs/Button"; import HorizontalLine from "components/HorizontalLine"; +import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { AppStaticProps } from "queries/getAppStaticProps"; diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index ef742e2..500b862 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -1,5 +1,5 @@ -import Button from "components/Inputs/Button"; import HorizontalLine from "components/HorizontalLine"; +import Button from "components/Inputs/Button"; import NavOption from "components/PanelComponents/NavOption"; import ToolTip from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index 415df02..0255a6f 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -174,7 +174,9 @@ export default function ThumbnailPreview(props: Props): JSX.Element { )}
{pre_title}
} - {title &&{title}
} + {title && ( +{title}
+ )} {subtitle &&{subtitle}
}{description}
} diff --git a/src/graphql/operations/devGetContents.graphql b/src/graphql/operations/devGetContents.graphql index b0be407..8047400 100644 --- a/src/graphql/operations/devGetContents.graphql +++ b/src/graphql/operations/devGetContents.graphql @@ -82,4 +82,3 @@ query devGetContents { } } } - diff --git a/src/graphql/operations/devGetLibraryItems.graphql b/src/graphql/operations/devGetLibraryItems.graphql index 6d32ac7..e6fecfd 100644 --- a/src/graphql/operations/devGetLibraryItems.graphql +++ b/src/graphql/operations/devGetLibraryItems.graphql @@ -1,183 +1,183 @@ query devGetLibraryItems { - libraryItems(pagination: { limit: -1 }) { - data { - id - attributes { - slug - thumbnail { - data { - id - } - } - subitems { - data { - id - } - } - subitem_of { - data { - id - } - } - root_item - price { - amount - currency { - data { - id - } - } - } - metadata { - __typename - } - size { - width - height - thickness - } - release_date { - year - month - day - } - descriptions { - description - language { - data { - id - } - } - } - contents { - data { - id - } - } - digital - categories { - data { - id - } - } - urls { - url - } - images { - language { - data { - id - } - } - source_language { - data { - id - } - } - status - scanners { - data { - id - } - } - cleaners { - data { - id - } - } - typesetters { - data { - id - } - } - cover { - front { - data { - id - } - } - spine { - data { - id - } - } - back { - data { - id - } - } - full { - data { - id - } - } - } - dust_jacket { - front { - data { - id - } - } - spine { - data { - id - } - } - back { - data { - id - } - } - flap_front { - data { - id - } - } - flap_back { - data { - id - } - } - full { - data { - id - } - } - } - obi_belt { - front { - data { - id - } - } - spine { - data { - id - } - } - back { - data { - id - } - } - flap_front { - data { - id - } - } - flap_back { - data { - id - } - } - full { - data { - id - } - } - } - } - } - } - } + libraryItems(pagination: { limit: -1 }) { + data { + id + attributes { + slug + thumbnail { + data { + id + } + } + subitems { + data { + id + } + } + subitem_of { + data { + id + } + } + root_item + price { + amount + currency { + data { + id + } + } + } + metadata { + __typename + } + size { + width + height + thickness + } + release_date { + year + month + day + } + descriptions { + description + language { + data { + id + } + } + } + contents { + data { + id + } + } + digital + categories { + data { + id + } + } + urls { + url + } + images { + language { + data { + id + } + } + source_language { + data { + id + } + } + status + scanners { + data { + id + } + } + cleaners { + data { + id + } + } + typesetters { + data { + id + } + } + cover { + front { + data { + id + } + } + spine { + data { + id + } + } + back { + data { + id + } + } + full { + data { + id + } + } + } + dust_jacket { + front { + data { + id + } + } + spine { + data { + id + } + } + back { + data { + id + } + } + flap_front { + data { + id + } + } + flap_back { + data { + id + } + } + full { + data { + id + } + } + } + obi_belt { + front { + data { + id + } + } + spine { + data { + id + } + } + back { + data { + id + } + } + flap_front { + data { + id + } + } + flap_back { + data { + id + } + } + full { + data { + id + } + } + } + } + } + } + } } diff --git a/src/graphql/operations/getContentText.graphql b/src/graphql/operations/getContentText.graphql index 1089e45..c35af05 100644 --- a/src/graphql/operations/getContentText.graphql +++ b/src/graphql/operations/getContentText.graphql @@ -1,190 +1,190 @@ query getContentText($slug: String, $language_code: String) { - contents(filters: { slug: { eq: $slug } }) { - data { - id - attributes { - slug - titles { - pre_title - title - subtitle - description - } - categories { - data { - id - attributes { - name - short - } - } - } - type { - data { - attributes { - slug - titles(filters: { language: { code: { eq: $language_code } } }) { - title - } - } - } - } - ranged_contents { - data { - id - attributes { - slug - scan_set { - id - } - library_item { - data { - attributes { - slug - title - subtitle - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - } - } - } - } - } - } - text_set { - status - text - language { - data { - attributes { - code - } - } - } - source_language { - data { - attributes { - code - } - } - } - transcribers { - data { - id - attributes { - ...recorderChip - } - } - } - translators { - data { - id - attributes { - ...recorderChip - } - } - } - proofreaders { - data { - id - attributes { - ...recorderChip - } - } - } - notes - } - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - previous_recommended { - data { - attributes { - slug - titles(filters: { language: { code: { eq: $language_code } } }) { - pre_title - title - subtitle - } - categories { - data { - id - attributes { - short - } - } - } - type { - data { - attributes { - slug - titles( - filters: { language: { code: { eq: $language_code } } } - ) { - title - } - } - } - } - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - } - } - } - next_recommended { - data { - attributes { - slug - titles(filters: { language: { code: { eq: $language_code } } }) { - pre_title - title - subtitle - } - categories { - data { - id - attributes { - short - } - } - } - type { - data { - attributes { - slug - titles( - filters: { language: { code: { eq: $language_code } } } - ) { - title - } - } - } - } - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - } - } - } - } - } - } -} \ No newline at end of file + contents(filters: { slug: { eq: $slug } }) { + data { + id + attributes { + slug + titles { + pre_title + title + subtitle + description + } + categories { + data { + id + attributes { + name + short + } + } + } + type { + data { + attributes { + slug + titles(filters: { language: { code: { eq: $language_code } } }) { + title + } + } + } + } + ranged_contents { + data { + id + attributes { + slug + scan_set { + id + } + library_item { + data { + attributes { + slug + title + subtitle + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + } + } + } + } + } + } + text_set { + status + text + language { + data { + attributes { + code + } + } + } + source_language { + data { + attributes { + code + } + } + } + transcribers { + data { + id + attributes { + ...recorderChip + } + } + } + translators { + data { + id + attributes { + ...recorderChip + } + } + } + proofreaders { + data { + id + attributes { + ...recorderChip + } + } + } + notes + } + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + previous_recommended { + data { + attributes { + slug + titles(filters: { language: { code: { eq: $language_code } } }) { + pre_title + title + subtitle + } + categories { + data { + id + attributes { + short + } + } + } + type { + data { + attributes { + slug + titles( + filters: { language: { code: { eq: $language_code } } } + ) { + title + } + } + } + } + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + } + } + } + next_recommended { + data { + attributes { + slug + titles(filters: { language: { code: { eq: $language_code } } }) { + pre_title + title + subtitle + } + categories { + data { + id + attributes { + short + } + } + } + type { + data { + attributes { + slug + titles( + filters: { language: { code: { eq: $language_code } } } + ) { + title + } + } + } + } + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + } + } + } + } + } + } +} diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index 337c561..1e66aca 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -1,4 +1,5 @@ import AppLayout from "components/AppLayout"; +import Switch from "components/Inputs/Switch"; import PanelHeader from "components/PanelComponents/PanelHeader"; import ReturnButton, { ReturnButtonType, @@ -7,7 +8,6 @@ import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import Switch from "components/Inputs/Switch"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideoChannelQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx index 4479cf8..66c5732 100644 --- a/src/pages/archives/videos/index.tsx +++ b/src/pages/archives/videos/index.tsx @@ -1,5 +1,6 @@ import AppLayout from "components/AppLayout"; import PageSelector from "components/Inputs/PageSelector"; +import Switch from "components/Inputs/Switch"; import PanelHeader from "components/PanelComponents/PanelHeader"; import ReturnButton, { ReturnButtonType, @@ -8,7 +9,6 @@ import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import Switch from "components/Inputs/Switch"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideosPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx index 72c89e5..b768ac6 100644 --- a/src/pages/archives/videos/v/[uid].tsx +++ b/src/pages/archives/videos/v/[uid].tsx @@ -1,6 +1,6 @@ import AppLayout from "components/AppLayout"; -import Button from "components/Inputs/Button"; import HorizontalLine from "components/HorizontalLine"; +import Button from "components/Inputs/Button"; import InsetBox from "components/InsetBox"; import NavOption from "components/PanelComponents/NavOption"; import ReturnButton, { diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index d84c82f..0bda034 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -1,12 +1,12 @@ import AppLayout from "components/AppLayout"; import Chip from "components/Chip"; +import Select from "components/Inputs/Select"; +import Switch from "components/Inputs/Switch"; import PanelHeader from "components/PanelComponents/PanelHeader"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import Select from "components/Inputs/Select"; -import Switch from "components/Inputs/Switch"; import ThumbnailPreview from "components/PreviewCard"; import { GetContentsQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx index 4513f03..0555e0f 100644 --- a/src/pages/dev/checkup/libraryitems.tsx +++ b/src/pages/dev/checkup/libraryitems.tsx @@ -670,9 +670,9 @@ function testingLibraryItem(libraryItems: Props["libraryItems"]): Report { ) { const descriptionLanguages: string[] = []; - item.attributes.descriptions?.map((description, descriptionIndex) => { + item.attributes.descriptions.map((description, descriptionIndex) => { if (description && item.attributes) { - if (description?.description.length < 10) { + if (description.description.length < 10) { report.lines.push({ subitems: [ item.attributes.slug, @@ -748,8 +748,6 @@ function testingLibraryItem(libraryItems: Props["libraryItems"]): Report { frontendUrl: frontendUrl, }); } - - } }); diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx index 318c78b..d0ee755 100644 --- a/src/pages/library/[slug]/index.tsx +++ b/src/pages/library/[slug]/index.tsx @@ -1,7 +1,8 @@ import AppLayout from "components/AppLayout"; -import Button from "components/Inputs/Button"; import Chip from "components/Chip"; import Img, { getAssetURL, ImageQuality } from "components/Img"; +import Button from "components/Inputs/Button"; +import Switch from "components/Inputs/Switch"; import InsetBox from "components/InsetBox"; import ContentLine from "components/Library/ContentLine"; import LightBox from "components/LightBox"; @@ -13,7 +14,6 @@ import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import Switch from "components/Inputs/Switch"; import ThumbnailPreview from "components/PreviewCard"; import { useAppLayout } from "contexts/AppLayoutContext"; import { diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 160e39a..89eb620 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -1,12 +1,12 @@ import AppLayout from "components/AppLayout"; import Chip from "components/Chip"; +import Select from "components/Inputs/Select"; +import Switch from "components/Inputs/Switch"; import PanelHeader from "components/PanelComponents/PanelHeader"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import Select from "components/Inputs/Select"; -import Switch from "components/Inputs/Switch"; import ThumbnailPreview from "components/PreviewCard"; import { GetLibraryItemsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index 5ed6f5d..e4bad83 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -1,10 +1,10 @@ import AppLayout from "components/AppLayout"; +import Switch from "components/Inputs/Switch"; import PanelHeader from "components/PanelComponents/PanelHeader"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import Switch from "components/Inputs/Switch"; import ThumbnailPreview from "components/PreviewCard"; import { GetPostsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk";