From 85302c611aadda0b9084f177b962ea2a0472dc30 Mon Sep 17 00:00:00 2001 From: alger Date: Sat, 20 Dec 2025 02:30:09 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BC=98=E5=8C=96=E9=9F=B3?= =?UTF-8?q?=E6=BA=90=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en-US/settings.ts | 27 + src/i18n/lang/zh-CN/settings.ts | 27 + .../components/common/ResponsiveModal.vue | 147 +++ .../settings/MusicSourceSettings.vue | 853 +++++++----------- 4 files changed, 547 insertions(+), 507 deletions(-) create mode 100644 src/renderer/components/common/ResponsiveModal.vue diff --git a/src/i18n/lang/en-US/settings.ts b/src/i18n/lang/en-US/settings.ts index 94b5a61..7d190c9 100644 --- a/src/i18n/lang/en-US/settings.ts +++ b/src/i18n/lang/en-US/settings.ts @@ -119,6 +119,33 @@ export default { imported: 'Custom Source Imported', notImported: 'Not Imported' } + }, + lxMusic: { + tabs: { + sources: 'Source Selection', + lxMusic: 'LX Music', + customApi: 'Custom API' + }, + scripts: { + title: 'Imported Scripts', + importLocal: 'Import Local', + importOnline: 'Import Online', + urlPlaceholder: 'Enter LX Music Script URL', + importBtn: 'Import', + empty: 'No imported LX Music scripts', + notConfigured: 'Not configured (Configure in LX Music Tab)', + importHint: 'Import compatible custom API plugins to extend sources', + noScriptWarning: 'Please import LX Music script first', + noSelectionWarning: 'Please select an LX Music source first', + notFound: 'Source not found', + switched: 'Switched to source: {name}', + deleted: 'Deleted source: {name}', + enterUrl: 'Please enter script URL', + invalidUrl: 'Invalid URL format', + invalidScript: 'Invalid LX Music script, globalThis.lx code not found', + nameRequired: 'Name cannot be empty', + renameSuccess: 'Rename successful' + } } }, application: { diff --git a/src/i18n/lang/zh-CN/settings.ts b/src/i18n/lang/zh-CN/settings.ts index 8c31947..2c7e179 100644 --- a/src/i18n/lang/zh-CN/settings.ts +++ b/src/i18n/lang/zh-CN/settings.ts @@ -116,6 +116,33 @@ export default { imported: '已导入自定义音源', notImported: '未导入' } + }, + lxMusic: { + tabs: { + sources: '音源选择', + lxMusic: '落雪音源', + customApi: '自定义API' + }, + scripts: { + title: '已导入的音源脚本', + importLocal: '本地导入', + importOnline: '在线导入', + urlPlaceholder: '输入落雪音源脚本 URL', + importBtn: '导入', + empty: '暂无已导入的落雪音源', + notConfigured: '未配置 (请去落雪音源Tab配置)', + importHint: '导入兼容的自定义 API 插件以扩展音源', + noScriptWarning: '请先导入落雪音源脚本', + noSelectionWarning: '请先选择一个落雪音源', + notFound: '音源不存在', + switched: '已切换到音源: {name}', + deleted: '已删除音源: {name}', + enterUrl: '请输入脚本 URL', + invalidUrl: '无效的 URL 格式', + invalidScript: '无效的落雪音源脚本,未找到 globalThis.lx 相关代码', + nameRequired: '名称不能为空', + renameSuccess: '重命名成功' + } } }, application: { diff --git a/src/renderer/components/common/ResponsiveModal.vue b/src/renderer/components/common/ResponsiveModal.vue new file mode 100644 index 0000000..96a4443 --- /dev/null +++ b/src/renderer/components/common/ResponsiveModal.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/renderer/components/settings/MusicSourceSettings.vue b/src/renderer/components/settings/MusicSourceSettings.vue index d9d937d..3791c01 100644 --- a/src/renderer/components/settings/MusicSourceSettings.vue +++ b/src/renderer/components/settings/MusicSourceSettings.vue @@ -1,253 +1,317 @@ -