Small fixes
This commit is contained in:
		
							parent
							
								
									f8f98ec41e
								
							
						
					
					
						commit
						06d82e1133
					
				| @ -1,4 +1,4 @@ | |||||||
| # /!\ For URLs, don't include the traling '/' | # /!\ For URLs, don't include the trailing '/' | ||||||
| 
 | 
 | ||||||
| # ┌─────────────────────┐ | # ┌─────────────────────┐ | ||||||
| # │  PRIVATE VARIABLES  │ | # │  PRIVATE VARIABLES  │ | ||||||
| @ -26,9 +26,9 @@ SMTP_PASSWORD=mypassword123 | |||||||
| 
 | 
 | ||||||
| NEXT_PUBLIC_URL_CMS=https://url-to.strapi-accords-library.com | NEXT_PUBLIC_URL_CMS=https://url-to.strapi-accords-library.com | ||||||
| NEXT_PUBLIC_URL_IMG=https://url-to.img-accords-library.com | NEXT_PUBLIC_URL_IMG=https://url-to.img-accords-library.com | ||||||
| NEXT_PUBLIC_URL_WATCH=https://url-to.watch-accords-library.com |  | ||||||
| NEXT_PUBLIC_URL_SELF=https://url-to-front-accords-library.com | NEXT_PUBLIC_URL_SELF=https://url-to-front-accords-library.com | ||||||
| NEXT_PUBLIC_URL_SCANS_DOWNLOAD=https://url-to.search-accords-library.com | NEXT_PUBLIC_URL_SCANS=https://url-to.scans-accords-library.com/ | ||||||
|  | NEXT_PUBLIC_URL_VIDEOS=https://url-to.videos-accords-library.com/ | ||||||
| 
 | 
 | ||||||
