Skip to content

Commit f845b87

Browse files
committed
Merge branch 'dev' into feat/tauri-integration
2 parents 02d4ecb + d9d5636 commit f845b87

File tree

31 files changed

+308
-148
lines changed

31 files changed

+308
-148
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<img src="./icons/normal/brand.svg" width="80px" />
1+
<img src="./favicons/normal/brand.svg" width="80px" />
22

33
# AMLL Editor
44

5-
[![Version](https://img.shields.io/github/package-json/v/Linho1219/AMLL-Editor?label=Version)](https://github.com/Linho1219/AMLL-Editor/releases)
6-
[![Vite Version](https://img.shields.io/github/package-json/dependency-version/Linho1219/AMLL-Editor/dev/vite?label=Vite&color=646CFF&logo=vite&logoColor=white)](https://vite.dev/)
7-
[![Vue Version](https://img.shields.io/github/package-json/dependency-version/Linho1219/AMLL-Editor/vue?label=Vue&color=4FC08D&logo=vuedotjs&logoColor=white)](https://vuejs.org/)
8-
[![PrimeVue Version](https://img.shields.io/github/package-json/dependency-version/Linho1219/AMLL-Editor/primevue?label=PrimeVue&color=41B883&logo=primevue&logoColor=white)](https://primevue.org/)
9-
[![AMLL Core Version](https://img.shields.io/github/package-json/dependency-version/Linho1219/AMLL-Editor/%40applemusic-like-lyrics%2Fcore?label=AMLL%20Core&color=FA243C&logo=applemusic&logoColor=white)](https://amll.dev)
5+
[![Version](https://img.shields.io/github/package-json/v/amll-dev/amll-editor?label=Version)](https://github.com/amll-dev/amll-editor/releases)
6+
[![Vite Version](https://img.shields.io/github/package-json/dependency-version/amll-dev/amll-editor/dev/vite?label=Vite&color=646CFF&logo=vite&logoColor=white)](https://vite.dev/)
7+
[![Vue Version](https://img.shields.io/github/package-json/dependency-version/amll-dev/amll-editor/vue?label=Vue&color=4FC08D&logo=vuedotjs&logoColor=white)](https://vuejs.org/)
8+
[![PrimeVue Version](https://img.shields.io/github/package-json/dependency-version/amll-dev/amll-editor/primevue?label=PrimeVue&color=41B883&logo=primevue&logoColor=white)](https://primevue.org/)
9+
[![AMLL Core Version](https://img.shields.io/github/package-json/dependency-version/amll-dev/amll-editor/%40applemusic-like-lyrics%2Fcore?label=AMLL%20Core&color=FA243C&logo=applemusic&logoColor=white)](https://amll.dev)
1010
[![Cloudflare Pages: STABLE](https://img.shields.io/website?url=https%3A%2F%2Feditor.amll.dev%2F&logo=cloudflare&logoColor=white&label=Pages%2fSTABLE)](https://editor.amll.dev/)
1111
[![Cloudflare Pages: BETA](https://img.shields.io/website?url=https%3A%2F%2Fbeta-editor.amll.dev%2F&logo=cloudflare&logoColor=white&label=Pages%2fBETA)](https://beta-editor.amll.dev/)
12-
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Linho1219/AMLL-Editor)
12+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/amll-dev/amll-editor)
1313

1414
基于 Vue 的开源逐音节歌词编辑器。
15-
目标成为 [AMLL TTML Tool](https://github.com/Steve-xmh/amll-ttml-tool) 的继任者,可与 [AMLL](https://github.com/Steve-xmh/applemusic-like-lyrics) 生态协作。
15+
目标成为 [AMLL TTML Tool](https://github.com/amll-dev/amll-ttml-tool) 的继任者,可与 [AMLL](https://github.com/amll-dev/applemusic-like-lyrics) 生态协作。
1616

1717
暂处于早期开发阶段。
1818

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"engines": {
99
"node": "^20.19.0 || >=22.12.0"
1010
},
11-
"repository": "https://github.com/Linho1219/AMLL-Editor",
11+
"repository": "https://github.com/amll-dev/amll-editor",
1212
"scripts": {
1313
"dev": "vite",
1414
"build": "run-p type-check \"build-only {@}\" --",

src/core/convert/formats/ttmlParse.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { str2ms as nullableStr2ms } from '@utils/formatTime'
77
import type { Maybe } from '@utils/types'
88

99
// Frontend TTML parser, following AMLL TTML Lyric Format
10-
// Derived from: https://github.com/Steve-xmh/amll-ttml-tool , Licensed under GPLv3
10+
// Derived from: https://github.com/amll-dev/amll-ttml-tool , Licensed under GPLv3
1111
// See also https://www.w3.org/TR/2018/REC-ttml1-20181108/
1212

1313
interface RomanWord {
@@ -189,7 +189,11 @@ export function parseTTML(ttmlText: string): Persist {
189189
duet = false,
190190
parentItunesKey: string | null = null,
191191
) {
192-
if (background) duet = lineEl.getAttribute('ttm:agent') !== mainAgentId
192+
if (!background) {
193+
const agentAttr = lineEl.getAttribute('ttm:agent')
194+
duet = agentAttr !== null && agentAttr !== mainAgentId
195+
console.log(agentAttr, mainAgentId, duet)
196+
}
193197

194198
const startTime = str2ms(lineEl.getAttribute('begin'))
195199
const endTime = str2ms(lineEl.getAttribute('end'))

src/core/convert/formats/ttmlStringify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { LyricLine, LyricSyllable, Persist } from '@core/types'
33
import { ms2str } from '@utils/formatTime'
44

55
// Frontend TTML stringifier, following AMLL TTML Lyric Format
6-
// Derived from: https://github.com/Steve-xmh/amll-ttml-tool , Licensed under GPLv3
6+
// Derived from: https://github.com/amll-dev/amll-ttml-tool , Licensed under GPLv3
77
// See also https://www.w3.org/TR/2018/REC-ttml1-20181108/
88

99
export function stringifyTTML(ttmlLyric: Persist): string {

src/core/file/project/dataVer/0_1.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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
*/
1316
export 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

src/core/file/project/parse.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import JSZip from 'jszip'
22

3-
import type { Persist } from '@core/types'
3+
import type { LyricLine, Persist } from '@core/types'
44

55
import type { ProjPayload } from '.'
66
import {
@@ -53,8 +53,9 @@ export async function parseProjectFile(file: Blob): Promise<ProjPayload> {
5353
function 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,

src/core/hotkey/schema.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const hotkeyCommandList = [
3333
'breakLine',
3434
'duet',
3535
'background',
36+
'connectNextLine',
3637

3738
'goPrevLine',
3839
'goPrevSyl',
@@ -87,6 +88,7 @@ export const getDefaultHotkeyMap = () =>
8788
replace: [k(Ctrl, 'h'), k(Ctrl, Shift, 'f')],
8889
delete: k('Delete'),
8990
bookmark: k(Ctrl, 'd'),
91+
connectNextLine: k(Ctrl, 'g'),
9092
preferences: k(Ctrl, 'Comma'),
9193
chooseMedia: k(Ctrl, 'm'),
9294
metadata: k(Ctrl, 'i'),

src/core/pref/schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export interface PreferenceSchema {
1717
globalLatencyMs: number
1818
alwaysIgnoreBackground: boolean
1919
hideLineTiming: boolean
20-
autoConnectLineTimes: boolean
21-
autoConnectThresholdMs: number
20+
// autoConnectLineTimes: boolean
21+
// autoConnectThresholdMs: number
2222
// Roman
2323
sylRomanEnabled: boolean
2424
swapTranslateRoman: boolean
@@ -40,8 +40,8 @@ export const getDefaultPref = (): PreferenceSchema => ({
4040
globalLatencyMs: 0,
4141
alwaysIgnoreBackground: false,
4242
hideLineTiming: false,
43-
autoConnectLineTimes: false,
44-
autoConnectThresholdMs: 100,
43+
// autoConnectLineTimes: false,
44+
// autoConnectThresholdMs: 100,
4545
sylRomanEnabled: false,
4646
swapTranslateRoman: false,
4747
notifyCompatIssuesOnStartup: true,

src/core/types/core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export interface LyricLine {
2525
ignoreInTiming: boolean
2626
/** 已添加书签 */
2727
bookmarked: boolean
28+
/** 结束时间延长到下一行的开始时间 */
29+
connectNext: boolean
2830
}
2931

3032
/** 单词 */

src/i18n/en/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const consoleArt = `
1010
1111
Welcome to AMLL Editor!
1212
13-
Project URL: https://github.com/Linho1219/AMLL-Editor
13+
Project URL: https://github.com/amll-dev/amll-editor
1414
Licensed under AGPLv3 only
1515
1616
Related projects: AMLL Homepage https://amll.dev/
@@ -70,6 +70,9 @@ const en = {
7070
generateRomanFromSyl: 'Generate from syllable romanization',
7171
startTime: 'Line start time',
7272
endTime: 'Line end time',
73+
endTimeClickToConnect: 'Click to toggle connect end time',
74+
endTimeDbClickToEdit: 'Double-click to edit',
75+
connectNext: 'Connect end time to next line',
7376
continueToNextLine: 'Extend end time to next line',
7477
addSyllable: 'Add syllable',
7578
fields: {
@@ -135,6 +138,7 @@ const en = {
135138
duet: 'Duet',
136139
background: 'Background',
137140
ignoreInTiming: 'Ignore in Timing',
141+
connectNext: 'End time to next',
138142
startTime: 'Start',
139143
endTime: 'End',
140144
duration: 'Dur',
@@ -283,10 +287,10 @@ const en = {
283287
alwaysIgnoreBackgroundDesc: 'Always skip background lines in the timeline view',
284288
hideLineTiming: 'Hide line timestamps',
285289
hideLineTimingDesc: 'Automatically generate line timestamps from syllables',
286-
autoConnectLineTimes: 'Auto connect line times',
287-
autoConnectLineTimesDesc: 'Automatically connect timestamps of adjacent lines when close',
288-
autoConnectThresholdMs: 'Auto connect threshold',
289-
autoConnectThresholdMsDesc: 'Maximum allowed gap between lines to auto-connect (ms)',
290+
// autoConnectLineTimes: 'Auto connect line times',
291+
// autoConnectLineTimesDesc: 'Automatically connect timestamps of adjacent lines when close',
292+
// autoConnectThresholdMs: 'Auto connect threshold',
293+
// autoConnectThresholdMsDesc: 'Maximum allowed gap between lines to auto-connect (ms)',
290294
scrollWithPlayback: 'Auto-scroll with playback',
291295
scrollWithPlaybackDesc: 'Timeline view automatically scrolls following playback position',
292296
compatibilityReport: 'Compatibility report',
@@ -560,6 +564,7 @@ const en = {
560564
breakLine: 'Split Line',
561565
duet: 'Toggle Duet Line',
562566
background: 'Toggle Background Line',
567+
connectNextLine: 'Toggle Sibling Line Connection',
563568

564569
goPrevLine: 'Previous Line',
565570
goPrevSyl: 'Previous Syllable',

0 commit comments

Comments
 (0)