File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,13 @@ import type { ProjDataTill_0_0 } from './0_0'
55/**
66 * Data version 0.1
77 *
8- * CHANELOG (v0.0 -> v0.1):
8+ * CHANGELOG (v0.0 -> v0.1):
99 * - Rename "words" to "syllables"
1010 * - Rename "lyricLines" to "lines"
1111 * - Remove "currentplaceholdingBeat" from syllables
12+ *
13+ * CHANGELOG (v0.1 -> v0.1.1):
14+ * - Add "connectNext" to lines
1215 */
1316export interface ProjData_0_1 {
1417 dataVersion : 'ALDv0.1'
@@ -33,6 +36,7 @@ export interface ProjData_0_1 {
3336 } [ ]
3437 ignoreInTiming : boolean
3538 bookmarked : boolean
39+ connectNext ?: boolean
3640 } [ ]
3741}
3842
Original file line number Diff line number Diff line change 11import JSZip from 'jszip'
22
3- import type { Persist } from '@core/types'
3+ import type { LyricLine , Persist } from '@core/types'
44
55import type { ProjPayload } from '.'
66import {
@@ -53,8 +53,9 @@ export async function parseProjectFile(file: Blob): Promise<ProjPayload> {
5353function parseProjectData ( data : SupportedProjData ) : Persist {
5454 const latestData = migrateToLatestProjData ( data )
5555 const { metadata } = latestData
56- const persistLines = latestData . lines . map ( ( line ) => ( {
56+ const persistLines : LyricLine [ ] = latestData . lines . map ( ( line ) => ( {
5757 ...line ,
58+ connectNext : line . connectNext ?? false ,
5859 syllables : line . syllables . map ( ( syllable ) => ( {
5960 ...syllable ,
6061 currentplaceholdingBeat : 0 ,
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export interface LyricLine {
2525 ignoreInTiming : boolean
2626 /** 已添加书签 */
2727 bookmarked : boolean
28+ /** 结束时间延长到下一行的开始时间 */
29+ connectNext : boolean
2830}
2931
3032/** 单词 */
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const newLine = (attrs: Partial<LyricLine> = {}) =>
1919 romanization : '' ,
2020 background : false ,
2121 duet : false ,
22+ connectNext : false ,
2223 ...attrs ,
2324 id : nanoid ( ) ,
2425 } )
You can’t perform that action at this time.
0 commit comments