| ## MEILISEARCH | ## MEILISEARCH | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -186,7 +186,8 @@ | |||||||
|           "level_x": "Level {x}", |           "level_x": "Level {x}", | ||||||
|           "story_x": "Story {x}", |           "story_x": "Story {x}", | ||||||
|           "player_name_tooltip": "Certain in-game texts use the player's name as part of the dialogue/narration. If you want to see your name in the transcript found on this website, feel free to enter your player's name here. If left empty, '(player)' will be used instead.", |           "player_name_tooltip": "Certain in-game texts use the player's name as part of the dialogue/narration. If you want to see your name in the transcript found on this website, feel free to enter your player's name here. If left empty, '(player)' will be used instead.", | ||||||
|           "download_scans": "Download scans" |           "download_scans": "Download scans", | ||||||
|  |           "search_placeholder": "Search..." | ||||||
|         } |         } | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -374,7 +375,8 @@ | |||||||
|           "level_x": "Niveau {x}", |           "level_x": "Niveau {x}", | ||||||
|           "story_x": "Histoire {x}", |           "story_x": "Histoire {x}", | ||||||
|           "player_name_tooltip": "Certains textes dans les jeux utilisent le nom du joueur dans les dialogue/la narration. Si vous voulez voir votre nom dans les transcriptions se trouvant sur ce site web, n'hésitez pas à entrer votre nom de joueur ici. S'il n'est pas renseigné, '(player)' sera utilisé à la place.", |           "player_name_tooltip": "Certains textes dans les jeux utilisent le nom du joueur dans les dialogue/la narration. Si vous voulez voir votre nom dans les transcriptions se trouvant sur ce site web, n'hésitez pas à entrer votre nom de joueur ici. S'il n'est pas renseigné, '(player)' sera utilisé à la place.", | ||||||
|           "download_scans": "Télécharger les scans" |           "download_scans": "Télécharger les scans", | ||||||
|  |           "search_placeholder": "Rechercher ..." | ||||||
|         } |         } | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -562,7 +564,8 @@ | |||||||
|           "level_x": null, |           "level_x": null, | ||||||
|           "story_x": null, |           "story_x": null, | ||||||
|           "player_name_tooltip": null, |           "player_name_tooltip": null, | ||||||
|           "download_scans": null |           "download_scans": null, | ||||||
|  |           "search_placeholder": null | ||||||
|         } |         } | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -750,7 +753,8 @@ | |||||||
|           "level_x": null, |           "level_x": null, | ||||||
|           "story_x": null, |           "story_x": null, | ||||||
|           "player_name_tooltip": null, |           "player_name_tooltip": null, | ||||||
|           "download_scans": null |           "download_scans": null, | ||||||
|  |           "search_placeholder": null | ||||||
|         } |         } | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -938,7 +942,8 @@ | |||||||
|           "level_x": null, |           "level_x": null, | ||||||
|           "story_x": null, |           "story_x": null, | ||||||
|           "player_name_tooltip": null, |           "player_name_tooltip": null, | ||||||
|           "download_scans": null |           "download_scans": null, | ||||||
|  |           "search_placeholder": null | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     ] |     ] | ||||||
|  | |||||||
| @ -212,7 +212,7 @@ export const SearchPopup = (): JSX.Element => { | |||||||
|         ref={searchInputRef} |         ref={searchInputRef} | ||||||
|         onChange={fetchSearchResults} |         onChange={fetchSearchResults} | ||||||
|         value={query} |         value={query} | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|       /> |       /> | ||||||
| 
 | 
 | ||||||
|       <div className="flex w-full flex-wrap gap-12 gap-x-16"> |       <div className="flex w-full flex-wrap gap-12 gap-x-16"> | ||||||
|  | |||||||
| @ -185,4 +185,5 @@ export interface ICUParams { | |||||||
|   story_x: { x: Date | boolean | number | string }; |   story_x: { x: Date | boolean | number | string }; | ||||||
|   player_name_tooltip: never; |   player_name_tooltip: never; | ||||||
|   download_scans: never; |   download_scans: never; | ||||||
|  |   search_placeholder: never; | ||||||
| } | } | ||||||
|  | |||||||
| @ -192,6 +192,7 @@ query localDataGetWebsiteInterfaces { | |||||||
|         story_x |         story_x | ||||||
|         player_name_tooltip |         player_name_tooltip | ||||||
|         download_scans |         download_scans | ||||||
|  |         search_placeholder | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -13,3 +13,6 @@ export const isUntangibleGroupItem = ( | |||||||
|   metadata.__typename === "ComponentMetadataGroup" && |   metadata.__typename === "ComponentMetadataGroup" && | ||||||
|   (metadata.subtype?.data?.attributes?.slug === "variant-set" || |   (metadata.subtype?.data?.attributes?.slug === "variant-set" || | ||||||
|     metadata.subtype?.data?.attributes?.slug === "relation-set"); |     metadata.subtype?.data?.attributes?.slug === "relation-set"); | ||||||
|  | 
 | ||||||
|  | export const getScanArchiveURL = (slug: string): string => | ||||||
|  |   `${process.env.NEXT_PUBLIC_URL_SCANS}/${slug}.zip`; | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| export const getVideoThumbnailURL = (uid: string): string => | export const getVideoThumbnailURL = (uid: string): string => | ||||||
|   `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.webp`; |   `${process.env.NEXT_PUBLIC_URL_VIDEOS}/${uid}.webp`; | ||||||
| 
 | 
 | ||||||
| export const getVideoFile = (uid: string): string => | export const getVideoFile = (uid: string): string => | ||||||
|   `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.mp4`; |   `${process.env.NEXT_PUBLIC_URL_VIDEOS}/${uid}.mp4`; | ||||||
|  | |||||||
| @ -168,7 +168,7 @@ const Channel = ({ channel, ...otherProps }: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(newQuery) => { |         onChange={(newQuery) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
|  | |||||||
| @ -160,7 +160,7 @@ const Videos = ({ ...otherProps }: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(newQuery) => { |         onChange={(newQuery) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
| @ -195,6 +195,7 @@ const Videos = ({ ...otherProps }: Props): JSX.Element => { | |||||||
|         <Switch |         <Switch | ||||||
|           value={onlyShowGone} |           value={onlyShowGone} | ||||||
|           onClick={() => { |           onClick={() => { | ||||||
|  |             setPage(1); | ||||||
|             toggleOnlyShowGone(); |             toggleOnlyShowGone(); | ||||||
|           }} |           }} | ||||||
|         /> |         /> | ||||||
|  | |||||||
| @ -18,7 +18,6 @@ import { getVideoFile } from "helpers/videos"; | |||||||
| import { getOpenGraph } from "helpers/openGraph"; | import { getOpenGraph } from "helpers/openGraph"; | ||||||
| import { atoms } from "contexts/atoms"; | import { atoms } from "contexts/atoms"; | ||||||
| import { useAtomGetter, useAtomSetter } from "helpers/atoms"; | import { useAtomGetter, useAtomSetter } from "helpers/atoms"; | ||||||
| import { Link } from "components/Inputs/Link"; |  | ||||||
| import { useFormat } from "hooks/useFormat"; | import { useFormat } from "hooks/useFormat"; | ||||||
| import { getFormat } from "helpers/i18n"; | import { getFormat } from "helpers/i18n"; | ||||||
| 
 | 
 | ||||||
| @ -80,7 +79,7 @@ const Video = ({ video, ...otherProps }: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|           <div className="mt-2 p-6"> |           <div className="mt-2 p-6"> | ||||||
|             <h1 className="text-2xl">{video.title}</h1> |             <h1 className="text-2xl">{video.title}</h1> | ||||||
|             <div className="flex w-full flex-row flex-wrap gap-x-6"> |             <div className="flex w-full flex-row flex-wrap place-items-center gap-x-6"> | ||||||
|               <p> |               <p> | ||||||
|                 <Ico icon="event" className="mr-1 translate-y-[.15em] !text-base" /> |                 <Ico icon="event" className="mr-1 translate-y-[.15em] !text-base" /> | ||||||
|                 {prettyDate(video.published_date, router.locale)} |                 {prettyDate(video.published_date, router.locale)} | ||||||
| @ -99,9 +98,14 @@ const Video = ({ video, ...otherProps }: Props): JSX.Element => { | |||||||
|                     : prettyShortenNumber(video.likes)} |                     : prettyShortenNumber(video.likes)} | ||||||
|                 </p> |                 </p> | ||||||
|               )} |               )} | ||||||
|               <Link href={`https://youtu.be/${video.uid}`} alwaysNewTab> |               {video.source === "YouTube" && ( | ||||||
|                 <Button size="small" text={`${format("view_on")} ${video.source}`} /> |                 <Button | ||||||
|               </Link> |                   size="small" | ||||||
|  |                   text={`${format("view_on")} ${video.source}`} | ||||||
|  |                   href={`https://youtu.be/${video.uid}`} | ||||||
|  |                   alwaysNewTab | ||||||
|  |                 /> | ||||||
|  |               )} | ||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -142,7 +142,7 @@ const Contents = (props: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(name) => { |         onChange={(name) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ import { | |||||||
|   isDefinedAndNotEmpty, |   isDefinedAndNotEmpty, | ||||||
| } from "helpers/asserts"; | } from "helpers/asserts"; | ||||||
| import { useScrollTopOnChange } from "hooks/useScrollTopOnChange"; | import { useScrollTopOnChange } from "hooks/useScrollTopOnChange"; | ||||||
| import { isUntangibleGroupItem } from "helpers/libraryItem"; | import { getScanArchiveURL, isUntangibleGroupItem } from "helpers/libraryItem"; | ||||||
| import { useDeviceSupportsHover } from "hooks/useMediaQuery"; | import { useDeviceSupportsHover } from "hooks/useMediaQuery"; | ||||||
| import { WithLabel } from "components/Inputs/WithLabel"; | import { WithLabel } from "components/Inputs/WithLabel"; | ||||||
| import { cJoin, cIf } from "helpers/className"; | import { cJoin, cIf } from "helpers/className"; | ||||||
| @ -533,7 +533,7 @@ const LibrarySlug = ({ item, itemId, ...otherProps }: Props): JSX.Element => { | |||||||
|               )} |               )} | ||||||
|               {item.download_available && ( |               {item.download_available && ( | ||||||
|                 <Button |                 <Button | ||||||
|                   href={`${process.env.NEXT_PUBLIC_URL_SCANS_DOWNLOAD}/library/scans/${item.slug}.zip`} |                   href={getScanArchiveURL(item.slug)} | ||||||
|                   icon="download" |                   icon="download" | ||||||
|                   text={format("download_scans")} |                   text={format("download_scans")} | ||||||
|                 /> |                 /> | ||||||
|  | |||||||
| @ -41,6 +41,7 @@ import { useIsWebkit } from "hooks/useIsWebkit"; | |||||||
| import { useTypedRouter } from "hooks/useTypedRouter"; | import { useTypedRouter } from "hooks/useTypedRouter"; | ||||||
| import { useFormat } from "hooks/useFormat"; | import { useFormat } from "hooks/useFormat"; | ||||||
| import { getFormat } from "helpers/i18n"; | import { getFormat } from "helpers/i18n"; | ||||||
|  | import { getScanArchiveURL } from "helpers/libraryItem"; | ||||||
| 
 | 
 | ||||||
| type BookType = "book" | "manga"; | type BookType = "book" | "manga"; | ||||||
| type DisplayMode = "double" | "single"; | type DisplayMode = "double" | "single"; | ||||||
| @ -369,7 +370,7 @@ const LibrarySlug = ({ | |||||||
| 
 | 
 | ||||||
|       {item.download_available && ( |       {item.download_available && ( | ||||||
|         <Button |         <Button | ||||||
|           href={`${process.env.NEXT_PUBLIC_URL_SCANS_DOWNLOAD}/library/scans/${item.slug}.zip`} |           href={getScanArchiveURL(item.slug)} | ||||||
|           icon="download" |           icon="download" | ||||||
|           text={format("download_scans")} |           text={format("download_scans")} | ||||||
|         /> |         /> | ||||||
|  | |||||||
| @ -247,7 +247,7 @@ const Library = (props: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(name) => { |         onChange={(name) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
|  | |||||||
| @ -118,7 +118,7 @@ const News = ({ ...otherProps }: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(name) => { |         onChange={(name) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
|  | |||||||
| @ -114,7 +114,7 @@ const Wiki = (props: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(name) => { |         onChange={(name) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
|  | |||||||
| @ -119,7 +119,7 @@ const Weapons = (props: Props): JSX.Element => { | |||||||
| 
 | 
 | ||||||
|       <TextInput |       <TextInput | ||||||
|         className="mb-6 w-full" |         className="mb-6 w-full" | ||||||
|         placeholder={format("search_title")} |         placeholder={format("search_placeholder")} | ||||||
|         value={query} |         value={query} | ||||||
|         onChange={(name) => { |         onChange={(name) => { | ||||||
|           setPage(1); |           setPage(1); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 DrMint
						DrMint