From 77d96a3dc30a892ca4f20946f0cd9144b42e5a7e Mon Sep 17 00:00:00 2001
From: DrMint
Date: Sun, 28 Aug 2022 17:40:41 +0200
Subject: [PATCH] Fixed eslint warnings + configure prettier
---
.eslintignore | 3 +-
.eslintrc.js | 17 +-
graphql-codegen.config.js | 11 +-
next-sitemap.config.js | 11 +-
package.json | 6 +-
prettier.config.js | 21 +
public/local-data/currencies.json | 92 +-
public/local-data/languages.json | 37 +-
public/local-data/websiteInterfaces.json | 887 +++++++++++++++++-
src/components/AnchorShare.tsx | 21 +-
src/components/AppLayout.tsx | 187 ++--
src/components/Chip.tsx | 9 +-
.../Chronicles/ChroniclePreview.tsx | 39 +-
src/components/Chronicles/ChroniclesList.tsx | 75 +-
src/components/HorizontalLine.tsx | 6 +-
src/components/Ico.tsx | 6 +-
src/components/Img.tsx | 18 +-
src/components/Inputs/Button.tsx | 38 +-
src/components/Inputs/ButtonGroup.tsx | 8 +-
src/components/Inputs/LanguageSwitcher.tsx | 3 +-
src/components/Inputs/Link.tsx | 3 +-
src/components/Inputs/OrderableList.tsx | 14 +-
src/components/Inputs/PageSelector.tsx | 7 +-
src/components/Inputs/Select.tsx | 35 +-
src/components/Inputs/Switch.tsx | 19 +-
src/components/Inputs/WithLabel.tsx | 15 +-
src/components/InsetBox.tsx | 6 +-
src/components/Library/PreviewCardCTAs.tsx | 92 +-
src/components/LightBox.tsx | 34 +-
src/components/Markdown/Markdawn.tsx | 111 +--
src/components/PanelComponents/NavOption.tsx | 19 +-
.../PanelComponents/PanelHeader.tsx | 6 +-
.../PanelComponents/ReturnButton.tsx | 19 +-
src/components/Panels/ContentPanel.tsx | 3 +-
src/components/Panels/MainPanel.tsx | 40 +-
src/components/Panels/SubPanel.tsx | 3 +-
src/components/Popup.tsx | 18 +-
src/components/PostPage.tsx | 67 +-
src/components/PreviewCard.tsx | 112 +--
src/components/PreviewLine.tsx | 18 +-
src/components/RecorderChip.tsx | 23 +-
src/components/SmartList.tsx | 43 +-
src/components/ThumbnailHeader.tsx | 25 +-
src/components/ToolTip.tsx | 3 +-
src/components/Wiki/DefinitionCard.tsx | 25 +-
src/contexts/AppLayoutContext.tsx | 103 +-
src/graphql/fetchLocalData.ts | 10 +-
src/graphql/getPostStaticProps.ts | 12 +-
src/graphql/operations/getChronicle.graphql | 4 +-
.../operations/getChronologyItems.graphql | 5 +-
src/graphql/operations/getContentText.graphql | 36 +-
.../operations/getContentsFolder.graphql | 4 +-
src/graphql/operations/getLibraryItem.graphql | 56 +-
.../operations/getLibraryItemScans.graphql | 20 +-
.../operations/getLibraryItemsPreview.graphql | 20 +-
.../localDataGetWebsiteInterfaces.graphql | 3 +
src/helpers/component.tsx | 6 +-
src/helpers/date.ts | 6 +-
src/helpers/formatters.ts | 10 +-
src/helpers/img.ts | 17 +-
src/helpers/libraryItem.ts | 15 +-
src/helpers/localData.ts | 23 +-
src/helpers/locales.ts | 8 +-
src/helpers/numbers.ts | 9 +-
src/helpers/openGraph.ts | 21 +-
src/helpers/others.ts | 48 +-
src/hooks/useLightBox.tsx | 5 +-
src/hooks/useLocalData.ts | 5 +-
src/hooks/useMediaQuery.ts | 6 +-
src/hooks/useOnResize.ts | 5 +-
src/hooks/useOnScroll.ts | 10 +-
src/hooks/useScrollTopOnChange.ts | 11 +-
src/hooks/useSmartLanguage.ts | 14 +-
src/pages/_document.tsx | 41 +-
src/pages/about-us/accords-handbook.tsx | 5 +-
src/pages/about-us/contact.tsx | 27 +-
src/pages/about-us/index.tsx | 12 +-
src/pages/about-us/legality.tsx | 5 +-
src/pages/about-us/sharing-policy.tsx | 5 +-
src/pages/api/revalidate.ts | 29 +-
src/pages/archives/videos/c/[uid].tsx | 55 +-
src/pages/archives/videos/index.tsx | 30 +-
src/pages/archives/videos/v/[uid].tsx | 74 +-
src/pages/chronicles/[slug]/index.tsx | 196 ++--
src/pages/chronicles/index.tsx | 35 +-
src/pages/contents/[slug].tsx | 328 +++----
src/pages/contents/all.tsx | 56 +-
src/pages/contents/folder/[slug].tsx | 94 +-
src/pages/contents/index.tsx | 4 +-
src/pages/dev/checkup/contents.tsx | 316 +++----
src/pages/dev/checkup/libraryitems.tsx | 219 ++---
src/pages/dev/editor.tsx | 139 +--
src/pages/dev/transcript.tsx | 62 +-
src/pages/index.tsx | 9 +-
src/pages/library/[slug]/index.tsx | 451 ++++-----
src/pages/library/[slug]/scans.tsx | 395 +++-----
src/pages/library/index.tsx | 107 +--
src/pages/news/[slug].tsx | 21 +-
src/pages/news/index.tsx | 32 +-
src/pages/wiki/[slug]/index.tsx | 198 ++--
src/pages/wiki/chronology.tsx | 261 ++----
src/pages/wiki/index.tsx | 59 +-
src/tailwind.css | 6 +-
src/types/SelectiveNonNullable.ts | 18 +-
src/{helpers => types}/types.ts | 10 +-
tailwind.config.js | 4 +-
106 files changed, 2637 insertions(+), 3413 deletions(-)
create mode 100644 prettier.config.js
rename src/{helpers => types}/types.ts (86%)
diff --git a/.eslintignore b/.eslintignore
index 1d947a8..bc3ec05 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -7,4 +7,5 @@ next.config.js
postcss.config.js
tailwind.config.js
design.config.js
-graphql.config.js
\ No newline at end of file
+graphql.config.js
+prettier.config.js
\ No newline at end of file
diff --git a/.eslintrc.js b/.eslintrc.js
index 806a5e6..36028d7 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -81,7 +81,7 @@ module.exports = {
// "no-magic-numbers": "warn",
// "no-mixed-operators": "warn",
"no-multi-assign": "warn",
- "no-multi-str": "warn",
+ // "no-multi-str": "warn",
"no-negated-condition": "warn",
// "no-nested-ternary": "warn",
"no-new": "warn",
@@ -149,24 +149,15 @@ module.exports = {
"@typescript-eslint/ban-tslint-comment": "warn",
"@typescript-eslint/class-literal-property-style": "warn",
"@typescript-eslint/consistent-indexed-object-style": "warn",
- "@typescript-eslint/consistent-type-assertions": [
- "warn",
- { assertionStyle: "as" },
- ],
+ "@typescript-eslint/consistent-type-assertions": ["warn", { assertionStyle: "as" }],
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/method-signature-style": ["error", "property"],
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
- "@typescript-eslint/no-confusing-void-expression": [
- "error",
- { ignoreArrowShorthand: true },
- ],
+ "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
"@typescript-eslint/no-dynamic-delete": "error",
- "@typescript-eslint/no-empty-interface": [
- "error",
- { allowSingleExtends: true },
- ],
+ "@typescript-eslint/no-empty-interface": ["error", { allowSingleExtends: true }],
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
diff --git a/graphql-codegen.config.js b/graphql-codegen.config.js
index 2155cde..4e84bd5 100644
--- a/graphql-codegen.config.js
+++ b/graphql-codegen.config.js
@@ -8,17 +8,10 @@ module.exports = {
headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
},
},
- documents: [
- "src/graphql/operations/**/*.graphql",
- "src/graphql/fragments/*.graphql",
- ],
+ documents: ["src/graphql/operations/**/*.graphql", "src/graphql/fragments/*.graphql"],
generates: {
"src/graphql/generated.ts": {
- plugins: [
- "typescript",
- "typescript-operations",
- "typescript-graphql-request",
- ],
+ plugins: ["typescript", "typescript-operations", "typescript-graphql-request"],
},
},
};
diff --git a/next-sitemap.config.js b/next-sitemap.config.js
index 3f572fb..ac4672d 100644
--- a/next-sitemap.config.js
+++ b/next-sitemap.config.js
@@ -24,14 +24,5 @@ module.exports = {
hreflang: "ja",
},
],
- exclude: [
- "/en/*",
- "/fr/*",
- "/ja/*",
- "/es/*",
- "/pt-br/*",
- "/404",
- "/500",
- "/dev/*",
- ],
+ exclude: ["/en/*", "/fr/*", "/ja/*", "/es/*", "/pt-br/*", "/404", "/500", "/dev/*"],
};
diff --git a/package.json b/package.json
index 6dac116..cd58a64 100644
--- a/package.json
+++ b/package.json
@@ -3,10 +3,10 @@
"private": true,
"scripts": {
"dev": "next dev -p 12499",
- "precommit": "npm run generate && npm run fetch-local-data && npm run prettier && npm run unused-exports && npm run eslint && npm run tsc && echo ALL PRECOMMIT CHECKS PASSED SUCCESSFULLY, LET\\'S FUCKING GO!",
+ "precommit": "npm run fetch-local-data && npm run prettier && npm run unused-exports && npm run eslint && npm run tsc && echo ALL PRECOMMIT CHECKS PASSED SUCCESSFULLY, LET\\'S FUCKING GO!",
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport=src/pages --ignoreFiles=generated",
- "fetch-local-data": "esrun src/graphql/fetchLocalData.ts",
- "prebuild": "npm run generate && npm run fetch-local-data",
+ "fetch-local-data": "npm run generate && esrun src/graphql/fetchLocalData.ts",
+ "prebuild": "npm run fetch-local-data",
"build": "next build",
"postbuild": "next-sitemap --config next-sitemap.config.js",
"start": "next start -p 12500",
diff --git a/prettier.config.js b/prettier.config.js
new file mode 100644
index 0000000..0f4e508
--- /dev/null
+++ b/prettier.config.js
@@ -0,0 +1,21 @@
+module.exports = {
+ printWidth: 100,
+ tabWidth: 2,
+ useTabs: false,
+ semi: true,
+ singleQuote: false,
+ quoteProps: "as-needed",
+ jsxSingleQuote: false,
+ trailingComma: "es5",
+ bracketSpacing: true,
+ bracketSameLine: true,
+ arrowParens: "always",
+ rangeStart: 0,
+ rangeEnd: Infinity,
+ requirePragma: false,
+ insertPragma: false,
+ proseWrap: "preserve",
+ htmlWhitespaceSensitivity: "ignore",
+ endOfLine: "lf",
+ singleAttributePerLine: false,
+};
diff --git a/public/local-data/currencies.json b/public/local-data/currencies.json
index 2b40fc9..3ee18ae 100644
--- a/public/local-data/currencies.json
+++ b/public/local-data/currencies.json
@@ -1 +1,91 @@
-{"currencies":{"data":[{"id":"1","attributes":{"code":"EUR","symbol":"€","rate_to_usd":1.1062771,"display_decimals":true}},{"id":"2","attributes":{"code":"CAD","symbol":"$","rate_to_usd":0.79319156,"display_decimals":true}},{"id":"3","attributes":{"code":"USD","symbol":"$","rate_to_usd":1,"display_decimals":true}},{"id":"4","attributes":{"code":"JPY","symbol":"¥","rate_to_usd":0.0083864261,"display_decimals":false}},{"id":"5","attributes":{"code":"BRL","symbol":"R$","rate_to_usd":0.19904328,"display_decimals":true}},{"id":"6","attributes":{"code":"GBP","symbol":"£","rate_to_usd":1.3181323,"display_decimals":true}},{"id":"7","attributes":{"code":"AUD","symbol":"$","rate_to_usd":0.7422,"display_decimals":true}},{"id":"8","attributes":{"code":"INR","symbol":"₹","rate_to_usd":0.013162881,"display_decimals":false}},{"id":"9","attributes":{"code":"NZD","symbol":"$","rate_to_usd":0.69089984,"display_decimals":true}},{"id":"10","attributes":{"code":"CHF","symbol":"CHF","rate_to_usd":1.0728706,"display_decimals":true}}]}}
\ No newline at end of file
+{
+ "currencies": {
+ "data": [
+ {
+ "id": "1",
+ "attributes": {
+ "code": "EUR",
+ "symbol": "€",
+ "rate_to_usd": 1.1062771,
+ "display_decimals": true
+ }
+ },
+ {
+ "id": "2",
+ "attributes": {
+ "code": "CAD",
+ "symbol": "$",
+ "rate_to_usd": 0.79319156,
+ "display_decimals": true
+ }
+ },
+ {
+ "id": "3",
+ "attributes": { "code": "USD", "symbol": "$", "rate_to_usd": 1, "display_decimals": true }
+ },
+ {
+ "id": "4",
+ "attributes": {
+ "code": "JPY",
+ "symbol": "¥",
+ "rate_to_usd": 0.0083864261,
+ "display_decimals": false
+ }
+ },
+ {
+ "id": "5",
+ "attributes": {
+ "code": "BRL",
+ "symbol": "R$",
+ "rate_to_usd": 0.19904328,
+ "display_decimals": true
+ }
+ },
+ {
+ "id": "6",
+ "attributes": {
+ "code": "GBP",
+ "symbol": "£",
+ "rate_to_usd": 1.3181323,
+ "display_decimals": true
+ }
+ },
+ {
+ "id": "7",
+ "attributes": {
+ "code": "AUD",
+ "symbol": "$",
+ "rate_to_usd": 0.7422,
+ "display_decimals": true
+ }
+ },
+ {
+ "id": "8",
+ "attributes": {
+ "code": "INR",
+ "symbol": "₹",
+ "rate_to_usd": 0.013162881,
+ "display_decimals": false
+ }
+ },
+ {
+ "id": "9",
+ "attributes": {
+ "code": "NZD",
+ "symbol": "$",
+ "rate_to_usd": 0.69089984,
+ "display_decimals": true
+ }
+ },
+ {
+ "id": "10",
+ "attributes": {
+ "code": "CHF",
+ "symbol": "CHF",
+ "rate_to_usd": 1.0728706,
+ "display_decimals": true
+ }
+ }
+ ]
+ }
+}
diff --git a/public/local-data/languages.json b/public/local-data/languages.json
index a4f33d1..cb3a003 100644
--- a/public/local-data/languages.json
+++ b/public/local-data/languages.json
@@ -1 +1,36 @@
-{"languages":{"data":[{"id":"1","attributes":{"name":"French","code":"fr","localized_name":"Français"}},{"id":"2","attributes":{"name":"English","code":"en","localized_name":"English"}},{"id":"3","attributes":{"name":"Japanese","code":"ja","localized_name":"日本語"}},{"id":"4","attributes":{"name":"Spanish","code":"es","localized_name":"Español"}},{"id":"6","attributes":{"name":"Portuguese (Brazil)","code":"pt-br","localized_name":"Português (Brasil)"}},{"id":"8","attributes":{"name":"German","code":"de","localized_name":"Deutsch"}},{"id":"9","attributes":{"name":"Italian","code":"it","localized_name":"Italiano"}},{"id":"10","attributes":{"name":"Russian","code":"ru","localized_name":"русский"}},{"id":"11","attributes":{"name":"Korean","code":"ko","localized_name":"한국어"}},{"id":"12","attributes":{"name":"Chinese (Traditional)","code":"zh-cht","localized_name":"中文(繁體)"}}]}}
\ No newline at end of file
+{
+ "languages": {
+ "data": [
+ { "id": "1", "attributes": { "name": "French", "code": "fr", "localized_name": "Français" } },
+ { "id": "2", "attributes": { "name": "English", "code": "en", "localized_name": "English" } },
+ { "id": "3", "attributes": { "name": "Japanese", "code": "ja", "localized_name": "日本語" } },
+ { "id": "4", "attributes": { "name": "Spanish", "code": "es", "localized_name": "Español" } },
+ {
+ "id": "6",
+ "attributes": {
+ "name": "Portuguese (Brazil)",
+ "code": "pt-br",
+ "localized_name": "Português (Brasil)"
+ }
+ },
+ { "id": "8", "attributes": { "name": "German", "code": "de", "localized_name": "Deutsch" } },
+ {
+ "id": "9",
+ "attributes": { "name": "Italian", "code": "it", "localized_name": "Italiano" }
+ },
+ {
+ "id": "10",
+ "attributes": { "name": "Russian", "code": "ru", "localized_name": "русский" }
+ },
+ { "id": "11", "attributes": { "name": "Korean", "code": "ko", "localized_name": "한국어" } },
+ {
+ "id": "12",
+ "attributes": {
+ "name": "Chinese (Traditional)",
+ "code": "zh-cht",
+ "localized_name": "中文(繁體)"
+ }
+ }
+ ]
+ }
+}
diff --git a/public/local-data/websiteInterfaces.json b/public/local-data/websiteInterfaces.json
index 2d27425..fdaddd4 100644
--- a/public/local-data/websiteInterfaces.json
+++ b/public/local-data/websiteInterfaces.json
@@ -1 +1,886 @@
-{"websiteInterfaces":{"data":[{"attributes":{"ui_language":{"data":{"attributes":{"code":"en"}}},"library":"Library","contents":"Contents","wiki":"Wiki","chronicles":"Chronicles","library_short_description":"Browse all physical and digital media","contents_short_description":"Explore all content and filter by type or category","wiki_short_description":"An encyclopedia for everything related to DrakeNieR","chronicles_short_description":"Experience all events and content in chronological order","news":"News","merch":"Merch","gallery":"Gallery","archives":"Archives","about_us":"About us","licensing_notice":"This website’s content is made available under [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) unless otherwise noted.","copyright_notice":"Accord’s Library is not affiliated with or endorsed by SQUARE ENIX CO. LTD. All game assets and promotional materials belongs to © SQUARE ENIX CO. LTD.","contents_description":"All the contents (textual, audio, and video) from the Library or other online sources.","type":"Type","category":"Category","categories":"Categories","size":"Size","release_date":"Release date","release_year":"Release year","details":"Details","price":"Price","width":"Width","height":"Height","thickness":"Thickness","subitem":"Subitem","subitems":"Subitems","subitem_of":"Subitem of","variant":"Variant","variants":"Variants","variant_of":"Variant of","summary":"Summary","audio":"Audio","video":"Video","textual":"Textual","game":"Game","other":"Other","return_to":"Return to","left_to_right":"Left to right","right_to_left":"Right to left","page":"Page","pages":"Pages","page_order":"Page order","binding":"Binding","type_information":"Type information","front_matter":"Front matter","back_matter":"Back matter","open_content":"Open content","read_content":"Read content","watch_content":"Watch content","listen_content":"Listen to content","view_scans":"View scans","paperback":"Paperback","hardcover":"Hardcover","languages":"Languages","select_language":"Select a language","language":"Language","library_description":"A comprehensive list of all Yokoverse’s side materials (books, novellas, artbooks, stage plays, manga, drama CDs, and comics). For each, we provide photos, scans, and transcript of the content, information about what it is, when and how it was released, size, initial price…","wiki_description":"An encyclopedia for everything related to DrakeNieR. Right now, we only have the Chronology but a lot more pages are planned to be released!","chronicles_description":"Experience all events and content in chronological order.","news_description":"News articles written by our Recorders! Here you will find announcements about new merch/items releases, guides, theories, unboxings, showcases...","merch_description":"Harum ut consequatur a earum explicabo suscipit. Nostrum asperiores consectetur aperiam in ut sunt. Ipsa quibusdam et vel quam voluptas placeat. Qui est aliquam voluptatem. Tempora nisi exercitationem tempore sapiente expedita. Voluptas ut eaque nulla sunt ut dolor corrupti quos.","gallery_description":"A fully tagged Danbooru-styled gallery with currently more than a thousand unique official artworks.","archives_description":"Besides physical medias, we also archive digital contents such as websites, webpages, videos, and documents.","about_us_description":"Find more information about the Accord's Library project in the following pages.","page_not_found":"Page not found","default_description":"Accord's Library aims at gathering and archiving all of Yoko Taro’s work. Yoko Taro is a Japanese video game director and scenario writer.","name":"Name","show_subitems":"Show subitems","show_primary_items":"Show primary items","show_secondary_items":"Show secondary items","no_type":"No type","no_year":"No year","order_by":"Order by","group_by":"Group by","select_option_sidebar":"Select one of the options in the sidebar","group":"Group","settings":"Settings","theme":"Theme","light":"Light","auto":"Auto","dark":"Dark","font_size":"Font size","player_name":"Player name","currency":"Currency","font":"Font","calculated":"Calculated","status_incomplete":"This entry is only partially translated/transcribed.","status_draft":"This entry is just a draft. It usually means that this is a work-in-progress. Translation/transcription might be poor and/or computer-generated.","status_review":"This entry has not yet being proofread. The content should still be accurate.","status_done":"This entry has been checked and proofread. If you notice any translation errors or typos, please contact us so we can fix it!","incomplete":"Incomplete","draft":"Draft","review":"Review","done":"Done","status":"Status","transcribers":"Transcribers","translators":"Translators","proofreaders":"Proofreaders","transcript_notice":"This content is a transcript","translation_notice":"This content is a fan-translation","source_language":"Source language","pronouns":"Pronouns","no_category":"No category","item":"Item","items":"Items","content":"Content","result":"Result","results":"Results","language_switch_message":"","open_settings":"Open settings","change_language":"Change language","open_search":"Open search","chronology":"Chronology","accords_handbook":"Accord's Handbook","legality":"Legality","members":"Members","sharing_policy":"Sharing Policy","contact_us":"Contact us","email":"Email","email_gdpr_notice":"We only use your email in order to contact you in regard to your request. We do not share this email with anyone nor use it for any other purpose.","message":"Message","send":"Send","response_invalid_code":"Verification code is incorrect.","response_invalid_email":"Please enter a valid email address!","response_email_success":"Thank you for contacting us! We will be in touch with you shortly.","always_show_info":"Always show info","item_not_available":"This item is not for sale or is no longer available","primary_language":"Primary language","secondary_language":"Secondary languages","combine_related_contents":"Combine related contents","previous_content":"Previous content","followup_content":"Follow-up content","videos":"Videos","view_on":"View on","channel":"Channel","subscribers":"Subscribers","description":"Description","available_at":"Available at","search_title":"Search title...","want_it":"I want it!","have_it":"I have it!","source":"Source","reset_all_filters":"Reset all filters","only_display_items_i_have":"Only display items marked as “I have”","only_display_items_i_want":"Only display items marked as “I want”","only_display_unmarked_items":"Only display unmarked items","display_all_items":"Display all items","table_of_contents":"Table of Contents","definition":"Definition","no_results_message":"No results. You can try changing or resetting the search parameters.","all":"All","special_pages":"Special Pages","scan":"Scan","scanlation":"Scanlation","scanners":"Scanners","cleaners":"Cleaners","typesetters":"Typesetters","notes":"Notes","cover":"Cover","tags":"Tags","no_source_warning":"No source!","copy_anchor_link":"Click to copy the archor link","anchor_link_copied":"Copied! 👍","folders":"Folders","empty_folder_message":"This folder is empty"}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"fr"}}},"library":"Bibliothèque","contents":"Contenus","wiki":"Wiki","chronicles":"Chroniques","library_short_description":"Explorer l'ensemble des médias physique ou numérique","contents_short_description":"Explorer tout les contenus et filtrer par type ou par catégorie","wiki_short_description":"Une encyclopédie pour tout l'univers DrakeNieR","chronicles_short_description":"Parcourir tous les événements et les contenu dans l'ordre chronologique","news":"News","merch":"Merch","gallery":"Galerie","archives":"Archives","about_us":"À propos","licensing_notice":"Le contenu de ce site web est mis à disposition sous licence [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/), sauf indication contraire.","copyright_notice":"Accord's Library n'est pas affiliée ni approuvée par SQUARE ENIX CO. LTD. Tous les contenus du jeu et les contenus promotionnel appartiennent à © SQUARE ENIX CO. LTD.","contents_description":"","type":"Type","category":"Catégorie","categories":"Catégories","size":"Dimension","release_date":"Date de sortie","release_year":"Année de sortie","details":"Détails","price":"Prix","width":"Largeur","height":"Hauteur","thickness":"Épaisseur","subitem":"Sous-item","subitems":"Sous-items","subitem_of":"Sous-item de","variant":"Variante","variants":"Variantes","variant_of":"Variante de","summary":"Résumé","audio":"Audio","video":"Vidéo","textual":"Textuel","game":"Jeux","other":"Autre","return_to":"Retourner à ","left_to_right":"Gauche à droite","right_to_left":"Droite à gauche","page":"Page","pages":"Pages","page_order":"Order des pages","binding":"Brochure","type_information":"Information de type","front_matter":"Avant propos","back_matter":"Après propos","open_content":"Parcourir le contenu","read_content":"Lire le contenu","watch_content":"Regarder le contenu","listen_content":"Écouter le contenu","view_scans":"Voir les scans","paperback":"Broché","hardcover":"Relié","languages":"Langues","select_language":"Séléctionner la langue","language":"Langue","library_description":"","wiki_description":"","chronicles_description":"","news_description":"","merch_description":"","gallery_description":"","archives_description":"","about_us_description":"","page_not_found":"Page introuvable","default_description":"Accord's Library a pour but de rassembler et d'archiver l'ensemble des travaux de Yoko Taro. Yoko Taro est un réalisateur et scénariste de jeux vidéo japonais.","name":"Nom","show_subitems":"Afficher les sous-items","show_primary_items":"Afficher les items primaires","show_secondary_items":"Afficher les items secondaires","no_type":"Pas de type","no_year":"Pas d'année","order_by":"Ordonné par","group_by":"Groupé par","select_option_sidebar":"Sélectionner l'une des options de la barre latérale","group":"Groupe","settings":"Paramètres","theme":"Thème","light":"Clair","auto":"Auto","dark":"Sombre","font_size":"Taille de la police","player_name":"Nom du joueur","currency":"Devise","font":"Police d'écriture","calculated":"calculé","status_incomplete":"Cette entrée n'est que partiellement traduite/transcrite.","status_draft":"Cette entrée n'est qu'un brouillon. Cela signifie généralement qu'il s'agit d'un travail en cours. La traduction/transcription peut être médiocre et/ou auto-générée par ordinateur.","status_review":"Cet entrée n'a pas encore été relue. Le contenu devrait néanmoins être correct.","status_done":"Cet entrée a été vérifiée et corrigée. Si vous remarquez des erreurs de traduction ou des fautes de frappe, veuillez nous contacter afin que nous puissions les corriger !","incomplete":"Incomplet","draft":"Ébauche","review":"Pour vérification","done":"Terminé","status":"Statut","transcribers":"Transcripteurs","translators":"Traducteurs","proofreaders":"Correcteurs","transcript_notice":"Ceci est une transcription","translation_notice":"Ceci est une traduction","source_language":"Langue source","pronouns":"Pronoms","no_category":"Pas de categorie","item":"Item","items":"Items","content":"Content","result":"Resultat","results":"Résultats","language_switch_message":"Ce contenu n'est pas disponible dans la langue actuellement sélectionnée. Vous pouvez sélectionner l'une des langues suivantes à la place :","open_settings":"Ouvrir les paramètres","change_language":"Changer de langue","open_search":"Ouvrir le menu de recherche","chronology":"Chronologie","accords_handbook":"Le manuel de Accord","legality":"Légalité","members":"Membres","sharing_policy":"Politique de partage","contact_us":"Nous contacter","email":"Email","email_gdpr_notice":"Nous utilisons votre adresse électronique uniquement pour vous contacter au sujet de votre demande. Nous ne partageons cette adresse avec personne et ne l'utilisons pas à d'autres fins.","message":"Message","send":"Envoyer","response_invalid_code":"Le code de vérification est incorrect.","response_invalid_email":"Veuillez saisir une adresse électronique valide !","response_email_success":"Merci de nous avoir contactés ! Nous prendrons contact avec vous sous peu.","always_show_info":"Toujours montrer les informations","item_not_available":"Cet article n'est pas à vendre ou n'est plus disponible.","primary_language":"Langue principale","secondary_language":"Langues secondaires","combine_related_contents":"Combiner les contenus connexes","previous_content":"Contenu précédent","followup_content":"Contenu suivant","videos":"Videos","view_on":"Voir sur","channel":"Chaîne","subscribers":"Abonnés","description":"Description","available_at":"Disponible sur","search_title":"Rechercher un titre...","want_it":"Je le veux !","have_it":"Je l'ai !","source":"Source","reset_all_filters":"Réinitialiser les filtres","only_display_items_i_have":"Seulement afficher les items marqués avec \"je le veux\"","only_display_items_i_want":"Seulement afficher les items marqués avec \"je l'ai\"","only_display_unmarked_items":"Seulement afficher les items non-marqués","display_all_items":"Afficher tous les items","table_of_contents":"Sommaire","definition":"Definition","no_results_message":"Aucun résultat. Vous pouvez essayer de modifier ou de réinitialiser les paramètres de recherche.","all":"Tous","special_pages":"Pages spéciales","scan":"Scan","scanlation":"Scantrad","scanners":"Scanneurs","cleaners":"Nettoyeurs","typesetters":"Lettreurs","notes":"Notes","cover":"Couverture","tags":"Tags","no_source_warning":"Pas de source !","copy_anchor_link":"Cliquez pour copier le permalien","anchor_link_copied":"Copié ! 👍","folders":null,"empty_folder_message":null}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"ja"}}},"library":"ライブラリー","contents":"コンテンツ","wiki":"ウィキ","chronicles":"クロニクル","library_short_description":"すべての物理メディアとデジタルメディアを見る","contents_short_description":"すべてのコンテンツを検索し、種類やカテゴリーで絞り込むことができます。","wiki_short_description":"ゲーム宇宙に関連するすべての百科事典です。","chronicles_short_description":"すべてのイベントとコンテンツを時系列で体験できる","news":"ニュース","merch":"マーチ","gallery":"ギャラリー","archives":"アーカイブス","about_us":"会社概要","licensing_notice":"このウェブサイトのコンテンツは、特に断りのない限り [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) で提供されています。","copyright_notice":"Accord's Libraryは、株式会社スクウェア・エニックスと提携、または推奨しているものではありません。株式会社スクウェア・エニックスの登録商標です。すべてのゲーム資産およびプロモーション素材は、© SQUARE ENIX CO. LTD.に帰属します。","contents_description":"図書館や他のオンラインソースのすべてのコンテンツ(テキスト、オーディオ、ビデオ)。","type":"タイプ","category":"カテゴリー","categories":"カテゴリー","size":"サイズ","release_date":"発売日","release_year":"発売年","details":"詳細","price":"価格","width":"幅","height":"高さ","thickness":"厚み","subitem":"サブアイテム","subitems":"サブアイテム","subitem_of":"のサブアイテム","variant":"バリアント","variants":"バリアント","variant_of":"のバリアント","summary":"概要","audio":"オーディオ","video":"ビデオ","textual":"テキスト","game":"ゲーム","other":"他","return_to":"戻る","left_to_right":"左から右へ","right_to_left":"右から左へ","page":"ページ","pages":"ページ","page_order":"ページ順序","binding":"製本","type_information":"タイプ情報","front_matter":"フロントマター","back_matter":"バックナンバー","open_content":"コンテンツを開放","read_content":"コンテンツを読む","watch_content":"コンテンツを見る","listen_content":"コンテンツを聴く","view_scans":"スキャンを開放","paperback":"ペーパーバック","hardcover":"ハードカバー","languages":"言語","select_language":"言語を選択する","language":"言語","library_description":"ヨコベースの副教材(書籍、小説、画集、舞台劇、漫画、ドラマCD、コミック)を網羅したリストです。それぞれについて、写真、スキャン、内容の書き起こし、どんなものなのか、いつ、どのように発売されたのか、サイズ、初回価格...などの情報を掲載しています。","wiki_description":"DrakeNieRに関連するすべての百科事典です。現在は年表のみですが、今後多くのページを公開予定です","chronicles_description":"Accord's Libraryは、ヨーコ・タローの全作品を収集・保存することを目的としています。ヨーコ・タローは、日本のゲームディレクター、シナリオライターです。","news_description":"レコーダーが書いたニュース記事です ここでは、新しい商品/アイテムのリリースに関するお知らせ、ガイド、セオリー、アンボックス、ショーケース...をご紹介しています。","merch_description":"","gallery_description":"","archives_description":"","about_us_description":"Accord's Libraryプロジェクトについては、以下のページで詳しくご紹介しています。","page_not_found":"ページが見つかりません","default_description":"Accord's Libraryは、ヨーコ・タローの全作品を収集・保存することを目的としています。ヨーコ・タローは、日本のゲームディレクター、シナリオライターです。","name":"名称","show_subitems":"サブアイテムをみせる","show_primary_items":"一次のイテムをみせる","show_secondary_items":"二次のイテムをみせる","no_type":"タイプなし","no_year":"年なし","order_by":"注文する","group_by":"グループ化する","select_option_sidebar":"サイドバーのオプションを選択します","group":"グループ","settings":"設定","theme":"テーマ","light":"光","auto":"オート","dark":"暗","font_size":"文字サイズ","player_name":"プレイヤー名","currency":"通貨","font":"文字","calculated":"計算された","status_incomplete":"このエントリーは一部のみ翻訳/転記されています。","status_draft":"このエントリーはあくまで下書きです。通常、これは作業中であることを意味します。翻訳/転写は稚拙であったり、コンピュータで作成されたものであったりするかもしれません。","status_review":"このエントリーはまだ校正されていません。内容はまだ正確であるはずです。","status_done":"このエントリーは、チェックと校正を行いました。もし、翻訳ミスや誤字脱字にお気づきの際は、修正いたしますので、ご連絡ください","incomplete":"未完成","draft":"ドラフト","review":"レビュー","done":"完了","status":"状況","transcribers":"トランスクライバー","translators":"翻訳者","proofreaders":"校正者","transcript_notice":"このコンテンツは転写です","translation_notice":"このコンテンツはファンによる翻訳です","source_language":"ソース言語","pronouns":"代名詞","no_category":"カテゴリーなし","item":"項目","items":"項目","content":"コンテンツ","result":"結果","results":"結果","language_switch_message":null,"open_settings":"オープン設定","change_language":"言語を変更する","open_search":"オープンサーチ","chronology":"年表","accords_handbook":"アコードの手引き","legality":"合法性","members":"メンバー紹介","sharing_policy":"共有ポリシー","contact_us":"お問い合わせ","email":"電子メール","email_gdpr_notice":"お客様の電子メールは、お客様のご要望に関してご連絡するためにのみ使用します。この電子メールを誰かと共有したり、他の目的で使用することはありません。","message":"メッセージ","send":"送信","response_invalid_code":"検証コードが正しくありません。","response_invalid_email":"有効なEメールアドレスを入力してください","response_email_success":"お問い合わせありがとうございます。折り返しご連絡させていただきます。","always_show_info":"常に情報を表示する","item_not_available":"この商品は非売品です","primary_language":"主要言語","secondary_language":"二次言語","combine_related_contents":"関連するコンテンツを組み合わせる","previous_content":"前のコンテンツ","followup_content":"フォローアップコンテンツ","videos":"動画","view_on":"見る","channel":"チャンネル","subscribers":"サブスクライバー","description":"説明","available_at":"でご覧いただけます。","search_title":"検索タイトル...","want_it":"欲しいです!","have_it":"持ってます!","source":"出典","reset_all_filters":"すべてのフィルタをリセットする","only_display_items_i_have":"\"持ってる \"と表示されているもののみ表示","only_display_items_i_want":"\"欲しい \"とマークされたものだけを表示する","only_display_unmarked_items":"無印のアイテムのみ表示","display_all_items":"すべての項目を表示する","table_of_contents":"目次","definition":"定義","no_results_message":"結果が出ません。検索条件を変更またはリセットしてみてください。","all":"すべて","special_pages":"特設ページ","scan":null,"scanlation":null,"scanners":null,"cleaners":null,"typesetters":null,"notes":null,"cover":null,"tags":null,"no_source_warning":null,"copy_anchor_link":null,"anchor_link_copied":null,"folders":null,"empty_folder_message":null}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"es"}}},"library":"Librería","contents":"Contenidos","wiki":"Wiki","chronicles":"Crónicas","library_short_description":"Explora todos los medios físicos y digitales","contents_short_description":"Explora todo el contenido y filtra por tipo o categoría","wiki_short_description":"Una enciclopedia para todo lo relacionado con DrakeNieR","chronicles_short_description":"Experimenta todos los eventos y contenidos en orden cronológico","news":"Novedades","merch":"Merch","gallery":"Galería","archives":"Archivos","about_us":"Sobre nosotros","licensing_notice":"El contenido de este sitio web está disponible bajo [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) a menos que se indique lo contrario.","copyright_notice":"Accord's Library no está afiliada ni respaldada por SQUARE ENIX CO. LTD. Todos los archivos de los juegos y material promocional pertenecen a © SQUARE ENIX CO. LTD.","contents_description":"Todo el contenido (textual, audio y video) de la Biblioteca u otras fuentes en línea.","type":"Tipo","category":"Categoría","categories":"Categorías","size":"Tamaño","release_date":"Fecha de lanzamiento","release_year":"Año de lanzamiento","details":"Detalles","price":"Precio","width":"Ancho","height":"Altura","thickness":"Grosor","subitem":"Sub-item","subitems":"Sub-items","subitem_of":"Sub-item de","variant":"Variante","variants":"Variantes","variant_of":"Variante de","summary":"Sumario","audio":"Audio","video":"Video","textual":"Textual","game":"Juego","other":"Otros","return_to":"Volver a","left_to_right":"Izquierda a derecha","right_to_left":"Derecha a izquierda","page":"Página","pages":"Páginas","page_order":"Orden de las páginas","binding":"Encuadernación","type_information":"Tipo de información","front_matter":"Anteportada","back_matter":"Portada anterior","open_content":"Abrir contenido","read_content":"Leer contenido","watch_content":"Ver contenido","listen_content":"Escuchar contenido","view_scans":"Ver escaneos","paperback":"Tapa blanda","hardcover":"Tapa dura","languages":"Idiomas","select_language":"Seleccionar idioma","language":"Idioma","library_description":"Una lista completa de todos los materiales complementarios de Yokoverse (libros, novelas, libros de arte, obras de teatro, manga, CDs novelizados y cómics). Para cada uno, proporcionamos fotos, escaneos y transcripciones del contenido, información sobre qué es, cuándo y cómo se ha publicado, tamaño, precio inicial...","wiki_description":"Una enciclopedia para todo lo relacionado con DrakeNieR. En este momento, solo tenemos la Cronología, ¡pero muchas más páginas están planeadas para ser publicadas!","chronicles_description":"","news_description":"¡Nuevos artículos escritos por nuestros/as Archivistas! Aquí encontrarás anuncios sobre nuevos lanzamientos de merchandising/artículos, guías, teorías, unboxings, showcases...","merch_description":"","gallery_description":"Una galería completamente etiquetada de estilo Danbooru, actualmente con más de mil obras de arte oficiales únicas.","archives_description":"","about_us_description":"Encuentra más información sobre el proyecto de Accord's Library en las siguientes páginas.","page_not_found":"Página no encontrada","default_description":"Accord's Library tiene como objetivo recopilar y archivar todo el trabajo de Yoko Taro. Yoko Taro es un director de videojuegos y escritor de escenarios japonés.","name":"Nombre","show_subitems":"Mostrar sub-items","show_primary_items":"Mostrar items principales","show_secondary_items":"Mostrar items secundarios","no_type":"Ningún tipo","no_year":"Ningún año","order_by":"Ordenar por","group_by":"Agrupar por","select_option_sidebar":"Selecciona una de las opciones en la barra lateral","group":"Grupo","settings":"Ajustes","theme":"Tema","light":"Claro","auto":"Auto","dark":"Oscuro","font_size":"Tamaño de la fuente","player_name":"Nombre del jugador/a","currency":"Divisa","font":"Fuente","calculated":"Calculada","status_incomplete":"Esta entrada está solo parcialmente traducida/transcrita.","status_draft":"Esta entrada es solo un borrador. Por lo general, significa que se trata de un trabajo en curso. La traducción/transcripción puede ser deficiente y/o generada por ordenador.","status_review":"Esta entrada aún no ha sido corregida. No obstante, el contenido debería ser preciso.","status_done":"Esta entrada ha sido revisada y corregida. Si notas algún error de traducción o error tipográfico, contáctanos para que podamos solucionarlo!","incomplete":"Incompleto","draft":"Borrador","review":"Revisado","done":"Completado","status":"Estado","transcribers":"Transcriptores/as","translators":"Traductores/as","proofreaders":"Correctores/as","transcript_notice":"Este contenido es una transcripción","translation_notice":"Este contenido es una traducción de fans","source_language":"Idioma original","pronouns":"Pronombres","no_category":"Ningún categoría","item":null,"items":null,"content":null,"result":null,"results":null,"language_switch_message":null,"open_settings":null,"change_language":null,"open_search":null,"chronology":null,"accords_handbook":null,"legality":null,"members":null,"sharing_policy":null,"contact_us":null,"email":"Email","email_gdpr_notice":"Solo usamos tu correo electrónico exclusivamente para contactarte en relación a tu solicitud. No compartimos este correo electrónico con nadie ni lo usamos para ningún otro propósito.","message":null,"send":null,"response_invalid_code":"El código de verificación es incorrecto.","response_invalid_email":"¡Por favor, introduce una dirección de correo electrónico válida!","response_email_success":"¡Gracias por contactarnos! Nos pondremos en contacto contigo en breve.","always_show_info":null,"item_not_available":null,"primary_language":null,"secondary_language":null,"combine_related_contents":null,"previous_content":null,"followup_content":null,"videos":null,"view_on":null,"channel":null,"subscribers":null,"description":null,"available_at":null,"search_title":null,"want_it":null,"have_it":null,"source":null,"reset_all_filters":null,"only_display_items_i_have":null,"only_display_items_i_want":null,"only_display_unmarked_items":null,"display_all_items":null,"table_of_contents":null,"definition":null,"no_results_message":null,"all":null,"special_pages":null,"scan":null,"scanlation":null,"scanners":null,"cleaners":null,"typesetters":null,"notes":null,"cover":null,"tags":null,"no_source_warning":null,"copy_anchor_link":null,"anchor_link_copied":null,"folders":null,"empty_folder_message":null}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"pt-br"}}},"library":"Coleção","contents":"Conteúdos","wiki":"Wiki","chronicles":"Crônicas","library_short_description":"Procure por todas mídias digitais e físicas","contents_short_description":"Explore todo o conteúdo e filtre por categorias e tipos","wiki_short_description":"Uma enciclopédia com tudo relacionado a DrakeNieR","chronicles_short_description":"Explore as crônicas de DrakeNieR em ordem cronológica.","news":"Notícias","merch":"Mercadorias","gallery":"Galeria","archives":"Arquivos","about_us":"Sobre Nós","licensing_notice":"O conteúdo nesse site está disponível pela CC-BY-SA, a não ser que esteja anotado.","copyright_notice":"Accord's Library não é afiliada ou reconhecida pela SQUARE ENIX CO. LTD. Todos assets de jogos e materiais promocionais pertencem a © SQUARE ENIX CO. LTD.\n\n","contents_description":"","type":"Tipo","category":"Categoria","categories":"Categorias","size":"Tamanho","release_date":"Dia de lançamento","release_year":"Ano de lançamento","details":"Detalhes","price":"Preço","width":"Largura","height":"Altura","thickness":"Grossura","subitem":"Subitem","subitems":"Subitens","subitem_of":"Subitem de","variant":"Variante","variants":"Variantes","variant_of":"Variante de","summary":"Sumário","audio":"Audio","video":"Video","textual":"Textos","game":"Jogos","other":"Outros","return_to":"Voltar para","left_to_right":"Esquerda para direita","right_to_left":"Direita para esquerda","page":"Página","pages":"Páginas","page_order":"Ordem de páginas","binding":"Encadernação","type_information":"Informação do tipo","front_matter":"Pré textual","back_matter":"Pós textual","open_content":"Abrir conteúdo","read_content":"Ler o conteúdo","watch_content":"Assistir o conteúdo","listen_content":"Ouvir o conteúdo","view_scans":"Ver scans","paperback":"Brochura","hardcover":"Capa dura","languages":"Línguas","select_language":"Selecionar língua","language":"Língua","library_description":"","wiki_description":null,"chronicles_description":null,"news_description":"","merch_description":"","gallery_description":"","archives_description":"","about_us_description":"","page_not_found":"Página não encontrada","default_description":null,"name":"Nome","show_subitems":"Mostrar subitens","show_primary_items":"Mostrar itens primários","show_secondary_items":"Mostrar itens secundários","no_type":"Sem tipo","no_year":"Sem ano","order_by":"Ordenar por","group_by":"Agrupar por","select_option_sidebar":"Selecione uma opção na aba lateral","group":"Grupo","settings":"Configurações","theme":"Tema","light":"Claro","auto":"Automático","dark":"Escuro","font_size":"Tamanho da fonte","player_name":"Nome do jogador","currency":"Moeda","font":"Fonte","calculated":"Calculado","status_incomplete":"Este conteúdo está incompleto e não foi traduzido/transcrito completamente.","status_draft":"A tradução/transcrição selecionada é um Rascunho. Isso significa que a tradução pode estar fraca e/ou ter sido gerada por uma inteligência artificial.","status_review":"Este conteúdo ainda não foi Revisado, erros gramaticais podem ser encontrados uma vez que os revisores ainda não leram a tradução.","status_done":"O conteúdo foi completamente traduzido e revisado.","incomplete":"Incompleto","draft":"Rascunho","review":"Review","done":"Concluido","status":"Status","transcribers":"Transcritores","translators":"Tradutores","proofreaders":"Revisores","transcript_notice":"Este conteúdo foi transcrito.","translation_notice":"Este conteúdo é uma tradução de fã.","source_language":"Língua original","pronouns":"Pronomes","no_category":"Sem Categoria","item":"Item","items":"Itens","content":"Conteúdo","result":"Resultado","results":"Resultados","language_switch_message":"Este conteúdo não está disponível na língua selecionada. Você pode escolher uma das seguintes línguas:","open_settings":"Abrir configurações","change_language":"Mudar língua","open_search":"Abrir pesquisa","chronology":"Cronologia","accords_handbook":"Livro de mão da Accord","legality":"Legalidade","members":"Membros","sharing_policy":"Política de compartilhamento","contact_us":"Fale conosco","email":null,"email_gdpr_notice":null,"message":null,"send":null,"response_invalid_code":null,"response_invalid_email":null,"response_email_success":null,"always_show_info":"Mostrar informações","item_not_available":"Item indisponível","primary_language":"Língua primaria","secondary_language":"Línguas secundárias","combine_related_contents":"Combinar relacionados","previous_content":"Conteúdo anterior:","followup_content":"Próximo conteúdo:","videos":"Videos:","view_on":"Ver no:","channel":"Canal","subscribers":"Inscritos","description":"Descrição","available_at":"Disponível no:","search_title":"Pesquisar","want_it":null,"have_it":null,"source":null,"reset_all_filters":null,"only_display_items_i_have":null,"only_display_items_i_want":null,"only_display_unmarked_items":null,"display_all_items":null,"table_of_contents":null,"definition":null,"no_results_message":null,"all":null,"special_pages":null,"scan":null,"scanlation":null,"scanners":null,"cleaners":null,"typesetters":null,"notes":null,"cover":null,"tags":null,"no_source_warning":null,"copy_anchor_link":null,"anchor_link_copied":null,"folders":null,"empty_folder_message":null}}]}}
\ No newline at end of file
+{
+ "websiteInterfaces": {
+ "data": [
+ {
+ "attributes": {
+ "ui_language": { "data": { "attributes": { "code": "en" } } },
+ "library": "Library",
+ "contents": "Contents",
+ "wiki": "Wiki",
+ "chronicles": "Chronicles",
+ "library_short_description": "Browse all physical and digital media",
+ "contents_short_description": "Explore all content and filter by type or category",
+ "wiki_short_description": "An encyclopedia for everything related to DrakeNieR",
+ "chronicles_short_description": "Experience all events and content in chronological order",
+ "news": "News",
+ "merch": "Merch",
+ "gallery": "Gallery",
+ "archives": "Archives",
+ "about_us": "About us",
+ "licensing_notice": "This website’s content is made available under [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) unless otherwise noted.",
+ "copyright_notice": "Accord’s Library is not affiliated with or endorsed by SQUARE ENIX CO. LTD. All game assets and promotional materials belongs to © SQUARE ENIX CO. LTD.",
+ "contents_description": "All the contents (textual, audio, and video) from the Library or other online sources.",
+ "type": "Type",
+ "category": "Category",
+ "categories": "Categories",
+ "size": "Size",
+ "release_date": "Release date",
+ "release_year": "Release year",
+ "details": "Details",
+ "price": "Price",
+ "width": "Width",
+ "height": "Height",
+ "thickness": "Thickness",
+ "subitem": "Subitem",
+ "subitems": "Subitems",
+ "subitem_of": "Subitem of",
+ "variant": "Variant",
+ "variants": "Variants",
+ "variant_of": "Variant of",
+ "summary": "Summary",
+ "audio": "Audio",
+ "video": "Video",
+ "textual": "Textual",
+ "game": "Game",
+ "other": "Other",
+ "return_to": "Return to",
+ "left_to_right": "Left to right",
+ "right_to_left": "Right to left",
+ "page": "Page",
+ "pages": "Pages",
+ "page_order": "Page order",
+ "binding": "Binding",
+ "type_information": "Type information",
+ "front_matter": "Front matter",
+ "back_matter": "Back matter",
+ "open_content": "Open content",
+ "read_content": "Read content",
+ "watch_content": "Watch content",
+ "listen_content": "Listen to content",
+ "view_scans": "View scans",
+ "paperback": "Paperback",
+ "hardcover": "Hardcover",
+ "languages": "Languages",
+ "select_language": "Select a language",
+ "language": "Language",
+ "library_description": "A comprehensive list of all Yokoverse’s side materials (books, novellas, artbooks, stage plays, manga, drama CDs, and comics). For each, we provide photos, scans, and transcript of the content, information about what it is, when and how it was released, size, initial price…",
+ "wiki_description": "An encyclopedia for everything related to DrakeNieR. Right now, we only have the Chronology but a lot more pages are planned to be released!",
+ "chronicles_description": "Experience all events and content in chronological order.",
+ "news_description": "News articles written by our Recorders! Here you will find announcements about new merch/items releases, guides, theories, unboxings, showcases...",
+ "merch_description": "Harum ut consequatur a earum explicabo suscipit. Nostrum asperiores consectetur aperiam in ut sunt. Ipsa quibusdam et vel quam voluptas placeat. Qui est aliquam voluptatem. Tempora nisi exercitationem tempore sapiente expedita. Voluptas ut eaque nulla sunt ut dolor corrupti quos.",
+ "gallery_description": "A fully tagged Danbooru-styled gallery with currently more than a thousand unique official artworks.",
+ "archives_description": "Besides physical medias, we also archive digital contents such as websites, webpages, videos, and documents.",
+ "about_us_description": "Find more information about the Accord's Library project in the following pages.",
+ "page_not_found": "Page not found",
+ "default_description": "Accord's Library aims at gathering and archiving all of Yoko Taro’s work. Yoko Taro is a Japanese video game director and scenario writer.",
+ "name": "Name",
+ "show_subitems": "Show subitems",
+ "show_primary_items": "Show primary items",
+ "show_secondary_items": "Show secondary items",
+ "no_type": "No type",
+ "no_year": "No year",
+ "order_by": "Order by",
+ "group_by": "Group by",
+ "select_option_sidebar": "Select one of the options in the sidebar",
+ "group": "Group",
+ "settings": "Settings",
+ "theme": "Theme",
+ "light": "Light",
+ "auto": "Auto",
+ "dark": "Dark",
+ "font_size": "Font size",
+ "player_name": "Player name",
+ "currency": "Currency",
+ "font": "Font",
+ "calculated": "Calculated",
+ "status_incomplete": "This entry is only partially translated/transcribed.",
+ "status_draft": "This entry is just a draft. It usually means that this is a work-in-progress. Translation/transcription might be poor and/or computer-generated.",
+ "status_review": "This entry has not yet being proofread. The content should still be accurate.",
+ "status_done": "This entry has been checked and proofread. If you notice any translation errors or typos, please contact us so we can fix it!",
+ "incomplete": "Incomplete",
+ "draft": "Draft",
+ "review": "Review",
+ "done": "Done",
+ "status": "Status",
+ "transcribers": "Transcribers",
+ "translators": "Translators",
+ "proofreaders": "Proofreaders",
+ "transcript_notice": "This content is a transcript",
+ "translation_notice": "This content is a fan-translation",
+ "source_language": "Source language",
+ "pronouns": "Pronouns",
+ "no_category": "No category",
+ "item": "Item",
+ "items": "Items",
+ "content": "Content",
+ "result": "Result",
+ "results": "Results",
+ "language_switch_message": "",
+ "open_settings": "Open settings",
+ "change_language": "Change language",
+ "open_search": "Open search",
+ "chronology": "Chronology",
+ "accords_handbook": "Accord's Handbook",
+ "legality": "Legality",
+ "members": "Members",
+ "sharing_policy": "Sharing Policy",
+ "contact_us": "Contact us",
+ "email": "Email",
+ "email_gdpr_notice": "We only use your email in order to contact you in regard to your request. We do not share this email with anyone nor use it for any other purpose.",
+ "message": "Message",
+ "send": "Send",
+ "response_invalid_code": "Verification code is incorrect.",
+ "response_invalid_email": "Please enter a valid email address!",
+ "response_email_success": "Thank you for contacting us! We will be in touch with you shortly.",
+ "always_show_info": "Always show info",
+ "item_not_available": "This item is not for sale or is no longer available",
+ "primary_language": "Primary language",
+ "secondary_language": "Secondary languages",
+ "combine_related_contents": "Combine related contents",
+ "previous_content": "Previous content",
+ "followup_content": "Follow-up content",
+ "videos": "Videos",
+ "view_on": "View on",
+ "channel": "Channel",
+ "subscribers": "Subscribers",
+ "description": "Description",
+ "available_at": "Available at",
+ "search_title": "Search title...",
+ "want_it": "I want it!",
+ "have_it": "I have it!",
+ "source": "Source",
+ "reset_all_filters": "Reset all filters",
+ "only_display_items_i_have": "Only display items marked as “I have”",
+ "only_display_items_i_want": "Only display items marked as “I want”",
+ "only_display_unmarked_items": "Only display unmarked items",
+ "display_all_items": "Display all items",
+ "table_of_contents": "Table of Contents",
+ "definition": "Definition",
+ "no_results_message": "No results. You can try changing or resetting the search parameters.",
+ "all": "All",
+ "special_pages": "Special Pages",
+ "scan": "Scan",
+ "scanlation": "Scanlation",
+ "scanners": "Scanners",
+ "cleaners": "Cleaners",
+ "typesetters": "Typesetters",
+ "notes": "Notes",
+ "cover": "Cover",
+ "tags": "Tags",
+ "no_source_warning": "No source!",
+ "copy_anchor_link": "Click to copy the archor link",
+ "anchor_link_copied": "Copied! 👍",
+ "folders": "Folders",
+ "empty_folder_message": "This folder is empty",
+ "switch_to_grid_view": null,
+ "switch_to_folder_view": null,
+ "content_is_not_available": null
+ }
+ },
+ {
+ "attributes": {
+ "ui_language": { "data": { "attributes": { "code": "fr" } } },
+ "library": "Bibliothèque",
+ "contents": "Contenus",
+ "wiki": "Wiki",
+ "chronicles": "Chroniques",
+ "library_short_description": "Explorer l'ensemble des médias physique ou numérique",
+ "contents_short_description": "Explorer tout les contenus et filtrer par type ou par catégorie",
+ "wiki_short_description": "Une encyclopédie pour tout l'univers DrakeNieR",
+ "chronicles_short_description": "Parcourir tous les événements et les contenu dans l'ordre chronologique",
+ "news": "News",
+ "merch": "Merch",
+ "gallery": "Galerie",
+ "archives": "Archives",
+ "about_us": "À propos",
+ "licensing_notice": "Le contenu de ce site web est mis à disposition sous licence [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/), sauf indication contraire.",
+ "copyright_notice": "Accord's Library n'est pas affiliée ni approuvée par SQUARE ENIX CO. LTD. Tous les contenus du jeu et les contenus promotionnel appartiennent à © SQUARE ENIX CO. LTD.",
+ "contents_description": "",
+ "type": "Type",
+ "category": "Catégorie",
+ "categories": "Catégories",
+ "size": "Dimension",
+ "release_date": "Date de sortie",
+ "release_year": "Année de sortie",
+ "details": "Détails",
+ "price": "Prix",
+ "width": "Largeur",
+ "height": "Hauteur",
+ "thickness": "Épaisseur",
+ "subitem": "Sous-item",
+ "subitems": "Sous-items",
+ "subitem_of": "Sous-item de",
+ "variant": "Variante",
+ "variants": "Variantes",
+ "variant_of": "Variante de",
+ "summary": "Résumé",
+ "audio": "Audio",
+ "video": "Vidéo",
+ "textual": "Textuel",
+ "game": "Jeux",
+ "other": "Autre",
+ "return_to": "Retourner à ",
+ "left_to_right": "Gauche à droite",
+ "right_to_left": "Droite à gauche",
+ "page": "Page",
+ "pages": "Pages",
+ "page_order": "Order des pages",
+ "binding": "Brochure",
+ "type_information": "Information de type",
+ "front_matter": "Avant propos",
+ "back_matter": "Après propos",
+ "open_content": "Parcourir le contenu",
+ "read_content": "Lire le contenu",
+ "watch_content": "Regarder le contenu",
+ "listen_content": "Écouter le contenu",
+ "view_scans": "Voir les scans",
+ "paperback": "Broché",
+ "hardcover": "Relié",
+ "languages": "Langues",
+ "select_language": "Séléctionner la langue",
+ "language": "Langue",
+ "library_description": "",
+ "wiki_description": "",
+ "chronicles_description": "",
+ "news_description": "",
+ "merch_description": "",
+ "gallery_description": "",
+ "archives_description": "",
+ "about_us_description": "",
+ "page_not_found": "Page introuvable",
+ "default_description": "Accord's Library a pour but de rassembler et d'archiver l'ensemble des travaux de Yoko Taro. Yoko Taro est un réalisateur et scénariste de jeux vidéo japonais.",
+ "name": "Nom",
+ "show_subitems": "Afficher les sous-items",
+ "show_primary_items": "Afficher les items primaires",
+ "show_secondary_items": "Afficher les items secondaires",
+ "no_type": "Pas de type",
+ "no_year": "Pas d'année",
+ "order_by": "Ordonné par",
+ "group_by": "Groupé par",
+ "select_option_sidebar": "Sélectionner l'une des options de la barre latérale",
+ "group": "Groupe",
+ "settings": "Paramètres",
+ "theme": "Thème",
+ "light": "Clair",
+ "auto": "Auto",
+ "dark": "Sombre",
+ "font_size": "Taille de la police",
+ "player_name": "Nom du joueur",
+ "currency": "Devise",
+ "font": "Police d'écriture",
+ "calculated": "calculé",
+ "status_incomplete": "Cette entrée n'est que partiellement traduite/transcrite.",
+ "status_draft": "Cette entrée n'est qu'un brouillon. Cela signifie généralement qu'il s'agit d'un travail en cours. La traduction/transcription peut être médiocre et/ou auto-générée par ordinateur.",
+ "status_review": "Cet entrée n'a pas encore été relue. Le contenu devrait néanmoins être correct.",
+ "status_done": "Cet entrée a été vérifiée et corrigée. Si vous remarquez des erreurs de traduction ou des fautes de frappe, veuillez nous contacter afin que nous puissions les corriger !",
+ "incomplete": "Incomplet",
+ "draft": "Ébauche",
+ "review": "Pour vérification",
+ "done": "Terminé",
+ "status": "Statut",
+ "transcribers": "Transcripteurs",
+ "translators": "Traducteurs",
+ "proofreaders": "Correcteurs",
+ "transcript_notice": "Ceci est une transcription",
+ "translation_notice": "Ceci est une traduction",
+ "source_language": "Langue source",
+ "pronouns": "Pronoms",
+ "no_category": "Pas de categorie",
+ "item": "Item",
+ "items": "Items",
+ "content": "Content",
+ "result": "Resultat",
+ "results": "Résultats",
+ "language_switch_message": "Ce contenu n'est pas disponible dans la langue actuellement sélectionnée. Vous pouvez sélectionner l'une des langues suivantes à la place :",
+ "open_settings": "Ouvrir les paramètres",
+ "change_language": "Changer de langue",
+ "open_search": "Ouvrir le menu de recherche",
+ "chronology": "Chronologie",
+ "accords_handbook": "Le manuel de Accord",
+ "legality": "Légalité",
+ "members": "Membres",
+ "sharing_policy": "Politique de partage",
+ "contact_us": "Nous contacter",
+ "email": "Email",
+ "email_gdpr_notice": "Nous utilisons votre adresse électronique uniquement pour vous contacter au sujet de votre demande. Nous ne partageons cette adresse avec personne et ne l'utilisons pas à d'autres fins.",
+ "message": "Message",
+ "send": "Envoyer",
+ "response_invalid_code": "Le code de vérification est incorrect.",
+ "response_invalid_email": "Veuillez saisir une adresse électronique valide !",
+ "response_email_success": "Merci de nous avoir contactés ! Nous prendrons contact avec vous sous peu.",
+ "always_show_info": "Toujours montrer les informations",
+ "item_not_available": "Cet article n'est pas à vendre ou n'est plus disponible.",
+ "primary_language": "Langue principale",
+ "secondary_language": "Langues secondaires",
+ "combine_related_contents": "Combiner les contenus connexes",
+ "previous_content": "Contenu précédent",
+ "followup_content": "Contenu suivant",
+ "videos": "Videos",
+ "view_on": "Voir sur",
+ "channel": "Chaîne",
+ "subscribers": "Abonnés",
+ "description": "Description",
+ "available_at": "Disponible sur",
+ "search_title": "Rechercher un titre...",
+ "want_it": "Je le veux !",
+ "have_it": "Je l'ai !",
+ "source": "Source",
+ "reset_all_filters": "Réinitialiser les filtres",
+ "only_display_items_i_have": "Seulement afficher les items marqués avec \"je le veux\"",
+ "only_display_items_i_want": "Seulement afficher les items marqués avec \"je l'ai\"",
+ "only_display_unmarked_items": "Seulement afficher les items non-marqués",
+ "display_all_items": "Afficher tous les items",
+ "table_of_contents": "Sommaire",
+ "definition": "Definition",
+ "no_results_message": "Aucun résultat. Vous pouvez essayer de modifier ou de réinitialiser les paramètres de recherche.",
+ "all": "Tous",
+ "special_pages": "Pages spéciales",
+ "scan": "Scan",
+ "scanlation": "Scantrad",
+ "scanners": "Scanneurs",
+ "cleaners": "Nettoyeurs",
+ "typesetters": "Lettreurs",
+ "notes": "Notes",
+ "cover": "Couverture",
+ "tags": "Tags",
+ "no_source_warning": "Pas de source !",
+ "copy_anchor_link": "Cliquez pour copier le permalien",
+ "anchor_link_copied": "Copié ! 👍",
+ "folders": null,
+ "empty_folder_message": null,
+ "switch_to_grid_view": null,
+ "switch_to_folder_view": null,
+ "content_is_not_available": null
+ }
+ },
+ {
+ "attributes": {
+ "ui_language": { "data": { "attributes": { "code": "ja" } } },
+ "library": "ライブラリー",
+ "contents": "コンテンツ",
+ "wiki": "ウィキ",
+ "chronicles": "クロニクル",
+ "library_short_description": "すべての物理メディアとデジタルメディアを見る",
+ "contents_short_description": "すべてのコンテンツを検索し、種類やカテゴリーで絞り込むことができます。",
+ "wiki_short_description": "ゲーム宇宙に関連するすべての百科事典です。",
+ "chronicles_short_description": "すべてのイベントとコンテンツを時系列で体験できる",
+ "news": "ニュース",
+ "merch": "マーチ",
+ "gallery": "ギャラリー",
+ "archives": "アーカイブス",
+ "about_us": "会社概要",
+ "licensing_notice": "このウェブサイトのコンテンツは、特に断りのない限り [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) で提供されています。",
+ "copyright_notice": "Accord's Libraryは、株式会社スクウェア・エニックスと提携、または推奨しているものではありません。株式会社スクウェア・エニックスの登録商標です。すべてのゲーム資産およびプロモーション素材は、© SQUARE ENIX CO. LTD.に帰属します。",
+ "contents_description": "図書館や他のオンラインソースのすべてのコンテンツ(テキスト、オーディオ、ビデオ)。",
+ "type": "タイプ",
+ "category": "カテゴリー",
+ "categories": "カテゴリー",
+ "size": "サイズ",
+ "release_date": "発売日",
+ "release_year": "発売年",
+ "details": "詳細",
+ "price": "価格",
+ "width": "幅",
+ "height": "高さ",
+ "thickness": "厚み",
+ "subitem": "サブアイテム",
+ "subitems": "サブアイテム",
+ "subitem_of": "のサブアイテム",
+ "variant": "バリアント",
+ "variants": "バリアント",
+ "variant_of": "のバリアント",
+ "summary": "概要",
+ "audio": "オーディオ",
+ "video": "ビデオ",
+ "textual": "テキスト",
+ "game": "ゲーム",
+ "other": "他",
+ "return_to": "戻る",
+ "left_to_right": "左から右へ",
+ "right_to_left": "右から左へ",
+ "page": "ページ",
+ "pages": "ページ",
+ "page_order": "ページ順序",
+ "binding": "製本",
+ "type_information": "タイプ情報",
+ "front_matter": "フロントマター",
+ "back_matter": "バックナンバー",
+ "open_content": "コンテンツを開放",
+ "read_content": "コンテンツを読む",
+ "watch_content": "コンテンツを見る",
+ "listen_content": "コンテンツを聴く",
+ "view_scans": "スキャンを開放",
+ "paperback": "ペーパーバック",
+ "hardcover": "ハードカバー",
+ "languages": "言語",
+ "select_language": "言語を選択する",
+ "language": "言語",
+ "library_description": "ヨコベースの副教材(書籍、小説、画集、舞台劇、漫画、ドラマCD、コミック)を網羅したリストです。それぞれについて、写真、スキャン、内容の書き起こし、どんなものなのか、いつ、どのように発売されたのか、サイズ、初回価格...などの情報を掲載しています。",
+ "wiki_description": "DrakeNieRに関連するすべての百科事典です。現在は年表のみですが、今後多くのページを公開予定です",
+ "chronicles_description": "Accord's Libraryは、ヨーコ・タローの全作品を収集・保存することを目的としています。ヨーコ・タローは、日本のゲームディレクター、シナリオライターです。",
+ "news_description": "レコーダーが書いたニュース記事です ここでは、新しい商品/アイテムのリリースに関するお知らせ、ガイド、セオリー、アンボックス、ショーケース...をご紹介しています。",
+ "merch_description": "",
+ "gallery_description": "",
+ "archives_description": "",
+ "about_us_description": "Accord's Libraryプロジェクトについては、以下のページで詳しくご紹介しています。",
+ "page_not_found": "ページが見つかりません",
+ "default_description": "Accord's Libraryは、ヨーコ・タローの全作品を収集・保存することを目的としています。ヨーコ・タローは、日本のゲームディレクター、シナリオライターです。",
+ "name": "名称",
+ "show_subitems": "サブアイテムをみせる",
+ "show_primary_items": "一次のイテムをみせる",
+ "show_secondary_items": "二次のイテムをみせる",
+ "no_type": "タイプなし",
+ "no_year": "年なし",
+ "order_by": "注文する",
+ "group_by": "グループ化する",
+ "select_option_sidebar": "サイドバーのオプションを選択します",
+ "group": "グループ",
+ "settings": "設定",
+ "theme": "テーマ",
+ "light": "光",
+ "auto": "オート",
+ "dark": "暗",
+ "font_size": "文字サイズ",
+ "player_name": "プレイヤー名",
+ "currency": "通貨",
+ "font": "文字",
+ "calculated": "計算された",
+ "status_incomplete": "このエントリーは一部のみ翻訳/転記されています。",
+ "status_draft": "このエントリーはあくまで下書きです。通常、これは作業中であることを意味します。翻訳/転写は稚拙であったり、コンピュータで作成されたものであったりするかもしれません。",
+ "status_review": "このエントリーはまだ校正されていません。内容はまだ正確であるはずです。",
+ "status_done": "このエントリーは、チェックと校正を行いました。もし、翻訳ミスや誤字脱字にお気づきの際は、修正いたしますので、ご連絡ください",
+ "incomplete": "未完成",
+ "draft": "ドラフト",
+ "review": "レビュー",
+ "done": "完了",
+ "status": "状況",
+ "transcribers": "トランスクライバー",
+ "translators": "翻訳者",
+ "proofreaders": "校正者",
+ "transcript_notice": "このコンテンツは転写です",
+ "translation_notice": "このコンテンツはファンによる翻訳です",
+ "source_language": "ソース言語",
+ "pronouns": "代名詞",
+ "no_category": "カテゴリーなし",
+ "item": "項目",
+ "items": "項目",
+ "content": "コンテンツ",
+ "result": "結果",
+ "results": "結果",
+ "language_switch_message": null,
+ "open_settings": "オープン設定",
+ "change_language": "言語を変更する",
+ "open_search": "オープンサーチ",
+ "chronology": "年表",
+ "accords_handbook": "アコードの手引き",
+ "legality": "合法性",
+ "members": "メンバー紹介",
+ "sharing_policy": "共有ポリシー",
+ "contact_us": "お問い合わせ",
+ "email": "電子メール",
+ "email_gdpr_notice": "お客様の電子メールは、お客様のご要望に関してご連絡するためにのみ使用します。この電子メールを誰かと共有したり、他の目的で使用することはありません。",
+ "message": "メッセージ",
+ "send": "送信",
+ "response_invalid_code": "検証コードが正しくありません。",
+ "response_invalid_email": "有効なEメールアドレスを入力してください",
+ "response_email_success": "お問い合わせありがとうございます。折り返しご連絡させていただきます。",
+ "always_show_info": "常に情報を表示する",
+ "item_not_available": "この商品は非売品です",
+ "primary_language": "主要言語",
+ "secondary_language": "二次言語",
+ "combine_related_contents": "関連するコンテンツを組み合わせる",
+ "previous_content": "前のコンテンツ",
+ "followup_content": "フォローアップコンテンツ",
+ "videos": "動画",
+ "view_on": "見る",
+ "channel": "チャンネル",
+ "subscribers": "サブスクライバー",
+ "description": "説明",
+ "available_at": "でご覧いただけます。",
+ "search_title": "検索タイトル...",
+ "want_it": "欲しいです!",
+ "have_it": "持ってます!",
+ "source": "出典",
+ "reset_all_filters": "すべてのフィルタをリセットする",
+ "only_display_items_i_have": "\"持ってる \"と表示されているもののみ表示",
+ "only_display_items_i_want": "\"欲しい \"とマークされたものだけを表示する",
+ "only_display_unmarked_items": "無印のアイテムのみ表示",
+ "display_all_items": "すべての項目を表示する",
+ "table_of_contents": "目次",
+ "definition": "定義",
+ "no_results_message": "結果が出ません。検索条件を変更またはリセットしてみてください。",
+ "all": "すべて",
+ "special_pages": "特設ページ",
+ "scan": null,
+ "scanlation": null,
+ "scanners": null,
+ "cleaners": null,
+ "typesetters": null,
+ "notes": null,
+ "cover": null,
+ "tags": null,
+ "no_source_warning": null,
+ "copy_anchor_link": null,
+ "anchor_link_copied": null,
+ "folders": null,
+ "empty_folder_message": null,
+ "switch_to_grid_view": null,
+ "switch_to_folder_view": null,
+ "content_is_not_available": null
+ }
+ },
+ {
+ "attributes": {
+ "ui_language": { "data": { "attributes": { "code": "es" } } },
+ "library": "Librería",
+ "contents": "Contenidos",
+ "wiki": "Wiki",
+ "chronicles": "Crónicas",
+ "library_short_description": "Explora todos los medios físicos y digitales",
+ "contents_short_description": "Explora todo el contenido y filtra por tipo o categoría",
+ "wiki_short_description": "Una enciclopedia para todo lo relacionado con DrakeNieR",
+ "chronicles_short_description": "Experimenta todos los eventos y contenidos en orden cronológico",
+ "news": "Novedades",
+ "merch": "Merch",
+ "gallery": "Galería",
+ "archives": "Archivos",
+ "about_us": "Sobre nosotros",
+ "licensing_notice": "El contenido de este sitio web está disponible bajo [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) a menos que se indique lo contrario.",
+ "copyright_notice": "Accord's Library no está afiliada ni respaldada por SQUARE ENIX CO. LTD. Todos los archivos de los juegos y material promocional pertenecen a © SQUARE ENIX CO. LTD.",
+ "contents_description": "Todo el contenido (textual, audio y video) de la Biblioteca u otras fuentes en línea.",
+ "type": "Tipo",
+ "category": "Categoría",
+ "categories": "Categorías",
+ "size": "Tamaño",
+ "release_date": "Fecha de lanzamiento",
+ "release_year": "Año de lanzamiento",
+ "details": "Detalles",
+ "price": "Precio",
+ "width": "Ancho",
+ "height": "Altura",
+ "thickness": "Grosor",
+ "subitem": "Sub-item",
+ "subitems": "Sub-items",
+ "subitem_of": "Sub-item de",
+ "variant": "Variante",
+ "variants": "Variantes",
+ "variant_of": "Variante de",
+ "summary": "Sumario",
+ "audio": "Audio",
+ "video": "Video",
+ "textual": "Textual",
+ "game": "Juego",
+ "other": "Otros",
+ "return_to": "Volver a",
+ "left_to_right": "Izquierda a derecha",
+ "right_to_left": "Derecha a izquierda",
+ "page": "Página",
+ "pages": "Páginas",
+ "page_order": "Orden de las páginas",
+ "binding": "Encuadernación",
+ "type_information": "Tipo de información",
+ "front_matter": "Anteportada",
+ "back_matter": "Portada anterior",
+ "open_content": "Abrir contenido",
+ "read_content": "Leer contenido",
+ "watch_content": "Ver contenido",
+ "listen_content": "Escuchar contenido",
+ "view_scans": "Ver escaneos",
+ "paperback": "Tapa blanda",
+ "hardcover": "Tapa dura",
+ "languages": "Idiomas",
+ "select_language": "Seleccionar idioma",
+ "language": "Idioma",
+ "library_description": "Una lista completa de todos los materiales complementarios de Yokoverse (libros, novelas, libros de arte, obras de teatro, manga, CDs novelizados y cómics). Para cada uno, proporcionamos fotos, escaneos y transcripciones del contenido, información sobre qué es, cuándo y cómo se ha publicado, tamaño, precio inicial...",
+ "wiki_description": "Una enciclopedia para todo lo relacionado con DrakeNieR. En este momento, solo tenemos la Cronología, ¡pero muchas más páginas están planeadas para ser publicadas!",
+ "chronicles_description": "",
+ "news_description": "¡Nuevos artículos escritos por nuestros/as Archivistas! Aquí encontrarás anuncios sobre nuevos lanzamientos de merchandising/artículos, guías, teorías, unboxings, showcases...",
+ "merch_description": "",
+ "gallery_description": "Una galería completamente etiquetada de estilo Danbooru, actualmente con más de mil obras de arte oficiales únicas.",
+ "archives_description": "",
+ "about_us_description": "Encuentra más información sobre el proyecto de Accord's Library en las siguientes páginas.",
+ "page_not_found": "Página no encontrada",
+ "default_description": "Accord's Library tiene como objetivo recopilar y archivar todo el trabajo de Yoko Taro. Yoko Taro es un director de videojuegos y escritor de escenarios japonés.",
+ "name": "Nombre",
+ "show_subitems": "Mostrar sub-items",
+ "show_primary_items": "Mostrar items principales",
+ "show_secondary_items": "Mostrar items secundarios",
+ "no_type": "Ningún tipo",
+ "no_year": "Ningún año",
+ "order_by": "Ordenar por",
+ "group_by": "Agrupar por",
+ "select_option_sidebar": "Selecciona una de las opciones en la barra lateral",
+ "group": "Grupo",
+ "settings": "Ajustes",
+ "theme": "Tema",
+ "light": "Claro",
+ "auto": "Auto",
+ "dark": "Oscuro",
+ "font_size": "Tamaño de la fuente",
+ "player_name": "Nombre del jugador/a",
+ "currency": "Divisa",
+ "font": "Fuente",
+ "calculated": "Calculada",
+ "status_incomplete": "Esta entrada está solo parcialmente traducida/transcrita.",
+ "status_draft": "Esta entrada es solo un borrador. Por lo general, significa que se trata de un trabajo en curso. La traducción/transcripción puede ser deficiente y/o generada por ordenador.",
+ "status_review": "Esta entrada aún no ha sido corregida. No obstante, el contenido debería ser preciso.",
+ "status_done": "Esta entrada ha sido revisada y corregida. Si notas algún error de traducción o error tipográfico, contáctanos para que podamos solucionarlo!",
+ "incomplete": "Incompleto",
+ "draft": "Borrador",
+ "review": "Revisado",
+ "done": "Completado",
+ "status": "Estado",
+ "transcribers": "Transcriptores/as",
+ "translators": "Traductores/as",
+ "proofreaders": "Correctores/as",
+ "transcript_notice": "Este contenido es una transcripción",
+ "translation_notice": "Este contenido es una traducción de fans",
+ "source_language": "Idioma original",
+ "pronouns": "Pronombres",
+ "no_category": "Ningún categoría",
+ "item": null,
+ "items": null,
+ "content": null,
+ "result": null,
+ "results": null,
+ "language_switch_message": null,
+ "open_settings": null,
+ "change_language": null,
+ "open_search": null,
+ "chronology": null,
+ "accords_handbook": null,
+ "legality": null,
+ "members": null,
+ "sharing_policy": null,
+ "contact_us": null,
+ "email": "Email",
+ "email_gdpr_notice": "Solo usamos tu correo electrónico exclusivamente para contactarte en relación a tu solicitud. No compartimos este correo electrónico con nadie ni lo usamos para ningún otro propósito.",
+ "message": null,
+ "send": null,
+ "response_invalid_code": "El código de verificación es incorrecto.",
+ "response_invalid_email": "¡Por favor, introduce una dirección de correo electrónico válida!",
+ "response_email_success": "¡Gracias por contactarnos! Nos pondremos en contacto contigo en breve.",
+ "always_show_info": null,
+ "item_not_available": null,
+ "primary_language": null,
+ "secondary_language": null,
+ "combine_related_contents": null,
+ "previous_content": null,
+ "followup_content": null,
+ "videos": null,
+ "view_on": null,
+ "channel": null,
+ "subscribers": null,
+ "description": null,
+ "available_at": null,
+ "search_title": null,
+ "want_it": null,
+ "have_it": null,
+ "source": null,
+ "reset_all_filters": null,
+ "only_display_items_i_have": null,
+ "only_display_items_i_want": null,
+ "only_display_unmarked_items": null,
+ "display_all_items": null,
+ "table_of_contents": null,
+ "definition": null,
+ "no_results_message": null,
+ "all": null,
+ "special_pages": null,
+ "scan": null,
+ "scanlation": null,
+ "scanners": null,
+ "cleaners": null,
+ "typesetters": null,
+ "notes": null,
+ "cover": null,
+ "tags": null,
+ "no_source_warning": null,
+ "copy_anchor_link": null,
+ "anchor_link_copied": null,
+ "folders": null,
+ "empty_folder_message": null,
+ "switch_to_grid_view": null,
+ "switch_to_folder_view": null,
+ "content_is_not_available": null
+ }
+ },
+ {
+ "attributes": {
+ "ui_language": { "data": { "attributes": { "code": "pt-br" } } },
+ "library": "Coleção",
+ "contents": "Conteúdos",
+ "wiki": "Wiki",
+ "chronicles": "Crônicas",
+ "library_short_description": "Procure por todas mídias digitais e físicas",
+ "contents_short_description": "Explore todo o conteúdo e filtre por categorias e tipos",
+ "wiki_short_description": "Uma enciclopédia com tudo relacionado a DrakeNieR",
+ "chronicles_short_description": "Explore as crônicas de DrakeNieR em ordem cronológica.",
+ "news": "Notícias",
+ "merch": "Mercadorias",
+ "gallery": "Galeria",
+ "archives": "Arquivos",
+ "about_us": "Sobre Nós",
+ "licensing_notice": "O conteúdo nesse site está disponível pela CC-BY-SA, a não ser que esteja anotado.",
+ "copyright_notice": "Accord's Library não é afiliada ou reconhecida pela SQUARE ENIX CO. LTD. Todos assets de jogos e materiais promocionais pertencem a © SQUARE ENIX CO. LTD.\n\n",
+ "contents_description": "",
+ "type": "Tipo",
+ "category": "Categoria",
+ "categories": "Categorias",
+ "size": "Tamanho",
+ "release_date": "Dia de lançamento",
+ "release_year": "Ano de lançamento",
+ "details": "Detalhes",
+ "price": "Preço",
+ "width": "Largura",
+ "height": "Altura",
+ "thickness": "Grossura",
+ "subitem": "Subitem",
+ "subitems": "Subitens",
+ "subitem_of": "Subitem de",
+ "variant": "Variante",
+ "variants": "Variantes",
+ "variant_of": "Variante de",
+ "summary": "Sumário",
+ "audio": "Audio",
+ "video": "Video",
+ "textual": "Textos",
+ "game": "Jogos",
+ "other": "Outros",
+ "return_to": "Voltar para",
+ "left_to_right": "Esquerda para direita",
+ "right_to_left": "Direita para esquerda",
+ "page": "Página",
+ "pages": "Páginas",
+ "page_order": "Ordem de páginas",
+ "binding": "Encadernação",
+ "type_information": "Informação do tipo",
+ "front_matter": "Pré textual",
+ "back_matter": "Pós textual",
+ "open_content": "Abrir conteúdo",
+ "read_content": "Ler o conteúdo",
+ "watch_content": "Assistir o conteúdo",
+ "listen_content": "Ouvir o conteúdo",
+ "view_scans": "Ver scans",
+ "paperback": "Brochura",
+ "hardcover": "Capa dura",
+ "languages": "Línguas",
+ "select_language": "Selecionar língua",
+ "language": "Língua",
+ "library_description": "",
+ "wiki_description": null,
+ "chronicles_description": null,
+ "news_description": "",
+ "merch_description": "",
+ "gallery_description": "",
+ "archives_description": "",
+ "about_us_description": "",
+ "page_not_found": "Página não encontrada",
+ "default_description": null,
+ "name": "Nome",
+ "show_subitems": "Mostrar subitens",
+ "show_primary_items": "Mostrar itens primários",
+ "show_secondary_items": "Mostrar itens secundários",
+ "no_type": "Sem tipo",
+ "no_year": "Sem ano",
+ "order_by": "Ordenar por",
+ "group_by": "Agrupar por",
+ "select_option_sidebar": "Selecione uma opção na aba lateral",
+ "group": "Grupo",
+ "settings": "Configurações",
+ "theme": "Tema",
+ "light": "Claro",
+ "auto": "Automático",
+ "dark": "Escuro",
+ "font_size": "Tamanho da fonte",
+ "player_name": "Nome do jogador",
+ "currency": "Moeda",
+ "font": "Fonte",
+ "calculated": "Calculado",
+ "status_incomplete": "Este conteúdo está incompleto e não foi traduzido/transcrito completamente.",
+ "status_draft": "A tradução/transcrição selecionada é um Rascunho. Isso significa que a tradução pode estar fraca e/ou ter sido gerada por uma inteligência artificial.",
+ "status_review": "Este conteúdo ainda não foi Revisado, erros gramaticais podem ser encontrados uma vez que os revisores ainda não leram a tradução.",
+ "status_done": "O conteúdo foi completamente traduzido e revisado.",
+ "incomplete": "Incompleto",
+ "draft": "Rascunho",
+ "review": "Review",
+ "done": "Concluido",
+ "status": "Status",
+ "transcribers": "Transcritores",
+ "translators": "Tradutores",
+ "proofreaders": "Revisores",
+ "transcript_notice": "Este conteúdo foi transcrito.",
+ "translation_notice": "Este conteúdo é uma tradução de fã.",
+ "source_language": "Língua original",
+ "pronouns": "Pronomes",
+ "no_category": "Sem Categoria",
+ "item": "Item",
+ "items": "Itens",
+ "content": "Conteúdo",
+ "result": "Resultado",
+ "results": "Resultados",
+ "language_switch_message": "Este conteúdo não está disponível na língua selecionada. Você pode escolher uma das seguintes línguas:",
+ "open_settings": "Abrir configurações",
+ "change_language": "Mudar língua",
+ "open_search": "Abrir pesquisa",
+ "chronology": "Cronologia",
+ "accords_handbook": "Livro de mão da Accord",
+ "legality": "Legalidade",
+ "members": "Membros",
+ "sharing_policy": "Política de compartilhamento",
+ "contact_us": "Fale conosco",
+ "email": null,
+ "email_gdpr_notice": null,
+ "message": null,
+ "send": null,
+ "response_invalid_code": null,
+ "response_invalid_email": null,
+ "response_email_success": null,
+ "always_show_info": "Mostrar informações",
+ "item_not_available": "Item indisponível",
+ "primary_language": "Língua primaria",
+ "secondary_language": "Línguas secundárias",
+ "combine_related_contents": "Combinar relacionados",
+ "previous_content": "Conteúdo anterior:",
+ "followup_content": "Próximo conteúdo:",
+ "videos": "Videos:",
+ "view_on": "Ver no:",
+ "channel": "Canal",
+ "subscribers": "Inscritos",
+ "description": "Descrição",
+ "available_at": "Disponível no:",
+ "search_title": "Pesquisar",
+ "want_it": null,
+ "have_it": null,
+ "source": null,
+ "reset_all_filters": null,
+ "only_display_items_i_have": null,
+ "only_display_items_i_want": null,
+ "only_display_unmarked_items": null,
+ "display_all_items": null,
+ "table_of_contents": null,
+ "definition": null,
+ "no_results_message": null,
+ "all": null,
+ "special_pages": null,
+ "scan": null,
+ "scanlation": null,
+ "scanners": null,
+ "cleaners": null,
+ "typesetters": null,
+ "notes": null,
+ "cover": null,
+ "tags": null,
+ "no_source_warning": null,
+ "copy_anchor_link": null,
+ "anchor_link_copied": null,
+ "folders": null,
+ "empty_folder_message": null,
+ "switch_to_grid_view": null,
+ "switch_to_folder_view": null,
+ "content_is_not_available": null
+ }
+ }
+ ]
+ }
+}
diff --git a/src/components/AnchorShare.tsx b/src/components/AnchorShare.tsx
index e087925..b5ea5c7 100644
--- a/src/components/AnchorShare.tsx
+++ b/src/components/AnchorShare.tsx
@@ -18,27 +18,14 @@ interface Props {
export const AnchorShare = ({ id, className }: Props): JSX.Element => {
const { langui } = useAppLayout();
return (
-
-
+
+
{
navigator.clipboard.writeText(
- `${
- process.env.NEXT_PUBLIC_URL_SELF + window.location.pathname
- }#${id}`
+ `${process.env.NEXT_PUBLIC_URL_SELF + window.location.pathname}#${id}`
);
}}
/>
diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx
index ce0511d..8e97679 100644
--- a/src/components/AppLayout.tsx
+++ b/src/components/AppLayout.tsx
@@ -19,10 +19,7 @@ import { cIf, cJoin } from "helpers/className";
import { useAppLayout } from "contexts/AppLayoutContext";
import { Button } from "components/Inputs/Button";
import { OpenGraph, TITLE_PREFIX, TITLE_SEPARATOR } from "helpers/openGraph";
-import {
- useIs1ColumnLayout,
- useIsScreenAtLeast,
-} from "hooks/useContainerQuery";
+import { useIs1ColumnLayout, useIsScreenAtLeast } from "hooks/useContainerQuery";
import { useOnResize } from "hooks/useOnResize";
import { Ids } from "types/ids";
@@ -138,8 +135,7 @@ export const AppLayout = ({
const [currencySelect, setCurrencySelect] = useState(-1);
useEffect(() => {
- if (isDefined(currency))
- setCurrencySelect(currencyOptions.indexOf(currency));
+ if (isDefined(currency)) setCurrencySelect(currencyOptions.indexOf(currency));
}, [currency, currencyOptions]);
useEffect(() => {
@@ -147,14 +143,11 @@ export const AppLayout = ({
}, [currencyOptions, currencySelect, setCurrency]);
const isClient = useIsClient();
- const { value: hasDisgardSafariWarning, setTrue: disgardSafariWarning } =
- useBoolean(false);
+ const { value: hasDisgardSafariWarning, setTrue: disgardSafariWarning } = useBoolean(false);
const isSafari = useMemo(() => {
if (isClient) {
const parser = new UAParser();
- return (
- parser.getBrowser().name === "Safari" || parser.getOS().name === "iOS"
- );
+ return parser.getBrowser().name === "Safari" || parser.getOS().name === "iOS";
}
return false;
}, [isClient]);
@@ -164,27 +157,22 @@ export const AppLayout = ({
className={cJoin(
cIf(darkMode, "set-theme-dark", "set-theme-light"),
cIf(dyslexic, "set-theme-font-dyslexic", "set-theme-font-standard")
- )}
- >
+ )}>
+ : `${mainPanelReduced ? layout.mainMenuReduced : layout.mainMenu}rem ${
+ isDefined(subPanel) ? layout.subMenu : 0
+ }rem 1fr`,
+ }}>
{openGraph.title}
@@ -197,18 +185,9 @@ export const AppLayout = ({
-
-
-
+
+
+
@@ -230,22 +209,16 @@ export const AppLayout = ({
"z-10 [backdrop-filter:blur(2px)]",
"pointer-events-none touch-none"
)
- )}
- >
+ )}>
{
setMainPanelOpen(false);
setSubPanelOpen(false);
- }}
- >
+ }}>
{/* Content panel */}
@@ -254,8 +227,7 @@ export const AppLayout = ({
className={cJoin(
"texture-paper-dots bg-light [grid-area:content]",
cIf(contentPanelScroolbar, "overflow-y-scroll")
- )}
- >
+ )}>
{isDefined(contentPanel) ? (
contentPanel
) : (
@@ -280,17 +252,10 @@ export const AppLayout = ({
[grid-area:content]`,
"[grid-area:sub]"
),
- cIf(
- is1ColumnLayout && isScreenAtLeastXs,
- "w-[min(30rem,90%)] border-l-[1px]"
- ),
- cIf(
- is1ColumnLayout && !subPanelOpen && !turnSubIntoContent,
- "translate-x-[100vw]"
- ),
+ cIf(is1ColumnLayout && isScreenAtLeastXs, "w-[min(30rem,90%)] border-l-[1px]"),
+ cIf(is1ColumnLayout && !subPanelOpen && !turnSubIntoContent, "translate-x-[100vw]"),
cIf(is1ColumnLayout && turnSubIntoContent, "w-full border-l-0")
- )}
- >
+ )}>
{subPanel}
)}
@@ -300,15 +265,10 @@ export const AppLayout = ({
className={cJoin(
`texture-paper-dots overflow-y-scroll border-r-[1px] border-dark/50 bg-light
transition-transform duration-300 [scrollbar-width:none] webkit-scrollbar:w-0`,
- cIf(
- is1ColumnLayout,
- "z-10 justify-self-start [grid-area:content]",
- "[grid-area:main]"
- ),
+ cIf(is1ColumnLayout, "z-10 justify-self-start [grid-area:content]", "[grid-area:main]"),
cIf(is1ColumnLayout && isScreenAtLeastXs, "w-[min(30rem,90%)]"),
cIf(!mainPanelOpen && is1ColumnLayout, "-translate-x-full")
- )}
- >
+ )}>
@@ -318,8 +278,7 @@ export const AppLayout = ({
`texture-paper-dots grid grid-cols-[5rem_1fr_5rem] place-items-center
border-t-[1px] border-dotted border-black bg-light [grid-area:navbar]`,
cIf(!is1ColumnLayout, "hidden")
- )}
- >
+ )}>
30,
- "max-h-14 text-xl",
- "max-h-16 text-2xl"
- )
- )}
- >
- {openGraph.title.substring(
- TITLE_PREFIX.length + TITLE_SEPARATOR.length
- )
- ? openGraph.title.substring(
- TITLE_PREFIX.length + TITLE_SEPARATOR.length
- )
+ cIf(openGraph.title.length > 30, "max-h-14 text-xl", "max-h-16 text-2xl")
+ )}>
+ {openGraph.title.substring(TITLE_PREFIX.length + TITLE_SEPARATOR.length)
+ ? openGraph.title.substring(TITLE_PREFIX.length + TITLE_SEPARATOR.length)
: "Accord’s Library"}
{isDefined(subPanel) && !turnSubIntoContent && (
@@ -358,26 +308,16 @@ export const AppLayout = ({
)}
- null}
- >
+ null}>
Hi, you are using Safari!
- In most cases this wouldn’t be a problem but our website
- is—for some obscure reason—performing terribly on Safari (WebKit).
- Because of that, we have decided to display this message instead of
- letting you have a slow and painful experience. We are looking into
- the problem, and are hoping to fix this soon.
-
-
- In the meanwhile, if you are using an iPhone/iPad, please try using
- another device.
-
-
- If you are on macOS, please use another browser such as Firefox or
- Chrome.
+ In most cases this wouldn’t be a problem but our website is—for some obscure
+ reason—performing terribly on Safari (WebKit). Because of that, we have decided to
+ display this message instead of letting you have a slow and painful experience. We are
+ looking into the problem, and are hoping to fix this soon.
+ In the meanwhile, if you are using an iPhone/iPad, please try using another device.
+ If you are on macOS, please use another browser such as Firefox or Chrome.
{
setConfigPanelOpen(false);
umami("[Settings] Close settings");
- }}
- >
+ }}>
{langui.settings}
+ )}>
{router.locales && (
{langui.languages}
@@ -420,14 +358,11 @@ export const AppLayout = ({
},
{
insertAt: 1,
- name:
- langui.secondary_language ?? "Secondary languages",
+ name: langui.secondary_language ?? "Secondary languages",
},
]}
onChange={(items) => {
- const newPreferredLanguages = items.map(
- (item) => item.code
- );
+ const newPreferredLanguages = items.map((item) => item.code);
setPreferredLanguages(newPreferredLanguages);
umami("[Settings] Change preferred languages");
}}
@@ -439,8 +374,7 @@ export const AppLayout = ({
className={cJoin(
"grid place-items-center gap-8 text-center",
cIf(!is1ColumnLayout, "grid-cols-2")
- )}
- >
+ )}>
{langui.theme}
{
setCurrencySelect(newCurrency);
- umami(
- `[Settings] Change currency (${currencyOptions[newCurrency]})}`
- );
+ umami(`[Settings] Change currency (${currencyOptions[newCurrency]})}`);
}}
className="w-28"
/>
@@ -500,12 +432,12 @@ export const AppLayout = ({
onClick: () => {
setFontSize((current) => current / 1.05);
umami(
- `[Settings] Change font size (${(
- (fontSize / 1.05) *
- 100
- ).toLocaleString(undefined, {
- maximumFractionDigits: 0,
- })}%)`
+ `[Settings] Change font size (${((fontSize / 1.05) * 100).toLocaleString(
+ undefined,
+ {
+ maximumFractionDigits: 0,
+ }
+ )}%)`
);
},
icon: Icon.TextDecrease,
@@ -523,13 +455,12 @@ export const AppLayout = ({
onClick: () => {
setFontSize((current) => current * 1.05);
umami(
- `[Settings] Change font size (${(
- fontSize *
- 1.05 *
- 100
- ).toLocaleString(undefined, {
- maximumFractionDigits: 0,
- })}%)`
+ `[Settings] Change font size (${(fontSize * 1.05 * 100).toLocaleString(
+ undefined,
+ {
+ maximumFractionDigits: 0,
+ }
+ )}%)`
);
},
icon: Icon.TextIncrease,
@@ -589,21 +520,13 @@ interface ContentPlaceholderProps {
icon?: Icon;
}
-const ContentPlaceholder = ({
- message,
- icon,
-}: ContentPlaceholderProps): JSX.Element => (
+const ContentPlaceholder = ({ message, icon }: ContentPlaceholderProps): JSX.Element => (
+ border-dark p-8 text-dark opacity-40">
{isDefined(icon) &&
}
-
- {message}
-
+
{message}
);
diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx
index 0d8c701..dbc4477 100644
--- a/src/components/Chip.tsx
+++ b/src/components/Chip.tsx
@@ -15,12 +15,11 @@ interface Props {
export const Chip = ({ className, text }: Props): JSX.Element => (
+ )}>
{text}
);
diff --git a/src/components/Chronicles/ChroniclePreview.tsx b/src/components/Chronicles/ChroniclePreview.tsx
index a0aa7c1..bba3084 100644
--- a/src/components/Chronicles/ChroniclePreview.tsx
+++ b/src/components/Chronicles/ChroniclePreview.tsx
@@ -17,27 +17,19 @@ interface Props {
isActive?: boolean;
}
-const ChroniclePreview = ({
- date,
- url,
- title,
- isActive,
-}: Props): JSX.Element => (
+const ChroniclePreview = ({ date, url, title, isActive }: Props): JSX.Element => (
+ )}>
{date.year}
-
- {prettyMonthDay(date.month, date.day)}
-
+
{prettyMonthDay(date.month, date.day)}
{title}
@@ -52,24 +44,13 @@ export const TranslatedChroniclePreview = ({
translations,
fallback,
...otherProps
-}: TranslatedProps<
- Parameters[0],
- "title"
->): JSX.Element => {
+}: TranslatedProps[0], "title">): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
- return (
-
- );
+ return ;
};
/*
diff --git a/src/components/Chronicles/ChroniclesList.tsx b/src/components/Chronicles/ChroniclesList.tsx
index 2241e21..f640f83 100644
--- a/src/components/Chronicles/ChroniclesList.tsx
+++ b/src/components/Chronicles/ChroniclesList.tsx
@@ -3,7 +3,7 @@ import { useBoolean } from "usehooks-ts";
import { TranslatedChroniclePreview } from "./ChroniclePreview";
import { GetChroniclesChaptersQuery } from "graphql/generated";
import { filterHasAttributes } from "helpers/others";
-import { prettyInlineTitle, prettySlug } from "helpers/formatters";
+import { prettyInlineTitle, prettySlug, sJoin } from "helpers/formatters";
import { Ico, Icon } from "components/Ico";
import { compareDate } from "helpers/date";
import { TranslatedProps } from "types/TranslatedProps";
@@ -17,20 +17,14 @@ import { useSmartLanguage } from "hooks/useSmartLanguage";
interface Props {
chronicles: NonNullable<
NonNullable<
- NonNullable<
- GetChroniclesChaptersQuery["chroniclesChapters"]
- >["data"][number]["attributes"]
+ NonNullable["data"][number]["attributes"]
>["chronicles"]
>["data"];
currentSlug?: string;
title: string;
}
-const ChroniclesList = ({
- chronicles,
- currentSlug,
- title,
-}: Props): JSX.Element => {
+const ChroniclesList = ({ chronicles, currentSlug, title }: Props): JSX.Element => {
const { value: isOpen, toggle: toggleOpen } = useBoolean(
chronicles.some((chronicle) => chronicle.attributes?.slug === currentSlug)
);
@@ -38,33 +32,21 @@ const ChroniclesList = ({
return (
-
+ style={{ maxHeight: isOpen ? `${8 * chronicles.length}rem` : 0 }}>
{filterHasAttributes(chronicles, [
"attributes.contents",
"attributes.translations",
] as const)
- .sort((a, b) =>
- compareDate(a.attributes.date_start, b.attributes.date_start)
- )
+ .sort((a, b) => compareDate(a.attributes.date_start, b.attributes.date_start))
.map((chronicle) => (
-
+
{chronicle.attributes.translations.length === 0 &&
chronicle.attributes.contents.data.length === 1
? filterHasAttributes(chronicle.attributes.contents.data, [
@@ -74,10 +56,9 @@ const ChroniclesList = ({
key={index}
isActive={chronicle.attributes.slug === currentSlug}
date={chronicle.attributes.date_start}
- translations={filterHasAttributes(
- content.attributes.translations,
- ["language.data.attributes.code"] as const
- ).map((translation) => ({
+ translations={filterHasAttributes(content.attributes.translations, [
+ "language.data.attributes.code",
+ ] as const).map((translation) => ({
title: prettyInlineTitle(
translation.pre_title,
translation.title,
@@ -88,24 +69,34 @@ const ChroniclesList = ({
fallback={{
title: prettySlug(chronicle.attributes.slug),
}}
- url={`/chronicles/${chronicle.attributes.slug}/#chronicle-${chronicle.attributes.slug}`}
+ url={sJoin(
+ "/chronicles/",
+ chronicle.attributes.slug,
+ "/#chronicle-",
+ chronicle.attributes.slug
+ )}
/>
))
: chronicle.attributes.translations.length > 0 && (
({
+ translations={filterHasAttributes(chronicle.attributes.translations, [
+ "language.data.attributes.code",
+ "title",
+ ] as const).map((translation) => ({
title: translation.title,
language: translation.language.data.attributes.code,
}))}
fallback={{
title: prettySlug(chronicle.attributes.slug),
}}
- url={`/chronicles/${chronicle.attributes.slug}/#chronicle-${chronicle.attributes.slug}`}
+ url={sJoin(
+ "/chronicles/",
+ chronicle.attributes.slug,
+ "/#chronicle-",
+ chronicle.attributes.slug
+ )}
/>
)}
@@ -127,16 +118,8 @@ export const TranslatedChroniclesList = ({
}: TranslatedProps
): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
- return (
-
- );
+ return ;
};
diff --git a/src/components/HorizontalLine.tsx b/src/components/HorizontalLine.tsx
index 95594b4..7b74bf0 100644
--- a/src/components/HorizontalLine.tsx
+++ b/src/components/HorizontalLine.tsx
@@ -13,9 +13,5 @@ interface Props {
export const HorizontalLine = ({ className }: Props): JSX.Element => (
+ className={cJoin("my-8 h-0 w-full border-t-[3px] border-dotted border-black", className)}>
);
diff --git a/src/components/Ico.tsx b/src/components/Ico.tsx
index f73226d..7d37d87 100644
--- a/src/components/Ico.tsx
+++ b/src/components/Ico.tsx
@@ -17,11 +17,7 @@ interface Props {
export const Ico = ({ onClick, icon, className }: Props): JSX.Element => (
+ className={cJoin("material-icons [font-size:inherit] [line-height:inherit]", className)}>
{icon}
);
diff --git a/src/components/Img.tsx b/src/components/Img.tsx
index 3aa7602..708b6fe 100644
--- a/src/components/Img.tsx
+++ b/src/components/Img.tsx
@@ -8,10 +8,7 @@ import { getAssetURL, ImageQuality } from "helpers/img";
*/
interface Props
- extends Omit<
- DetailedHTMLProps
, HTMLImageElement>,
- "src"
- > {
+ extends Omit, HTMLImageElement>, "src"> {
src: UploadImageFragment | string;
quality?: ImageQuality;
}
@@ -26,15 +23,6 @@ export const Img = ({
loading = "lazy",
...otherProps
}: Props): JSX.Element => {
- const src =
- typeof rawSrc === "string" ? rawSrc : getAssetURL(rawSrc.url, quality);
- return (
-
- );
+ const src = typeof rawSrc === "string" ? rawSrc : getAssetURL(rawSrc.url, quality);
+ return ;
};
diff --git a/src/components/Inputs/Button.tsx b/src/components/Inputs/Button.tsx
index 5e10e97..303ec84 100644
--- a/src/components/Inputs/Button.tsx
+++ b/src/components/Inputs/Button.tsx
@@ -46,8 +46,7 @@ export const Button = ({
+ wrapper={LinkWrapper}>
event.target.blur()}
className={cJoin(
`group grid cursor-pointer select-none grid-flow-col place-content-center
- place-items-center gap-2 rounded-full border-[1px] border-dark py-3 px-4
- leading-none text-dark transition-all`,
+ place-items-center gap-2 rounded-full border-[1px] border-dark py-3 px-4
+ leading-none text-dark transition-all`,
cIf(
active,
"!border-black bg-black !text-light drop-shadow-black-lg",
`hover:bg-dark hover:text-light hover:drop-shadow-shade-lg active:hover:!border-black
- active:hover:bg-black active:hover:!text-light active:hover:drop-shadow-black-lg`
+ active:hover:bg-black active:hover:!text-light active:hover:drop-shadow-black-lg`
),
cIf(size === "small", "px-3 py-1 text-xs"),
cIf(disabled, "cursor-not-allowed"),
className
- )}
- >
+ )}>
{isDefined(badgeNumber) && (
)}
{isDefinedAndNotEmpty(icon) && (
)}
- {isDefinedAndNotEmpty(text) && (
-
{text}
- )}
+ {isDefinedAndNotEmpty(text) &&
{text}
}
@@ -103,15 +98,10 @@ export const TranslatedButton = ({
}: TranslatedProps): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
- return (
-
- );
+ return ;
};
/*
@@ -124,11 +114,7 @@ interface LinkWrapperProps {
alwaysNewTab: boolean;
}
-const LinkWrapper = ({
- children,
- alwaysNewTab,
- href,
-}: LinkWrapperProps & Wrapper) => (
+const LinkWrapper = ({ children, alwaysNewTab, href }: LinkWrapperProps & Wrapper) => (
{children}
diff --git a/src/components/Inputs/ButtonGroup.tsx b/src/components/Inputs/ButtonGroup.tsx
index 9816fcc..9c27981 100644
--- a/src/components/Inputs/ButtonGroup.tsx
+++ b/src/components/Inputs/ButtonGroup.tsx
@@ -18,18 +18,14 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const ButtonGroup = ({
- buttonsProps,
- className,
-}: Props): JSX.Element => (
+export const ButtonGroup = ({ buttonsProps, className }: Props): JSX.Element => (
{buttonsProps.map((buttonProps, index) => (
+ wrapperProps={{ text: buttonProps.tooltip ?? "" }}>
))}
- }
- >
+ }>
1 ? locales.size : undefined}
icon={Icon.Translate}
diff --git a/src/components/Inputs/Link.tsx b/src/components/Inputs/Link.tsx
index 9bf661c..0df1860 100644
--- a/src/components/Inputs/Link.tsx
+++ b/src/components/Inputs/Link.tsx
@@ -48,8 +48,7 @@ export const Link = ({
}
}
}
- }}
- >
+ }}>
{children}
);
diff --git a/src/components/Inputs/OrderableList.tsx b/src/components/Inputs/OrderableList.tsx
index 0b3673d..11b7080 100644
--- a/src/components/Inputs/OrderableList.tsx
+++ b/src/components/Inputs/OrderableList.tsx
@@ -16,11 +16,7 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const OrderableList = ({
- onChange,
- items,
- insertLabels,
-}: Props): JSX.Element => {
+export const OrderableList = ({ onChange, items, insertLabels }: Props): JSX.Element => {
const updateOrder = useCallback(
(sourceIndex: number, targetIndex: number) => {
console.log("updateOrder");
@@ -57,17 +53,13 @@ export const OrderableList = ({
.filter((element) => element.tagName === "DIV")
.indexOf(target)
: -1;
- const sourceIndex = parseInt(
- event.dataTransfer.getData("text"),
- 10
- );
+ const sourceIndex = parseInt(event.dataTransfer.getData("text"), 10);
updateOrder(sourceIndex, targetIndex);
}}
className="grid cursor-grab select-none grid-cols-[auto_1fr] place-content-center gap-2
rounded-full border-[1px] border-dark bg-light px-1 py-2 pr-4 text-dark transition-all
hover:bg-dark hover:text-light hover:drop-shadow-shade-lg"
- draggable
- >
+ draggable>
{index > 0 && (
(
+export const PageSelector = ({ page, className, pagesCount, onChange }: Props): JSX.Element => (
{
- const {
- value: isOpened,
- setFalse: setClosed,
- toggle: toggleOpened,
- } = useBoolean(false);
+export const Select = ({ className, value, options, allowEmpty, onChange }: Props): JSX.Element => {
+ const { value: isOpened, setFalse: setClosed, toggle: toggleOpened } = useBoolean(false);
const tryToggling = useCallback(() => {
const optionCount = options.length + (value === -1 ? 1 : 0);
@@ -47,16 +37,14 @@ export const Select = ({
"relative text-center transition-[filter]",
cIf(isOpened, "z-10 drop-shadow-shade-lg"),
className
- )}
- >
+ )}>
+ )}>
{value === -1 ? "—" : options[value]}
@@ -70,17 +58,9 @@ export const Select = ({
}}
/>
)}
-
+
-
+
{options.map((option, index) => (
{index !== value && (
@@ -93,8 +73,7 @@ export const Select = ({
onClick={() => {
setClosed();
onChange(index);
- }}
- >
+ }}>
{option}
)}
diff --git a/src/components/Inputs/Switch.tsx b/src/components/Inputs/Switch.tsx
index 62cc374..5c54792 100644
--- a/src/components/Inputs/Switch.tsx
+++ b/src/components/Inputs/Switch.tsx
@@ -14,12 +14,7 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const Switch = ({
- value,
- onClick,
- className,
- disabled = false,
-}: Props): JSX.Element => (
+export const Switch = ({ value, onClick, className, disabled = false }: Props): JSX.Element => (
{
if (!disabled) onClick();
- }}
- >
+ }}>
+ cIf(value, "top-[2px] bottom-[2px] left-[2px] translate-x-[120%]", "top-0 bottom-0 left-0")
+ )}>
);
diff --git a/src/components/Inputs/WithLabel.tsx b/src/components/Inputs/WithLabel.tsx
index 68505b9..e2504f1 100644
--- a/src/components/Inputs/WithLabel.tsx
+++ b/src/components/Inputs/WithLabel.tsx
@@ -14,23 +14,14 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const WithLabel = ({
- label,
- children,
- disabled,
-}: Props): JSX.Element => (
+export const WithLabel = ({ label, children, disabled }: Props): JSX.Element => (
+ )}>
{isDefinedAndNotEmpty(label) && (
-
- {label}:
-
+
{label}:
)}
{children}
diff --git a/src/components/InsetBox.tsx b/src/components/InsetBox.tsx
index 8b519ed..c6213bd 100644
--- a/src/components/InsetBox.tsx
+++ b/src/components/InsetBox.tsx
@@ -16,11 +16,7 @@ interface Props {
export const InsetBox = ({ id, className, children }: Props): JSX.Element => (
+ className={cJoin("w-full rounded-xl bg-mid p-8 shadow-inner-sm shadow-shade", className)}>
{children}
);
diff --git a/src/components/Library/PreviewCardCTAs.tsx b/src/components/Library/PreviewCardCTAs.tsx
index 83a53b1..7ce0a3b 100644
--- a/src/components/Library/PreviewCardCTAs.tsx
+++ b/src/components/Library/PreviewCardCTAs.tsx
@@ -1,8 +1,9 @@
import { Icon } from "components/Ico";
import { Button } from "components/Inputs/Button";
import { ToolTip } from "components/ToolTip";
-import { LibraryItemUserStatus } from "helpers/types";
+import { LibraryItemUserStatus } from "types/types";
import { useAppLayout } from "contexts/AppLayoutContext";
+import { cIf, cJoin } from "helpers/className";
/*
* ╭─────────────╮
@@ -17,52 +18,49 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
export const PreviewCardCTAs = ({ id, expand = false }: Props): JSX.Element => {
- const { libraryItemUserStatus, setLibraryItemUserStatus, langui } =
- useAppLayout();
+ const { libraryItemUserStatus, setLibraryItemUserStatus, langui } = useAppLayout();
return (
- <>
-
-
- {
- event.preventDefault();
- setLibraryItemUserStatus((current) => {
- const newLibraryItemUserStatus = { ...current };
- newLibraryItemUserStatus[id] =
- newLibraryItemUserStatus[id] === LibraryItemUserStatus.Want
- ? LibraryItemUserStatus.None
- : LibraryItemUserStatus.Want;
- return newLibraryItemUserStatus;
- });
- }}
- />
-
-
- {
- event.preventDefault();
- setLibraryItemUserStatus((current) => {
- const newLibraryItemUserStatus = { ...current };
- newLibraryItemUserStatus[id] =
- newLibraryItemUserStatus[id] === LibraryItemUserStatus.Have
- ? LibraryItemUserStatus.None
- : LibraryItemUserStatus.Have;
- return newLibraryItemUserStatus;
- });
- }}
- />
-
-
- >
+
+
+ {
+ event.preventDefault();
+ setLibraryItemUserStatus((current) => {
+ const newLibraryItemUserStatus = { ...current };
+ newLibraryItemUserStatus[id] =
+ newLibraryItemUserStatus[id] === LibraryItemUserStatus.Want
+ ? LibraryItemUserStatus.None
+ : LibraryItemUserStatus.Want;
+ return newLibraryItemUserStatus;
+ });
+ }}
+ />
+
+
+ {
+ event.preventDefault();
+ setLibraryItemUserStatus((current) => {
+ const newLibraryItemUserStatus = { ...current };
+ newLibraryItemUserStatus[id] =
+ newLibraryItemUserStatus[id] === LibraryItemUserStatus.Have
+ ? LibraryItemUserStatus.None
+ : LibraryItemUserStatus.Have;
+ return newLibraryItemUserStatus;
+ });
+ }}
+ />
+
+
);
};
diff --git a/src/components/LightBox.tsx b/src/components/LightBox.tsx
index 22c4c15..e3ee557 100644
--- a/src/components/LightBox.tsx
+++ b/src/components/LightBox.tsx
@@ -21,9 +21,7 @@ const SENSIBILITY_SWIPE = 0.5;
*/
interface Props {
- setState:
- | Dispatch>
- | Dispatch>;
+ setState: Dispatch> | Dispatch>;
state: boolean;
images: string[];
index: number;
@@ -32,13 +30,7 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const LightBox = ({
- state,
- setState,
- images,
- index,
- setIndex,
-}: Props): JSX.Element => {
+export const LightBox = ({ state, setState, images, index, setIndex }: Props): JSX.Element => {
const handlePrevious = useCallback(() => {
if (index > 0) setIndex(index - 1);
}, [index, setIndex]);
@@ -71,14 +63,8 @@ export const LightBox = ({
} else {
handleNext();
}
- }}
- >
- setState(false)}
- state={state}
- padding={false}
- fillViewport
- >
+ }}>
+ setState(false)} state={state} padding={false} fillViewport>
+ )}>
- {index > 0 && (
-
- )}
+ {index > 0 && }
-
+
{index < images.length - 1 && (
diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx
index d8c04da..d88f684 100644
--- a/src/components/Markdown/Markdawn.tsx
+++ b/src/components/Markdown/Markdawn.tsx
@@ -29,10 +29,7 @@ interface MarkdawnProps {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const Markdawn = ({
- className,
- text: rawText,
-}: MarkdawnProps): JSX.Element => {
+export const Markdawn = ({ className, text: rawText }: MarkdawnProps): JSX.Element => {
const { playerName } = useAppLayout();
const router = useRouter();
const isContentPanelAtLeastLg = useIsContentPanelAtLeast("lg");
@@ -59,18 +56,10 @@ export const Markdawn = ({
slugify: slugify,
overrides: {
a: {
- component: (compProps: {
- href: string;
- children: React.ReactNode;
- }) => {
- if (
- compProps.href.startsWith("/") ||
- compProps.href.startsWith("#")
- ) {
+ component: (compProps: { href: string; children: React.ReactNode }) => {
+ if (compProps.href.startsWith("/") || compProps.href.startsWith("#")) {
return (
-
router.push(compProps.href)}>
- {compProps.children}
-
+
router.push(compProps.href)}>{compProps.children}
);
}
return (
@@ -112,11 +101,7 @@ export const Markdawn = ({
? slugify(compProps.target)
: slugify(compProps.children?.toString());
return (
-
- router.replace(`${compProps.page ?? ""}#${slug}`)
- }
- >
+ router.replace(`${compProps.page ?? ""}#${slug}`)}>
{compProps.children}
);
@@ -128,13 +113,8 @@ export const Markdawn = ({
+ cIf(isContentPanelAtLeastLg, "grid-cols-[auto_1fr]", "grid-cols-1")
+ )}>
{compProps.children}
),
@@ -147,8 +127,7 @@ export const Markdawn = ({
className={cJoin(
"!my-0 text-dark/60",
cIf(!isContentPanelAtLeastLg, "!-mb-4")
- )}
- >
+ )}>
{compProps.children}
@@ -157,9 +136,7 @@ export const Markdawn = ({
},
InsetBox: {
- component: (compProps) => (
-
{compProps.children}
- ),
+ component: (compProps) =>
{compProps.children} ,
},
li: {
@@ -167,13 +144,10 @@ export const Markdawn = ({
{compProps.children}>
- ).length > 100
+ ReactDOMServer.renderToStaticMarkup(<>{compProps.children}>).length > 100
? "my-4"
: ""
- }
- >
+ }>
{compProps.children}
),
@@ -195,10 +169,7 @@ export const Markdawn = ({
},
blockquote: {
- component: (compProps: {
- children: React.ReactNode;
- cite?: string;
- }) => (
+ component: (compProps: { children: React.ReactNode; cite?: string }) => (
{isDefinedAndNotEmpty(compProps.cite) ? (
<>
@@ -229,8 +200,7 @@ export const Markdawn = ({
? getAssetURL(compProps.src, ImageQuality.Large)
: compProps.src,
]);
- }}
- >
+ }}>
+ className="drop-shadow-shade-lg">
),
},
},
- }}
- >
+ }}>
{text}
>
@@ -269,10 +237,7 @@ export const TableOfContents = ({
}: TableOfContentsProps): JSX.Element => {
const router = useRouter();
const { langui } = useAppLayout();
- const toc = useMemo(
- () => getTocFromMarkdawn(preprocessMarkDawn(text), title),
- [text, title]
- );
+ const toc = useMemo(() => getTocFromMarkdawn(preprocessMarkDawn(text), title), [text, title]);
return (
<>
@@ -283,8 +248,7 @@ export const TableOfContents = ({
@@ -395,10 +356,7 @@ const TocLevel = ({
}: LevelProps): JSX.Element => {
const router = useRouter();
- const ids = useMemo(
- () => tocchildren.map((child) => child.slug),
- [tocchildren]
- );
+ const ids = useMemo(() => tocchildren.map((child) => child.slug), [tocchildren]);
const currentIntersection = useIntersectionList(ids);
return (
@@ -408,15 +366,9 @@ const TocLevel = ({
- {`${parentNumbering}${
- childIndex + 1
- }.`} {" "}
+ cIf(allowIntersection && currentIntersection === childIndex, "text-dark")
+ )}>
+ {`${parentNumbering}${childIndex + 1}.`} {" "}
router.replace(`#${child.slug}`)}>
{{child.title} }
@@ -424,9 +376,7 @@ const TocLevel = ({
))}
@@ -442,17 +392,13 @@ const TocLevel = ({
const preprocessMarkDawn = (text: string, playerName = ""): string => {
if (!text) return "";
- const processedPlayerName = playerName
- .replaceAll("_", "\\_")
- .replaceAll("*", "\\*");
+ const processedPlayerName = playerName.replaceAll("_", "\\_").replaceAll("*", "\\*");
let preprocessed = text
.replaceAll("--", "—")
.replaceAll(
"@player",
- isDefinedAndNotEmpty(processedPlayerName)
- ? processedPlayerName
- : "(player)"
+ isDefinedAndNotEmpty(processedPlayerName) ? processedPlayerName : "(player)"
);
let scenebreakIndex = 0;
@@ -511,8 +457,7 @@ const getTocFromMarkdawn = (text: string, title?: string): TocInterface => {
let scenebreak = 0;
let scenebreakIndex = 0;
- const getTitle = (line: string): string =>
- line.slice(line.indexOf(`">`) + 2, line.indexOf(""));
+ const getTitle = (line: string): string => line.slice(line.indexOf(`">`) + 2, line.indexOf(""));
const getSlug = (line: string): string =>
line.slice(line.indexOf(`id="`) + 4, line.indexOf(`">`));
@@ -573,9 +518,7 @@ const getTocFromMarkdawn = (text: string, title?: string): TocInterface => {
};
if (h5 >= 0) {
- toc.children[h2].children[h3].children[h4].children[h5].children.push(
- child
- );
+ toc.children[h2].children[h3].children[h4].children[h5].children.push(child);
} else if (h4 >= 0) {
toc.children[h2].children[h3].children[h4].children.push(child);
} else if (h3 >= 0) {
diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx
index 923807b..9b0ab5d 100644
--- a/src/components/PanelComponents/NavOption.tsx
+++ b/src/components/PanelComponents/NavOption.tsx
@@ -47,15 +47,12 @@ export const NavOption = ({
content={
{title}
- {isDefinedAndNotEmpty(subtitle) && (
-
{subtitle}
- )}
+ {isDefinedAndNotEmpty(subtitle) &&
{subtitle}
}
}
placement="right"
className="text-left"
- disabled={!reduced}
- >
+ disabled={!reduced}>
+ )}>
{icon && }
{!reduced && (
{title}
- {isDefinedAndNotEmpty(subtitle) && (
-
{subtitle}
- )}
+ {isDefinedAndNotEmpty(subtitle) &&
{subtitle}
}
)}
@@ -98,10 +92,7 @@ export const TranslatedNavOption = ({
}: TranslatedProps): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
return (
(
+export const PanelHeader = ({ icon, description, title }: Props): JSX.Element => (
<>
{icon &&
}
diff --git a/src/components/PanelComponents/ReturnButton.tsx b/src/components/PanelComponents/ReturnButton.tsx
index 3b76419..f294355 100644
--- a/src/components/PanelComponents/ReturnButton.tsx
+++ b/src/components/PanelComponents/ReturnButton.tsx
@@ -22,12 +22,7 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const ReturnButton = ({
- href,
- title,
- displayOnlyOn,
- className,
-}: Props): JSX.Element => {
+export const ReturnButton = ({ href, title, displayOnlyOn, className }: Props): JSX.Element => {
const { setSubPanelOpen, langui } = useAppLayout();
const is3ColumnsLayout = useIs3ColumnsLayout();
@@ -61,16 +56,8 @@ export const TranslatedReturnButton = ({
}: TranslatedProps
): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
- return (
-
- );
+ return ;
};
diff --git a/src/components/Panels/ContentPanel.tsx b/src/components/Panels/ContentPanel.tsx
index 0fb7561..481c32d 100644
--- a/src/components/Panels/ContentPanel.tsx
+++ b/src/components/Panels/ContentPanel.tsx
@@ -38,8 +38,7 @@ export const ContentPanel = ({
? "max-w-4xl"
: "w-full",
className
- )}
- >
+ )}>
{children}
diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx
index e5c0cd2..4fcbb41 100644
--- a/src/components/Panels/MainPanel.tsx
+++ b/src/components/Panels/MainPanel.tsx
@@ -29,16 +29,14 @@ export const MainPanel = (): JSX.Element => {
className={cJoin(
"grid content-start justify-center gap-y-2 p-8 text-center",
cIf(mainPanelReduced && is3ColumnsLayout, "px-4")
- )}
- >
+ )}>
{/* Reduce/expand main menu */}
{is3ColumnsLayout && (
+ )}>
{
if (mainPanelReduced) {
@@ -63,8 +61,7 @@ export const MainPanel = (): JSX.Element => {
[mask:url('/icons/accords.svg')] ![mask-size:contain] ![mask-repeat:no-repeat]
![mask-position:center] hover:bg-dark`,
cIf(mainPanelReduced && is3ColumnsLayout, "w-12", "w-1/2")
- )}
- >
+ )}>
{(!mainPanelReduced || !is3ColumnsLayout) && (
@@ -74,19 +71,13 @@ export const MainPanel = (): JSX.Element => {
+ cIf(mainPanelReduced && is3ColumnsLayout, "flex-col gap-3", "flex-row")
+ )}>
{langui.open_settings}}
placement="right"
className="text-left"
- disabled={!mainPanelReduced}
- >
+ disabled={!mainPanelReduced}>
{
setConfigPanelOpen(true);
@@ -174,12 +165,7 @@ export const MainPanel = (): JSX.Element => {
{mainPanelReduced && is3ColumnsLayout ? "" : }
-
+
{isDefinedAndNotEmpty(langui.licensing_notice) && (
{langui.licensing_notice}
@@ -190,8 +176,7 @@ export const MainPanel = (): JSX.Element => {
onClick={() => umami("[MainPanel] Visit license")}
aria-label="Read more about the license we use for this website"
className="group grid grid-flow-col place-content-center gap-1 transition-[filter]"
- href="https://creativecommons.org/licenses/by-sa/4.0/"
- >
+ href="https://creativecommons.org/licenses/by-sa/4.0/">
diff --git a/src/components/Panels/SubPanel.tsx b/src/components/Panels/SubPanel.tsx
index e6df09e..9070af7 100644
--- a/src/components/Panels/SubPanel.tsx
+++ b/src/components/Panels/SubPanel.tsx
@@ -19,8 +19,7 @@ export const SubPanel = ({ children }: Props): JSX.Element => {
className={cJoin(
"grid gap-y-2 text-center",
cIf(isSubPanelAtLeastSm, "px-10 pt-10 pb-20", "p-4")
- )}
- >
+ )}>
{children}
);
diff --git a/src/components/Popup.tsx b/src/components/Popup.tsx
index 8136ccc..e8f5ea9 100644
--- a/src/components/Popup.tsx
+++ b/src/components/Popup.tsx
@@ -38,13 +38,8 @@ export const Popup = ({
+ cIf(state, "[backdrop-filter:blur(2px)]", "pointer-events-none touch-none")
+ )}>
+ )}>
{children}
diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx
index 7124fbb..0d1a06d 100644
--- a/src/components/PostPage.tsx
+++ b/src/components/PostPage.tsx
@@ -10,7 +10,7 @@ import { RecorderChip } from "./RecorderChip";
import { ThumbnailHeader } from "./ThumbnailHeader";
import { ToolTip } from "./ToolTip";
import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { PostWithTranslations } from "helpers/types";
+import { PostWithTranslations } from "types/types";
import { filterHasAttributes, getStatusDescription } from "helpers/others";
import { prettySlug } from "helpers/formatters";
import { useAppLayout } from "contexts/AppLayoutContext";
@@ -49,21 +49,19 @@ export const PostPage = ({
...otherProps
}: Props): JSX.Element => {
const { langui } = useAppLayout();
- const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
- useSmartLanguage({
- items: post.translations,
- languageExtractor: useCallback(
- (item: NonNullable) =>
- item.language?.data?.attributes?.code,
- []
- ),
- });
+ const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
+ items: post.translations,
+ languageExtractor: useCallback(
+ (item: NonNullable) =>
+ item.language?.data?.attributes?.code,
+ []
+ ),
+ });
const { thumbnail, body, title, excerpt } = useMemo(
() => ({
thumbnail:
- selectedTranslation?.thumbnail?.data?.attributes ??
- post.thumbnail?.data?.attributes,
+ selectedTranslation?.thumbnail?.data?.attributes ?? post.thumbnail?.data?.attributes,
body: selectedTranslation?.body ?? "",
title: selectedTranslation?.title ?? prettySlug(post.slug),
excerpt: selectedTranslation?.excerpt ?? "",
@@ -76,11 +74,7 @@ export const PostPage = ({
returnHref || returnTitle || displayCredits || displayToc ? (
{returnHref && returnTitle && (
-
+
)}
{displayCredits && (
@@ -92,12 +86,8 @@ export const PostPage = ({
{langui.status}:
+ content={getStatusDescription(selectedTranslation.status, langui)}
+ maxWidth={"20rem"}>
@@ -107,23 +97,20 @@ export const PostPage = ({
{"Authors"}:
- {filterHasAttributes(post.authors.data, [
- "id",
- "attributes",
- ] as const).map((author) => (
-
-
-
- ))}
+ {filterHasAttributes(post.authors.data, ["id", "attributes"] as const).map(
+ (author) => (
+
+
+
+ )
+ )}
)}
>
)}
- {displayToc && (
-
- )}
+ {displayToc &&
}
) : undefined,
[
@@ -173,9 +160,7 @@ export const PostPage = ({
)}
{displayTitle && (
-
- {title}
-
+
{title}
)}
>
)}
@@ -209,11 +194,5 @@ export const PostPage = ({
]
);
- return (
-
- );
+ return
;
};
diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx
index 5130758..8ab3989 100644
--- a/src/components/PreviewCard.tsx
+++ b/src/components/PreviewCard.tsx
@@ -5,18 +5,9 @@ import { Ico, Icon } from "./Ico";
import { Img } from "./Img";
import { Link } from "./Inputs/Link";
import { useAppLayout } from "contexts/AppLayoutContext";
-import {
- DatePickerFragment,
- PricePickerFragment,
- UploadImageFragment,
-} from "graphql/generated";
+import { DatePickerFragment, PricePickerFragment, UploadImageFragment } from "graphql/generated";
import { cIf, cJoin } from "helpers/className";
-import {
- prettyDate,
- prettyDuration,
- prettyPrice,
- prettyShortenNumber,
-} from "helpers/formatters";
+import { prettyDate, prettyDuration, prettyPrice, prettyShortenNumber } from "helpers/formatters";
import { ImageQuality } from "helpers/img";
import { useDeviceSupportsHover } from "hooks/useMediaQuery";
import { useSmartLanguage } from "hooks/useSmartLanguage";
@@ -91,37 +82,25 @@ export const PreviewCard = ({
{metadata.releaseDate && (
-
+
{prettyDate(metadata.releaseDate, router.locale)}
)}
{metadata.price && (
-
+
{prettyPrice(metadata.price, currencies, currency)}
)}
{metadata.views && (
-
+
{prettyShortenNumber(metadata.views)}
)}
{metadata.author && (
-
+
{metadata.author}
)}
@@ -136,8 +115,7 @@ export const PreviewCard = ({
+ drop-shadow-shade-xl hover:scale-[1.02]">
{stackNumber > 0 && (
<>
+ )}>
{thumbnail && (
-
+
)}
@@ -161,14 +134,9 @@ export const PreviewCard = ({
`absolute inset-0 overflow-hidden bg-light brightness-[0.9] sepia-[0.2]
transition-[top_transform] group-hover:-top-4 group-hover:scale-[.94]`,
cIf(thumbnailRounded, "rounded-md")
- )}
- >
+ )}>
{thumbnail && (
-
+
)}
>
@@ -178,20 +146,13 @@ export const PreviewCard = ({
+ aspectRatio: thumbnailForceAspectRatio ? thumbnailAspectRatio : "unset",
+ }}>
0 && (
+ bg-opacity-60 px-2 text-light">
{stackNumber}
)}
@@ -210,8 +170,7 @@ export const PreviewCard = ({
<>
+ text-light transition-colors drop-shadow-shade-lg group-hover:bg-opacity-50">
+ text-light">
{prettyDuration(hoverlay.duration)}
>
@@ -231,18 +189,12 @@ export const PreviewCard = ({
style={{ aspectRatio: thumbnailAspectRatio }}
className={cJoin(
"relative w-full bg-light",
- cIf(
- keepInfoVisible,
- "rounded-t-md",
- "rounded-md notHoverable:rounded-b-none"
- )
- )}
- >
+ cIf(keepInfoVisible, "rounded-t-md", "rounded-md notHoverable:rounded-b-none")
+ )}>
{stackNumber > 0 && (
+ bg-opacity-60 px-2 text-light">
{stackNumber}
)}
@@ -258,8 +210,7 @@ export const PreviewCard = ({
notHoverable:rounded-b-md notHoverable:opacity-100`,
"[border-radius:0%_0%_10%_10%_/_0%_0%_3%_3%]"
)
- )}
- >
+ )}>
{metadata?.position === "Top" && metadataJSX}
{topChips && topChips.length > 0 && (
@@ -269,13 +220,9 @@ export const PreviewCard = ({
)}
- {pre_title && (
-
{pre_title}
- )}
+ {pre_title &&
{pre_title}
}
{title && (
-
- {title}
-
+
{title}
)}
{subtitle &&
{subtitle}
}
@@ -283,8 +230,7 @@ export const PreviewCard = ({
{bottomChips && bottomChips.length > 0 && (
+ [scrollbar-width:none] webkit-scrollbar:h-0">
{bottomChips.map((text, index) => (
))}
@@ -308,16 +254,10 @@ export const TranslatedPreviewCard = ({
translations,
fallback,
...otherProps
-}: TranslatedProps<
- Props,
- "description" | "pre_title" | "subtitle" | "title"
->): JSX.Element => {
+}: TranslatedProps
): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
return (
+ rounded-md bg-light pr-4 transition-transform drop-shadow-shade-xl hover:scale-[1.02]">
{thumbnail ? (
-
+
) : (
@@ -61,9 +56,7 @@ const PreviewLine = ({
)}
{pre_title &&
{pre_title}
}
- {title && (
-
{title}
- )}
+ {title &&
{title}
}
{subtitle &&
{subtitle}
}
{bottomChips && bottomChips.length > 0 && (
@@ -89,10 +82,7 @@ export const TranslatedPreviewLine = ({
}: TranslatedProps): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languageExtractor: useCallback(
- (item: { language: string }): string => item.language,
- []
- ),
+ languageExtractor: useCallback((item: { language: string }): string => item.language, []),
});
return (
{
{recorder.languages?.data && recorder.languages.data.length > 0 && (
{langui.languages}:
- {filterHasAttributes(recorder.languages.data, [
- "attributes",
- ] as const).map((language) => (
-
-
-
- ))}
+ {filterHasAttributes(recorder.languages.data, ["attributes"] as const).map(
+ (language) => (
+
+
+
+ )
+ )}
)}
{recorder.pronouns && (
@@ -60,15 +60,10 @@ export const RecorderChip = ({ recorder }: Props): JSX.Element => {
{recorder.bio?.[0] && }
}
- placement="top"
- >
+ placement="top">
);
diff --git a/src/components/SmartList.tsx b/src/components/SmartList.tsx
index 1f48b29..78c5aae 100644
--- a/src/components/SmartList.tsx
+++ b/src/components/SmartList.tsx
@@ -72,10 +72,7 @@ export const SmartList = ({
const [page, setPage] = useState(0);
const { langui } = useAppLayout();
useScrollTopOnChange(Ids.ContentPanel, [page], paginationScroolTop);
- useEffect(
- () => setPage(0),
- [searchingTerm, groupingFunction, groupSortingFunction, items]
- );
+ useEffect(() => setPage(0), [searchingTerm, groupingFunction, groupSortingFunction, items]);
const searchFilter = useCallback(() => {
if (isDefinedAndNotEmpty(searchingTerm) && isDefined(searchingBy)) {
@@ -118,12 +115,7 @@ export const SmartList = ({
});
});
return memo.sort(groupSortingFunction);
- }, [
- groupCountingFunction,
- groupSortingFunction,
- groupingFunction,
- sortedItem,
- ]);
+ }, [groupCountingFunction, groupSortingFunction, groupingFunction, sortedItem]);
const pages = useMemo(() => {
const memo: Group[][] = [];
@@ -174,12 +166,7 @@ export const SmartList = ({
return (
<>
{pages.length > 1 && paginationSelectorTop && (
-
+
)}
@@ -191,8 +178,7 @@ export const SmartList = ({
{group.name.length > 0 && (
+ first-of-type:pt-0">
{group.name}
({
`grid items-start gap-8 border-b-[3px] border-dotted pb-12
last-of-type:border-0`,
className
- )}
- >
+ )}>
{group.items.map((item) => (
))}
@@ -225,12 +210,7 @@ export const SmartList = ({
{pages.length > 1 && paginationSelectorBottom && (
-
+
)}
>
);
@@ -248,15 +228,10 @@ const DefaultRenderWhenEmpty = () => {
- {is3ColumnsLayout && (
-
- )}
+ border-dark p-8 text-dark opacity-40">
+ {is3ColumnsLayout &&
}
{langui.no_results_message}
- {!is3ColumnsLayout && (
-
- )}
+ {!is3ColumnsLayout &&
}
);
diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx
index 7f823ad..3c58f37 100644
--- a/src/components/ThumbnailHeader.tsx
+++ b/src/components/ThumbnailHeader.tsx
@@ -64,11 +64,8 @@ export const ThumbnailHeader = ({
)}
+ id={slugify(prettyInlineTitle(pre_title ?? "", title, subtitle ?? ""))}
+ className="grid place-items-center text-center">
{pre_title}
{title}
{subtitle}
@@ -82,8 +79,7 @@ export const ThumbnailHeader = ({
@@ -94,20 +90,17 @@ export const ThumbnailHeader = ({
{langui.categories}
- {filterHasAttributes(categories.data, [
- "attributes",
- "id",
- ] as const).map((category) => (
-
- ))}
+ {filterHasAttributes(categories.data, ["attributes", "id"] as const).map(
+ (category) => (
+
+ )
+ )}
)}
{languageSwitcher}
- {description && (
-
{ }
- )}
+ {description &&
{ } }
>
);
};
diff --git a/src/components/ToolTip.tsx b/src/components/ToolTip.tsx
index 577d23c..00d04f1 100644
--- a/src/components/ToolTip.tsx
+++ b/src/components/ToolTip.tsx
@@ -25,8 +25,7 @@ export const ToolTip = ({
delay={delay}
interactive={interactive}
animation={animation}
- {...otherProps}
- >
+ {...otherProps}>
{children}
);
diff --git a/src/components/Wiki/DefinitionCard.tsx b/src/components/Wiki/DefinitionCard.tsx
index 00a3d4a..908d797 100644
--- a/src/components/Wiki/DefinitionCard.tsx
+++ b/src/components/Wiki/DefinitionCard.tsx
@@ -29,22 +29,13 @@ interface Props {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-const DefinitionCard = ({
- source,
- translations = [],
- index,
- categories,
-}: Props): JSX.Element => {
+const DefinitionCard = ({ source, translations = [], index, categories }: Props): JSX.Element => {
const isContentPanelNoMoreThanMd = useIsContentPanelNoMoreThan("md");
const { langui } = useAppLayout();
- const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
- useSmartLanguage({
- items: translations,
- languageExtractor: useCallback(
- (item: Props["translations"][number]) => item.language,
- []
- ),
- });
+ const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
+ items: translations,
+ languageExtractor: useCallback((item: Props["translations"][number]) => item.language, []),
+ });
return (
<>
@@ -63,8 +54,7 @@ const DefinitionCard = ({
+ maxWidth={"20rem"}>
>
@@ -89,8 +79,7 @@ const DefinitionCard = ({
className={cJoin(
"mt-3 flex place-items-center gap-2",
cIf(isContentPanelNoMoreThanMd, "flex-col text-center")
- )}
- >
+ )}>
{langui.source}:
diff --git a/src/contexts/AppLayoutContext.tsx b/src/contexts/AppLayoutContext.tsx
index e4f7cb8..bd75ecc 100644
--- a/src/contexts/AppLayoutContext.tsx
+++ b/src/contexts/AppLayoutContext.tsx
@@ -1,14 +1,8 @@
-import React, {
- ReactNode,
- useContext,
- useEffect,
- useLayoutEffect,
- useState,
-} from "react";
+import React, { ReactNode, useContext, useEffect, useLayoutEffect, useState } from "react";
import { useRouter } from "next/router";
import { useLocalStorage } from "usehooks-ts";
import { isDefined, isDefinedAndNotEmpty } from "helpers/others";
-import { LibraryItemUserStatus, RequiredNonNullable } from "helpers/types";
+import { LibraryItemUserStatus, RequiredNonNullable } from "types/types";
import { useDarkMode } from "hooks/useDarkMode";
import { Currencies, Languages, Langui } from "helpers/localData";
import { useCurrencies, useLanguages, useLangui } from "hooks/useLocalData";
@@ -19,27 +13,19 @@ import { useScrollIntoView } from "hooks/useScrollIntoView";
interface AppLayoutState {
subPanelOpen: boolean;
toggleSubPanelOpen: () => void;
- setSubPanelOpen: React.Dispatch<
- React.SetStateAction
- >;
+ setSubPanelOpen: React.Dispatch>;
configPanelOpen: boolean;
toggleConfigPanelOpen: () => void;
- setConfigPanelOpen: React.Dispatch<
- React.SetStateAction
- >;
+ setConfigPanelOpen: React.Dispatch>;
mainPanelReduced: boolean;
toggleMainPanelReduced: () => void;
- setMainPanelReduced: React.Dispatch<
- React.SetStateAction
- >;
+ setMainPanelReduced: React.Dispatch>;
mainPanelOpen: boolean;
toggleMainPanelOpen: () => void;
- setMainPanelOpen: React.Dispatch<
- React.SetStateAction
- >;
+ setMainPanelOpen: React.Dispatch>;
darkMode: boolean;
toggleDarkMode: () => void;
@@ -47,9 +33,7 @@ interface AppLayoutState {
selectedThemeMode: boolean;
toggleSelectedThemeMode: () => void;
- setSelectedThemeMode: React.Dispatch<
- React.SetStateAction
- >;
+ setSelectedThemeMode: React.Dispatch>;
fontSize: number;
setFontSize: React.Dispatch>;
@@ -62,20 +46,14 @@ interface AppLayoutState {
setCurrency: React.Dispatch>;
playerName: string;
- setPlayerName: React.Dispatch<
- React.SetStateAction
- >;
+ setPlayerName: React.Dispatch>;
preferredLanguages: string[];
- setPreferredLanguages: React.Dispatch<
- React.SetStateAction
- >;
+ setPreferredLanguages: React.Dispatch>;
menuGestures: boolean;
toggleMenuGestures: () => void;
- setMenuGestures: React.Dispatch<
- React.SetStateAction
- >;
+ setMenuGestures: React.Dispatch>;
libraryItemUserStatus: Record;
setLibraryItemUserStatus: React.Dispatch<
@@ -83,19 +61,13 @@ interface AppLayoutState {
>;
screenWidth: number;
- setScreenWidth: React.Dispatch<
- React.SetStateAction
- >;
+ setScreenWidth: React.Dispatch>;
contentPanelWidth: number;
- setContentPanelWidth: React.Dispatch<
- React.SetStateAction
- >;
+ setContentPanelWidth: React.Dispatch>;
subPanelWidth: number;
- setSubPanelWidth: React.Dispatch<
- React.SetStateAction
- >;
+ setSubPanelWidth: React.Dispatch>;
langui: Langui;
languages: Languages;
@@ -195,28 +167,18 @@ export const AppContextProvider = (props: Props): JSX.Element => {
initialState.mainPanelOpen
);
- const [darkMode, selectedThemeMode, setDarkMode, setSelectedThemeMode] =
- useDarkMode("darkMode", initialState.darkMode);
-
- const [fontSize, setFontSize] = useLocalStorage(
- "fontSize",
- initialState.fontSize
+ const [darkMode, selectedThemeMode, setDarkMode, setSelectedThemeMode] = useDarkMode(
+ "darkMode",
+ initialState.darkMode
);
- const [dyslexic, setDyslexic] = useLocalStorage(
- "dyslexic",
- initialState.dyslexic
- );
+ const [fontSize, setFontSize] = useLocalStorage("fontSize", initialState.fontSize);
- const [currency, setCurrency] = useLocalStorage(
- "currency",
- initialState.currency
- );
+ const [dyslexic, setDyslexic] = useLocalStorage("dyslexic", initialState.dyslexic);
- const [playerName, setPlayerName] = useLocalStorage(
- "playerName",
- initialState.playerName
- );
+ const [currency, setCurrency] = useLocalStorage("currency", initialState.currency);
+
+ const [playerName, setPlayerName] = useLocalStorage("playerName", initialState.playerName);
const [preferredLanguages, setPreferredLanguages] = useLocalStorage(
"preferredLanguages",
@@ -255,9 +217,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
};
const toggleSelectedThemeMode = () => {
- setSelectedThemeMode((current) =>
- isDefined(current) ? !current : current
- );
+ setSelectedThemeMode((current) => (isDefined(current) ? !current : current));
};
const toggleDyslexic = () => {
@@ -275,9 +235,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
useEffect(() => {
if (preferredLanguages.length === 0) {
if (isDefinedAndNotEmpty(router.locale) && router.locales) {
- setPreferredLanguages(
- getDefaultPreferredLanguages(router.locale, router.locales)
- );
+ setPreferredLanguages(getDefaultPreferredLanguages(router.locale, router.locales));
}
} else if (router.locale !== preferredLanguages[0]) {
/*
@@ -292,13 +250,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
250
);
}
- }, [
- preferredLanguages,
- router,
- router.locale,
- router.locales,
- setPreferredLanguages,
- ]);
+ }, [preferredLanguages, router, router.locale, router.locales, setPreferredLanguages]);
useEffect(() => {
router.events.on("routeChangeStart", () => {
@@ -315,9 +267,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
}, [router.events, setConfigPanelOpen, setMainPanelOpen, setSubPanelOpen]);
useLayoutEffect(() => {
- document.getElementsByTagName("html")[0].style.fontSize = `${
- fontSize * 100
- }%`;
+ document.getElementsByTagName("html")[0].style.fontSize = `${fontSize * 100}%`;
}, [fontSize]);
useScrollIntoView();
@@ -368,8 +318,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
languages,
langui,
currencies,
- }}
- >
+ }}>
{props.children}
);
diff --git a/src/graphql/fetchLocalData.ts b/src/graphql/fetchLocalData.ts
index 1e558d7..5639ee3 100644
--- a/src/graphql/fetchLocalData.ts
+++ b/src/graphql/fetchLocalData.ts
@@ -13,7 +13,7 @@ const LOCAL_DATA_FOLDER = `${process.cwd()}/public/local-data`;
const writeLocalData = (name: LocalDataFile, localData: unknown) => {
const path = `${LOCAL_DATA_FOLDER}/${name}.json`;
writeFileSync(path, JSON.stringify(localData), { encoding: "utf-8" });
- console.log(`${path} has been written!`)
+ console.log(`${path} has been written!`);
};
const readLocalData = (name: LocalDataFile): T => {
@@ -24,10 +24,7 @@ const readLocalData = (name: LocalDataFile): T => {
const sdk = getReadySdk();
(async () => {
- writeLocalData(
- "websiteInterfaces",
- await sdk.localDataGetWebsiteInterfaces()
- );
+ writeLocalData("websiteInterfaces", await sdk.localDataGetWebsiteInterfaces());
writeLocalData("currencies", await sdk.localDataGetCurrencies());
writeLocalData("languages", await sdk.localDataGetLanguages());
})();
@@ -37,7 +34,6 @@ const sdk = getReadySdk();
export type LocalDataFile = "currencies" | "languages" | "websiteInterfaces";
export const getLangui = (locale: string | undefined): Langui => {
- const websiteInterfaces =
- readLocalData("websiteInterfaces");
+ const websiteInterfaces = readLocalData("websiteInterfaces");
return processLangui(websiteInterfaces, locale);
};
diff --git a/src/graphql/getPostStaticProps.ts b/src/graphql/getPostStaticProps.ts
index 9f26e4e..acfd8ad 100644
--- a/src/graphql/getPostStaticProps.ts
+++ b/src/graphql/getPostStaticProps.ts
@@ -1,13 +1,10 @@
import { GetStaticProps } from "next";
import { getReadySdk } from "./sdk";
import { getLangui } from "./fetchLocalData";
-import { PostWithTranslations } from "helpers/types";
+import { PostWithTranslations } from "types/types";
import { getOpenGraph } from "helpers/openGraph";
import { prettyDate, prettySlug } from "helpers/formatters";
-import {
- getDefaultPreferredLanguages,
- staticSmartLanguage,
-} from "helpers/locales";
+import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales";
import { filterHasAttributes, isDefined } from "helpers/others";
import { getDescription } from "helpers/description";
import { AppLayoutRequired } from "components/AppLayout";
@@ -35,10 +32,7 @@ export const getPostStaticProps =
const selectedTranslation = staticSmartLanguage({
items: post.posts.data[0].attributes.translations,
languageExtractor: (item) => item.language?.data?.attributes?.code,
- preferredLanguages: getDefaultPreferredLanguages(
- context.locale,
- context.locales
- ),
+ preferredLanguages: getDefaultPreferredLanguages(context.locale, context.locales),
});
const title = selectedTranslation?.title ?? prettySlug(slug);
diff --git a/src/graphql/operations/getChronicle.graphql b/src/graphql/operations/getChronicle.graphql
index 6faf112..2f78a6e 100644
--- a/src/graphql/operations/getChronicle.graphql
+++ b/src/graphql/operations/getChronicle.graphql
@@ -91,9 +91,7 @@ query getChronicle($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
diff --git a/src/graphql/operations/getChronologyItems.graphql b/src/graphql/operations/getChronologyItems.graphql
index ae4a126..83a7c9b 100644
--- a/src/graphql/operations/getChronologyItems.graphql
+++ b/src/graphql/operations/getChronologyItems.graphql
@@ -1,8 +1,5 @@
query getChronologyItems {
- chronologyItems(
- pagination: { limit: -1 }
- sort: ["year:asc", "month:asc", "day:asc"]
- ) {
+ chronologyItems(pagination: { limit: -1 }, sort: ["year:asc", "month:asc", "day:asc"]) {
data {
id
attributes {
diff --git a/src/graphql/operations/getContentText.graphql b/src/graphql/operations/getContentText.graphql
index 9a034a2..d96c43c 100644
--- a/src/graphql/operations/getContentText.graphql
+++ b/src/graphql/operations/getContentText.graphql
@@ -67,11 +67,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -93,11 +89,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -109,11 +101,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -125,11 +113,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -139,11 +123,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -257,11 +237,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
diff --git a/src/graphql/operations/getContentsFolder.graphql b/src/graphql/operations/getContentsFolder.graphql
index a2f467b..4e06f5a 100644
--- a/src/graphql/operations/getContentsFolder.graphql
+++ b/src/graphql/operations/getContentsFolder.graphql
@@ -62,9 +62,7 @@ query getContentsFolder($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
diff --git a/src/graphql/operations/getLibraryItem.graphql b/src/graphql/operations/getLibraryItem.graphql
index 800677d..e02022f 100644
--- a/src/graphql/operations/getLibraryItem.graphql
+++ b/src/graphql/operations/getLibraryItem.graphql
@@ -57,9 +57,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -82,9 +80,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -130,9 +126,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -144,9 +138,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -156,9 +148,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -212,11 +202,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -238,11 +224,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -254,11 +236,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -270,11 +248,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -284,11 +258,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -352,11 +322,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: {
- language: { code: { eq: $language_code } }
- }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
diff --git a/src/graphql/operations/getLibraryItemScans.graphql b/src/graphql/operations/getLibraryItemScans.graphql
index fc41edb..0ebcb8a 100644
--- a/src/graphql/operations/getLibraryItemScans.graphql
+++ b/src/graphql/operations/getLibraryItemScans.graphql
@@ -124,9 +124,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -148,9 +146,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -162,9 +158,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -176,9 +170,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -188,9 +180,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
diff --git a/src/graphql/operations/getLibraryItemsPreview.graphql b/src/graphql/operations/getLibraryItemsPreview.graphql
index f3e52af..52dec97 100644
--- a/src/graphql/operations/getLibraryItemsPreview.graphql
+++ b/src/graphql/operations/getLibraryItemsPreview.graphql
@@ -37,9 +37,7 @@ query getLibraryItemsPreview($language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -61,9 +59,7 @@ query getLibraryItemsPreview($language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -75,9 +71,7 @@ query getLibraryItemsPreview($language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -89,9 +83,7 @@ query getLibraryItemsPreview($language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
@@ -101,9 +93,7 @@ query getLibraryItemsPreview($language_code: String) {
data {
attributes {
slug
- titles(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
diff --git a/src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql b/src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql
index 711e8cd..ad7dbe7 100644
--- a/src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql
+++ b/src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql
@@ -177,6 +177,9 @@ query localDataGetWebsiteInterfaces {
anchor_link_copied
folders
empty_folder_message
+ switch_to_grid_view
+ switch_to_folder_view
+ content_is_not_available
}
}
}
diff --git a/src/helpers/component.tsx b/src/helpers/component.tsx
index b1b61c0..eeaca69 100644
--- a/src/helpers/component.tsx
+++ b/src/helpers/component.tsx
@@ -15,8 +15,4 @@ export const ConditionalWrapper = ({
wrapper: Wrapper,
wrapperProps,
}: ConditionalWrapperProps): JSX.Element =>
- isWrapping ? (
- {children}
- ) : (
- <>{children}>
- );
+ isWrapping ? {children} : <>{children}>;
diff --git a/src/helpers/date.ts b/src/helpers/date.ts
index de12ef7..06b0e05 100644
--- a/src/helpers/date.ts
+++ b/src/helpers/date.ts
@@ -8,10 +8,8 @@ export const compareDate = (
if (isUndefined(a) || isUndefined(b)) {
return 0;
}
- const dateA =
- (a.year ?? Infinity) * 365 + (a.month ?? 12) * 31 + (a.day ?? 31);
- const dateB =
- (b.year ?? Infinity) * 365 + (b.month ?? 12) * 31 + (b.day ?? 31);
+ const dateA = (a.year ?? Infinity) * 365 + (a.month ?? 12) * 31 + (a.day ?? 31);
+ const dateB = (b.year ?? Infinity) * 365 + (b.month ?? 12) * 31 + (b.day ?? 31);
return dateA - dateB;
};
diff --git a/src/helpers/formatters.ts b/src/helpers/formatters.ts
index b10da19..3997f96 100644
--- a/src/helpers/formatters.ts
+++ b/src/helpers/formatters.ts
@@ -58,7 +58,7 @@ export const prettyInlineTitle = (
return result;
};
-export const prettyItemType = (metadata: any, langui: Langui): string => {
+export const prettyItemType = (metadata: { __typename: string }, langui: Langui): string => {
switch (metadata.__typename) {
case "ComponentMetadataAudio":
return langui.audio ?? "Audio";
@@ -242,8 +242,7 @@ export const prettyDuration = (seconds: number): string => {
export const prettyLanguage = (code: string, languages: Languages): string => {
let result = code;
languages.forEach((language) => {
- if (language.attributes?.code === code)
- result = language.attributes.localized_name;
+ if (language.attributes?.code === code) result = language.attributes.localized_name;
});
return result;
};
@@ -254,8 +253,7 @@ export const prettyURL = (url: string): string => {
};
const capitalizeString = (string: string): string => {
- const capitalizeWord = (word: string): string =>
- word.charAt(0).toUpperCase() + word.substring(1);
+ const capitalizeWord = (word: string): string => word.charAt(0).toUpperCase() + word.substring(1);
let words = string.split(" ");
words = words.map((word) => capitalizeWord(word));
@@ -281,3 +279,5 @@ export const slugify = (string: string | undefined): string => {
.trim()
.replace(/ /gu, "-");
};
+
+export const sJoin = (...args: (string | null | undefined)[]): string => args.join("");
diff --git a/src/helpers/img.ts b/src/helpers/img.ts
index f85852f..8761bfa 100644
--- a/src/helpers/img.ts
+++ b/src/helpers/img.ts
@@ -1,3 +1,5 @@
+import { sJoin } from "./formatters";
+
export enum ImageQuality {
Small = "small",
Medium = "medium",
@@ -17,7 +19,7 @@ export interface OgImage {
alt: string;
}
-export const imageQualityProperties: Record = {
+const imageQualityProperties: Record = {
small: { maxSize: 512, extension: "webp" },
medium: { maxSize: 1024, extension: "webp" },
large: { maxSize: 2048, extension: "webp" },
@@ -37,11 +39,16 @@ export const getAssetFilename = (path: string): string => {
export const getAssetURL = (url: string, quality: ImageQuality): string => {
const indexEndPath = url.indexOf("/uploads/") + "/uploads/".length;
const indexStartExtension = url.lastIndexOf(".");
- const assetPathWithoutExtension = url.slice(
- indexEndPath,
- indexStartExtension
+ const assetPathWithoutExtension = url.slice(indexEndPath, indexStartExtension);
+ return sJoin(
+ process.env.NEXT_PUBLIC_URL_IMG,
+ "/",
+ quality,
+ "/",
+ assetPathWithoutExtension,
+ ".",
+ imageQualityProperties[quality].extension
);
- return `${process.env.NEXT_PUBLIC_URL_IMG}/${quality}/${assetPathWithoutExtension}.${imageQualityProperties[quality].extension}`;
};
const getImgSizesByMaxSize = (
diff --git a/src/helpers/libraryItem.ts b/src/helpers/libraryItem.ts
index f051438..cd74944 100644
--- a/src/helpers/libraryItem.ts
+++ b/src/helpers/libraryItem.ts
@@ -1,5 +1,16 @@
-export const isUntangibleGroupItem = (metadata: any): boolean =>
- metadata &&
+import { isDefined } from "./others";
+
+export const isUntangibleGroupItem = (
+ metadata:
+ | {
+ __typename: string;
+ // eslint-disable-next-line id-denylist
+ subtype?: { data?: { attributes?: { slug: string } | null } | null } | null;
+ }
+ | null
+ | undefined
+): boolean =>
+ isDefined(metadata) &&
metadata.__typename === "ComponentMetadataGroup" &&
(metadata.subtype?.data?.attributes?.slug === "variant-set" ||
metadata.subtype?.data?.attributes?.slug === "relation-set");
diff --git a/src/helpers/localData.ts b/src/helpers/localData.ts
index 7115b8c..48d4fc0 100644
--- a/src/helpers/localData.ts
+++ b/src/helpers/localData.ts
@@ -5,9 +5,7 @@ import {
} from "graphql/generated";
export type Langui = NonNullable<
- NonNullable<
- LocalDataGetWebsiteInterfacesQuery["websiteInterfaces"]
- >["data"][number]["attributes"]
+ NonNullable["data"][number]["attributes"]
>;
export const processLangui = (
@@ -15,24 +13,19 @@ export const processLangui = (
locale: string | undefined
): Langui =>
websiteInterfaces?.websiteInterfaces?.data.find(
- (langui) =>
- langui.attributes?.ui_language?.data?.attributes?.code === locale
+ (langui) => langui.attributes?.ui_language?.data?.attributes?.code === locale
)?.attributes ?? {};
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export type Currencies = NonNullable<
- LocalDataGetCurrenciesQuery["currencies"]
->["data"];
+export type Currencies = NonNullable["data"];
export const processCurrencies = (
currencies: LocalDataGetCurrenciesQuery | undefined
): Currencies => {
if (currencies?.currencies?.data) {
currencies.currencies.data.sort((a, b) =>
- a.attributes && b.attributes
- ? a.attributes.code.localeCompare(b.attributes.code)
- : 0
+ a.attributes && b.attributes ? a.attributes.code.localeCompare(b.attributes.code) : 0
);
}
return currencies?.currencies?.data ?? [];
@@ -40,13 +33,9 @@ export const processCurrencies = (
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export type Languages = NonNullable<
- LocalDataGetLanguagesQuery["languages"]
->["data"];
+export type Languages = NonNullable["data"];
-export const processLanguages = (
- languages: LocalDataGetLanguagesQuery | undefined
-): Languages => {
+export const processLanguages = (languages: LocalDataGetLanguagesQuery | undefined): Languages => {
if (languages?.languages?.data) {
languages.languages.data.sort((a, b) =>
a.attributes && b.attributes
diff --git a/src/helpers/locales.ts b/src/helpers/locales.ts
index 8a4d09d..3e63270 100644
--- a/src/helpers/locales.ts
+++ b/src/helpers/locales.ts
@@ -1,9 +1,6 @@
import { isDefined } from "./others";
-export const getDefaultPreferredLanguages = (
- routerLocal: string,
- locales: string[]
-): string[] => {
+export const getDefaultPreferredLanguages = (routerLocal: string, locales: string[]): string[] => {
let defaultPreferredLanguages: string[] = [];
if (routerLocal === "en") {
defaultPreferredLanguages = [routerLocal];
@@ -13,8 +10,7 @@ export const getDefaultPreferredLanguages = (
} else {
defaultPreferredLanguages = [routerLocal, "en"];
locales.map((locale) => {
- if (locale !== routerLocal && locale !== "en")
- defaultPreferredLanguages.push(locale);
+ if (locale !== routerLocal && locale !== "en") defaultPreferredLanguages.push(locale);
});
}
return defaultPreferredLanguages;
diff --git a/src/helpers/numbers.ts b/src/helpers/numbers.ts
index 35c87f7..d2afb9a 100644
--- a/src/helpers/numbers.ts
+++ b/src/helpers/numbers.ts
@@ -5,11 +5,7 @@ export const convertPrice = (
pricePicker: PricePickerFragment,
targetCurrency: Currencies[number]
): number => {
- if (
- pricePicker.amount &&
- pricePicker.currency?.data?.attributes &&
- targetCurrency.attributes
- )
+ if (pricePicker.amount && pricePicker.currency?.data?.attributes && targetCurrency.attributes)
return (
(pricePicker.amount * pricePicker.currency.data.attributes.rate_to_usd) /
targetCurrency.attributes.rate_to_usd
@@ -23,5 +19,4 @@ export const convertMmToInch = (mm: number | null | undefined): string =>
export const randomInt = (min: number, max: number): number =>
Math.floor(Math.random() * (max - min)) + min;
-export const isInteger = (value: string): boolean =>
- /^[+-]?[0-9]+$/u.test(value);
+export const isInteger = (value: string): boolean => /^[+-]?[0-9]+$/u.test(value);
diff --git a/src/helpers/openGraph.ts b/src/helpers/openGraph.ts
index b7236e2..b4063f7 100644
--- a/src/helpers/openGraph.ts
+++ b/src/helpers/openGraph.ts
@@ -1,9 +1,4 @@
-import {
- OgImage,
- getImgSizesByQuality,
- ImageQuality,
- getAssetURL,
-} from "./img";
+import { OgImage, getImgSizesByQuality, ImageQuality, getAssetURL } from "./img";
import { isDefinedAndNotEmpty } from "./others";
import { Langui } from "./localData";
import { UploadImageFragment } from "graphql/generated";
@@ -30,21 +25,13 @@ export const getOpenGraph = (
description?: string | null | undefined,
thumbnail?: UploadImageFragment | null | undefined
): OpenGraph => ({
- title: `${TITLE_PREFIX}${
- isDefinedAndNotEmpty(title) ? `${TITLE_SEPARATOR}${title}` : ""
- }`,
- description: isDefinedAndNotEmpty(description)
- ? description
- : langui.default_description ?? "",
+ title: `${TITLE_PREFIX}${isDefinedAndNotEmpty(title) ? `${TITLE_SEPARATOR}${title}` : ""}`,
+ description: isDefinedAndNotEmpty(description) ? description : langui.default_description ?? "",
thumbnail: thumbnail ? getOgImage(thumbnail) : DEFAULT_OG_THUMBNAIL,
});
const getOgImage = (image: UploadImageFragment): OgImage => {
- const imgSize = getImgSizesByQuality(
- image.width ?? 0,
- image.height ?? 0,
- ImageQuality.Og
- );
+ const imgSize = getImgSizesByQuality(image.width ?? 0, image.height ?? 0, ImageQuality.Og);
return {
image: getAssetURL(image.url, ImageQuality.Og),
width: imgSize.width,
diff --git a/src/helpers/others.ts b/src/helpers/others.ts
index 39ba800..701dc82 100644
--- a/src/helpers/others.ts
+++ b/src/helpers/others.ts
@@ -8,14 +8,10 @@ import {
type SortRangedContentProps =
| NonNullable<
- NonNullable<
- GetLibraryItemQuery["libraryItems"]
- >["data"][number]["attributes"]
+ NonNullable["data"][number]["attributes"]
>["contents"]
| NonNullable<
- NonNullable<
- GetLibraryItemScansQuery["libraryItems"]
- >["data"][number]["attributes"]
+ NonNullable["data"][number]["attributes"]
>["contents"];
export const sortRangedContent = (contents: SortRangedContentProps): void => {
@@ -24,19 +20,13 @@ export const sortRangedContent = (contents: SortRangedContentProps): void => {
a.attributes?.range[0]?.__typename === "ComponentRangePageRange" &&
b.attributes?.range[0]?.__typename === "ComponentRangePageRange"
) {
- return (
- a.attributes.range[0].starting_page -
- b.attributes.range[0].starting_page
- );
+ return a.attributes.range[0].starting_page - b.attributes.range[0].starting_page;
}
return 0;
});
};
-export const getStatusDescription = (
- status: string,
- langui: Langui
-): string | null | undefined => {
+export const getStatusDescription = (status: string, langui: Langui): string | null | undefined => {
switch (status) {
case Enum_Componentsetstextset_Status.Incomplete:
return langui.status_incomplete;
@@ -55,30 +45,26 @@ export const getStatusDescription = (
}
};
-export const isDefined = (t: T): t is NonNullable =>
- t !== null && t !== undefined;
+export const isDefined = (t: T): t is NonNullable => t !== null && t !== undefined;
-export const isUndefined = (
- t: T | null | undefined
-): t is null | undefined => t === null || t === undefined;
+export const isUndefined = (t: T | null | undefined): t is null | undefined =>
+ t === null || t === undefined;
-export const isDefinedAndNotEmpty = (
- string: string | null | undefined
-): string is string => isDefined(string) && string.length > 0;
+export const isDefinedAndNotEmpty = (string: string | null | undefined): string is string =>
+ isDefined(string) && string.length > 0;
export const filterDefined = (t: T[] | null | undefined): NonNullable[] =>
- isUndefined(t)
- ? []
- : (t.filter((item) => isDefined(item)) as NonNullable[]);
+ isUndefined(t) ? [] : (t.filter((item) => isDefined(item)) as NonNullable[]);
export const filterHasAttributes = >(
t: T[] | null | undefined,
paths: readonly P[]
): SelectiveNonNullable[] =>
isDefined(t)
- ? (t.filter((item) =>
- hasAttributes(item, paths)
- ) as unknown as SelectiveNonNullable[])
+ ? (t.filter((item) => hasAttributes(item, paths)) as unknown as SelectiveNonNullable<
+ T,
+ typeof paths[number]
+ >[])
: [];
const hasAttributes = (item: T, paths: readonly PathDot[]): boolean =>
@@ -112,11 +98,7 @@ export const iterateMap = (
return toList.map(([key, value], index) => callbackfn(key, value, index));
};
-export const arrayMove = (
- arr: T[],
- sourceIndex: number,
- targetIndex: number
-): T[] => {
+export const arrayMove = (arr: T[], sourceIndex: number, targetIndex: number): T[] => {
arr.splice(targetIndex, 0, arr.splice(sourceIndex, 1)[0]);
return arr;
};
diff --git a/src/hooks/useLightBox.tsx b/src/hooks/useLightBox.tsx
index 2679d57..3c18351 100644
--- a/src/hooks/useLightBox.tsx
+++ b/src/hooks/useLightBox.tsx
@@ -1,10 +1,7 @@
import { useState } from "react";
import { LightBox } from "components/LightBox";
-export const useLightBox = (): [
- (images: string[], index?: number) => void,
- () => JSX.Element
-] => {
+export const useLightBox = (): [(images: string[], index?: number) => void, () => JSX.Element] => {
const [lightboxOpen, setLightboxOpen] = useState(false);
const [lightboxImages, setLightboxImages] = useState([""]);
const [lightboxIndex, setLightboxIndex] = useState(0);
diff --git a/src/hooks/useLocalData.ts b/src/hooks/useLocalData.ts
index fd3a39e..93c65d5 100644
--- a/src/hooks/useLocalData.ts
+++ b/src/hooks/useLocalData.ts
@@ -18,10 +18,7 @@ const useFetchLocalData = (name: LocalDataFile) =>
export const useLangui = (): Langui => {
const { locale } = useRouter();
const { data: websiteInterfaces } = useFetchLocalData("websiteInterfaces");
- return useMemo(
- () => processLangui(websiteInterfaces, locale),
- [websiteInterfaces, locale]
- );
+ return useMemo(() => processLangui(websiteInterfaces, locale), [websiteInterfaces, locale]);
};
export const useCurrencies = (): Currencies => {
diff --git a/src/hooks/useMediaQuery.ts b/src/hooks/useMediaQuery.ts
index 5036548..754cc89 100644
--- a/src/hooks/useMediaQuery.ts
+++ b/src/hooks/useMediaQuery.ts
@@ -1,7 +1,5 @@
import { useMediaQuery } from "usehooks-ts";
-export const useDeviceSupportsHover = (): boolean =>
- useMediaQuery("(hover: hover)");
+export const useDeviceSupportsHover = (): boolean => useMediaQuery("(hover: hover)");
-export const usePrefersDarkMode = (): boolean =>
- useMediaQuery("(prefers-color-scheme: dark)");
+export const usePrefersDarkMode = (): boolean => useMediaQuery("(prefers-color-scheme: dark)");
diff --git a/src/hooks/useOnResize.ts b/src/hooks/useOnResize.ts
index f12ffa5..ccfae39 100644
--- a/src/hooks/useOnResize.ts
+++ b/src/hooks/useOnResize.ts
@@ -12,10 +12,7 @@ export const useOnResize = (
console.log("[useOnResize]", id);
const elem = isClient ? document.querySelector(`#${id}`) : null;
const ro = new ResizeObserver((resizeObserverEntry) =>
- onResize(
- resizeObserverEntry[0].contentRect.width,
- resizeObserverEntry[0].contentRect.height
- )
+ onResize(resizeObserverEntry[0].contentRect.width, resizeObserverEntry[0].contentRect.height)
);
if (isDefined(elem)) {
ro.observe(elem);
diff --git a/src/hooks/useOnScroll.ts b/src/hooks/useOnScroll.ts
index 7499de1..ec5f90e 100644
--- a/src/hooks/useOnScroll.ts
+++ b/src/hooks/useOnScroll.ts
@@ -2,15 +2,9 @@ import { useMemo, useCallback, useEffect } from "react";
import { useIsClient } from "usehooks-ts";
import { Ids } from "types/ids";
-export const useOnScroll = (
- id: Ids,
- onScroll: (scroll: number) => void
-): void => {
+export const useOnScroll = (id: Ids, onScroll: (scroll: number) => void): void => {
const isClient = useIsClient();
- const elem = useMemo(
- () => (isClient ? document.querySelector(`#${id}`) : null),
- [id, isClient]
- );
+ const elem = useMemo(() => (isClient ? document.querySelector(`#${id}`) : null), [id, isClient]);
const listener = useCallback(() => {
if (elem?.scrollTop) {
onScroll(elem.scrollTop);
diff --git a/src/hooks/useScrollTopOnChange.ts b/src/hooks/useScrollTopOnChange.ts
index af412f4..bc4ae13 100644
--- a/src/hooks/useScrollTopOnChange.ts
+++ b/src/hooks/useScrollTopOnChange.ts
@@ -2,16 +2,9 @@ import { DependencyList, useEffect } from "react";
import { Ids } from "types/ids";
// Scroll to top of element "id" when "deps" update.
-export const useScrollTopOnChange = (
- id: Ids,
- deps: DependencyList,
- enabled = true
-): void => {
+export const useScrollTopOnChange = (id: Ids, deps: DependencyList, enabled = true): void => {
useEffect(() => {
- if (enabled)
- document
- .querySelector(`#${id}`)
- ?.scrollTo({ top: 0, behavior: "smooth" });
+ if (enabled) document.querySelector(`#${id}`)?.scrollTo({ top: 0, behavior: "smooth" });
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [id, ...deps, enabled]);
};
diff --git a/src/hooks/useSmartLanguage.ts b/src/hooks/useSmartLanguage.ts
index 327e2c9..ef9d137 100644
--- a/src/hooks/useSmartLanguage.ts
+++ b/src/hooks/useSmartLanguage.ts
@@ -16,11 +16,7 @@ export const useSmartLanguage = ({
items,
languageExtractor,
transform = (item) => item,
-}: Props): [
- T | undefined,
- typeof LanguageSwitcher,
- Parameters[0]
-] => {
+}: Props): [T | undefined, typeof LanguageSwitcher, Parameters[0]] => {
const { preferredLanguages } = useAppLayout();
const languages = useLanguages();
const router = useRouter();
@@ -34,14 +30,10 @@ export const useSmartLanguage = ({
return memo;
}, [items, languageExtractor]);
- const [selectedTranslationIndex, setSelectedTranslationIndex] = useState<
- number | undefined
- >();
+ const [selectedTranslationIndex, setSelectedTranslationIndex] = useState();
useEffect(() => {
- setSelectedTranslationIndex(
- getPreferredLanguage(preferredLanguages, availableLocales)
- );
+ setSelectedTranslationIndex(getPreferredLanguage(preferredLanguages, availableLocales));
}, [preferredLanguages, availableLocales, router.locale]);
const selectedTranslation = useMemo(() => {
diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx
index 8cbf7d4..12a8bac 100644
--- a/src/pages/_document.tsx
+++ b/src/pages/_document.tsx
@@ -8,9 +8,7 @@ import Document, {
} from "next/document";
export default class MyDocument extends Document {
- static async getInitialProps(
- ctx: DocumentContext
- ): Promise {
+ static async getInitialProps(ctx: DocumentContext): Promise {
const initialProps = await Document.getInitialProps(ctx);
return { ...initialProps };
}
@@ -19,45 +17,20 @@ export default class MyDocument extends Document {
return (
-
-
-
+
+
+
-
-
+
+
-
+
diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx
index 2f8688c..5be6d71 100644
--- a/src/pages/about-us/accords-handbook.tsx
+++ b/src/pages/about-us/accords-handbook.tsx
@@ -1,8 +1,5 @@
import { PostPage } from "components/PostPage";
-import {
- getPostStaticProps,
- PostStaticProps,
-} from "graphql/getPostStaticProps";
+import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
import { useAppLayout } from "contexts/AppLayoutContext";
/*
diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx
index 4d11e8c..d8d77be 100644
--- a/src/pages/about-us/contact.tsx
+++ b/src/pages/about-us/contact.tsx
@@ -2,10 +2,7 @@ import { useRouter } from "next/router";
import { useState } from "react";
import { InsetBox } from "components/InsetBox";
import { PostPage } from "components/PostPage";
-import {
- getPostStaticProps,
- PostStaticProps,
-} from "graphql/getPostStaticProps";
+import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
import { cIf, cJoin } from "helpers/className";
import { randomInt } from "helpers/numbers";
import { RequestMailProps, ResponseMailProps } from "pages/api/mail";
@@ -22,9 +19,7 @@ const AboutUs = (props: PostStaticProps): JSX.Element => {
const { langui } = useAppLayout();
const is1ColumnLayout = useIs1ColumnLayout();
const [formResponse, setFormResponse] = useState("");
- const [formState, setFormState] = useState<"completed" | "ongoing" | "stale">(
- "stale"
- );
+ const [formState, setFormState] = useState<"completed" | "ongoing" | "stale">("stale");
const [randomNumber1, setRandomNumber1] = useState(randomInt(0, 10));
const [randomNumber2, setRandomNumber2] = useState(randomInt(0, 10));
@@ -34,10 +29,7 @@ const AboutUs = (props: PostStaticProps): JSX.Element => {