|
444 | 444 | /> |
445 | 445 | </n-flex> |
446 | 446 | </n-card> |
447 | | - <!-- <n-card class="set-item"> |
| 447 | + <n-card class="set-item"> |
448 | 448 | <div class="label"> |
449 | 449 | <n-text class="name">显示逐字歌词</n-text> |
450 | 450 | <n-text class="tip" :depth="3">是否显示桌面歌词逐字效果</n-text> |
|
455 | 455 | class="set" |
456 | 456 | @update:value="saveDesktopLyricConfig" |
457 | 457 | /> |
458 | | - </n-card> --> |
| 458 | + </n-card> |
459 | 459 | <n-card class="set-item"> |
460 | 460 | <div class="label"> |
461 | 461 | <n-text class="name">显示翻译</n-text> |
|
549 | 549 | @update:value="saveDesktopLyricConfig" |
550 | 550 | /> |
551 | 551 | </n-card> |
| 552 | + <n-card class="set-item"> |
| 553 | + <div class="label"> |
| 554 | + <n-text class="name">始终展示播放信息</n-text> |
| 555 | + <n-text class="tip" :depth="3">是否始终展示当前歌曲名及歌手</n-text> |
| 556 | + </div> |
| 557 | + <n-switch |
| 558 | + v-model:value="desktopLyricConfig.alwaysShowPlayInfo" |
| 559 | + :round="false" |
| 560 | + class="set" |
| 561 | + @update:value="saveDesktopLyricConfig" |
| 562 | + /> |
| 563 | + </n-card> |
552 | 564 | <n-card class="set-item"> |
553 | 565 | <div class="label"> |
554 | 566 | <n-text class="name">恢复默认配置</n-text> |
@@ -580,7 +592,7 @@ const settingStore = useSettingStore(); |
580 | 592 | const allFontsData = ref<SelectOption[]>([]); |
581 | 593 |
|
582 | 594 | // AMLL TTML DB 地址 |
583 | | -const amllDbServer = ref("https://amll-ttml-db.stevexmh.net"); |
| 595 | +const amllDbServer = ref("https://amll-ttml-db.stevexmh.net/ncm/%s"); |
584 | 596 |
|
585 | 597 | // 桌面歌词配置 |
586 | 598 | const desktopLyricConfig = reactive<LyricConfig>({ ...defaultDesktopLyricConfig }); |
@@ -681,26 +693,27 @@ const changeAMLLDBServer = () => { |
681 | 693 | { depth: 3, type: "warning" }, |
682 | 694 | { default: () => "如果你不清楚这里是做什么的,请不要修改" }, |
683 | 695 | ), |
| 696 | + h(NText, null, { default: () => "请确保地址正确,并且包含 %s( 用于替换歌曲 ID )" }), |
684 | 697 | h(NInput, { |
685 | 698 | value: amllDbServer.value, |
686 | 699 | onUpdateValue: (val) => (amllDbServer.value = val), |
687 | 700 | placeholder: "请输入 AMLL TTML DB 地址", |
688 | 701 | }), |
689 | | - h(NText, { depth: 3 }, { default: () => "请确保地址正确,否则将导致歌词获取失败" }), |
690 | 702 | ], |
691 | 703 | }, |
692 | 704 | ), |
693 | 705 | positiveText: "确认", |
694 | 706 | negativeText: "取消", |
695 | 707 | onPositiveClick: async () => { |
696 | 708 | const urlValue = amllDbServer.value.trim(); |
697 | | - if (isValidURL(urlValue)) { |
| 709 | + // 验证 URL 格式和 %s |
| 710 | + if (isValidURL(urlValue) && urlValue.includes("%s")) { |
698 | 711 | await window.api.store.set("amllDbServer", urlValue); |
699 | 712 | settingStore.amllDbServer = urlValue; |
700 | 713 | window.$message.success("AMLL TTML DB 地址已更新"); |
701 | 714 | return true; |
702 | 715 | } else { |
703 | | - window.$message.error("请输入正确的网址格式"); |
| 716 | + window.$message.error("请输入正确的网址格式,需包含 %s"); |
704 | 717 | return false; |
705 | 718 | } |
706 | 719 | }, |
|
0 commit comments