Skip to content

Commit

Permalink
Add song
Browse files Browse the repository at this point in the history
  • Loading branch information
igncp committed Jan 7, 2024
1 parent a999ea4 commit c94e72f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 24 deletions.
26 changes: 2 additions & 24 deletions packages/react-ui/src/containers/RecordsSection/RecordsSection.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
import React, { useEffect, useState } from 'react'
import { LanguageDefinition, Record } from 'writing-trainer-core'

import { songs as cantoneseSongs } from '../../languages/cantonese/songs'
import { T_Services } from '../../typings/mainTypes'

import RecordsWrapper from './RecordsWrapper'
import RecordSave, { RecordToSave } from './screens/RecordSave'
import RecordsList from './screens/RecordsList'

const songs = [
{
load: () => import('../../languages/cantonese/songs/kay-tse-saan-lam-dou'),
name: '山林道',
video: 'https://www.youtube.com/watch?v=W4q4XHhDM-c',
},
{
load: () =>
import('../../languages/cantonese/songs/kay-tse-nei-mun-dik-hang-fuk'),
name: '你們的幸福',
video: 'https://www.youtube.com/watch?v=oYgMRIIVX3w',
},
{
load: () => import('../../languages/cantonese/songs/kay-tse-nin-dou-zi-go'),
name: '年度之歌',
video: 'https://www.youtube.com/watch?v=XAobAFsWTy8',
},
].map(song => ({
...song,
artist: 'Kay Tse',
lang: 'cantonese',
}))

export enum RecordsScreen {
Edit = 'edit',
List = 'list',
Expand Down Expand Up @@ -225,7 +203,7 @@ const RecordsSection = ({
onRecordRemove={handleRecordRemove}
onSongLoad={onSongLoad}
records={records}
songs={songs}
songs={cantoneseSongs}
/>
</RecordsWrapper>
)
Expand Down
26 changes: 26 additions & 0 deletions packages/react-ui/src/languages/cantonese/songs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export const songs = [
{
load: () => import('./kay-tse-saan-lam-dou'),
name: '山林道',
video: 'https://www.youtube.com/watch?v=W4q4XHhDM-c',
},
{
load: () => import('./kay-tse-nei-mun-dik-hang-fuk'),
name: '你們的幸福',
video: 'https://www.youtube.com/watch?v=oYgMRIIVX3w',
},
{
load: () => import('./kay-tse-nin-dou-zi-go'),
name: '年度之歌',
video: 'https://www.youtube.com/watch?v=XAobAFsWTy8',
},
{
load: () => import('./kay-tse-zoi-ngo-zau'),
name: '載我走',
video: 'https://www.youtube.com/watch?v=wboL_3_StIA',
},
].map(song => ({
...song,
artist: 'Kay Tse',
lang: 'cantonese',
}))
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export const lyrics = [
'已發動了 連汽笛也呼叫, 時鐘窗框中退出了',
'慢慢往相反方向變淡變小, 上路了 乘這班車遠走了, 囤積工作懶得照料 逃去夭夭',

'望向望向十里外湖水, 感到睏便去睡 彷彿走進太虛',
'覺餓了 踏足餐卡裡, 和窗邊歌德式的古堡茶敘',

'還好有你在 讓我喘息悠閒下來, 就算身處洪流中 安然能無礙',
'你是這段鐵路歷程 無比慷慨, 載我出走一趟 創傷暫時拋開',

'全因有你在 令我不須長留月台, 就算三軍臨城中 車門仍敞開',
'一起走稍稍作歇息 鄉郊中望海, 遺下兵荒都市 繼續競賽',

'太過忙了 人要追每分秒, 無非想找一剎心跳',
'但是太多將輕重錯誤對焦, 抱住了 環抱得到最閃耀, 才知震撼卻得不了 心都不跳',

'是你令我沒有拼命追, 知到最重要是 簡單得似淡水',
'載著我渡窩心之旅, 毋須分分鐘交出驚天壯舉',

'還好有你在 讓我喘息悠閒下來, 就算身處洪流中 安然能無礙',
'你是這段鐵路歷程 無比慷慨, 載我出走一趟 創傷暫時拋開',

'全因有你在 令我不須長留月台, 就算三軍臨城中 車門仍敞開',
'一起走稍稍作歇息 鄉郊中望海, 遺下兵荒都市 繼續競賽',

'沿路風光的美 震撼腦袋',
]

0 comments on commit c94e72f

Please sign in to comment.