Skip to content

Commit

Permalink
feat(stories): 星空编
Browse files Browse the repository at this point in the history
  • Loading branch information
outloudvi committed Jul 20, 2024
1 parent 7363d16 commit 25f7f6d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
16 changes: 3 additions & 13 deletions components/stories/StoriesItem.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Button, Skeleton } from '@mantine/core'
import { Button } from '@mantine/core'
import { useLocale } from 'next-intl'
import { getTranslations } from 'next-intl/server'

import { Link } from '#utils/navigation'
import { toVideoLink } from '#components/ExternalVideo'
import type { SeriesName } from '#data/stories'
import { Prefix, type SeriesName } from '#data/stories'
import AssetImage from '#components/AssetImage'
import { fetchApi } from '#utils/fetchApi'
import storiesData from '#data/videos/stories.data'
Expand All @@ -18,17 +18,7 @@ type PropType = {

function getBackendStoryId(props: PropType): string {
const { series, season, chapter } = props
const Prefix: Record<SeriesName, string> = {
Hoshimi: 'st-original-cmn-01',
Tokyo: 'st-main-cmn-01',
Big4: 'st-main-cmn-02',
TRINITYAiLE: 'st-group-tri-01',
LizNoir: 'st-group-liz-01',
Mana: 'st-group-mna-01',
ThreeX: 'st-group-thrx-01',
Tsuki: 'st-group-moon-01',
Sunny: 'st-group-sun-01',
}

return [
Prefix[series],
String(season).padStart(2, '0'),
Expand Down
24 changes: 24 additions & 0 deletions data/stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/**
* To add a story series, please add:
*
* * `Series` below
* * `Episodes` below
* * `Prefix` below
*/

export const Series = [
'Hoshimi',
'Tokyo',
'Big4',
'Stellar',
'TRINITYAiLE',
'LizNoir',
'Mana',
Expand All @@ -19,6 +28,8 @@ export const Episodes: Record<SeriesName, number[]> = {
Tokyo: [25, 44], // FIN
// adv_main_03_
Big4: [66], // FIN
// adv_main_04_
Stellar: [5],
// adv_group_tri_
TRINITYAiLE: [30], // FIN
// adv_group_liz_
Expand All @@ -32,3 +43,16 @@ export const Episodes: Record<SeriesName, number[]> = {
// adv_group_sun
Sunny: [5, 5, 5],
}

export const Prefix: Record<SeriesName, string> = {
Hoshimi: 'st-original-cmn-01',
Tokyo: 'st-main-cmn-01',
Big4: 'st-main-cmn-02',
Stellar: 'st-main-cmn-03',
TRINITYAiLE: 'st-group-tri-01',
LizNoir: 'st-group-liz-01',
Mana: 'st-group-mna-01',
ThreeX: 'st-group-thrx-01',
Tsuki: 'st-group-moon-01',
Sunny: 'st-group-sun-01',
}
1 change: 1 addition & 0 deletions locales/zh-Hans/stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"series": {
"Hoshimi": "星见编",
"Tokyo": "东京编",
"Stellar": "星空编",
"Big4": "BIG4编",
"TRINITYAiLE": "TRINITYAiLE",
"LizNoir": "LizNoir",
Expand Down

0 comments on commit 25f7f6d

Please sign in to comment.