|
119 | 119 | </n-input-number> |
120 | 120 | </n-flex> |
121 | 121 | </n-card> |
| 122 | + <n-card class="set-item"> |
| 123 | + <div class="label"> |
| 124 | + <n-text class="name">歌词区域字体</n-text> |
| 125 | + <n-text class="tip" :depth="3"> 是否独立更改歌词区域字体 </n-text> |
| 126 | + </div> |
| 127 | + <n-flex> |
| 128 | + <Transition name="fade" mode="out-in"> |
| 129 | + <n-button |
| 130 | + v-if="settingStore.LyricFont !== 'follow'" |
| 131 | + type="primary" |
| 132 | + strong |
| 133 | + secondary |
| 134 | + @click="settingStore.LyricFont = 'follow'" |
| 135 | + > |
| 136 | + 恢复默认 |
| 137 | + </n-button> |
| 138 | + </Transition> |
| 139 | + <n-select |
| 140 | + v-model:value="settingStore.LyricFont" |
| 141 | + :options="[ |
| 142 | + { label: '跟随全局', value: 'follow' }, |
| 143 | + ...allFontsData.filter((v) => v.value !== 'default'), |
| 144 | + ]" |
| 145 | + class="set" |
| 146 | + filterable |
| 147 | + /> |
| 148 | + </n-flex> |
| 149 | + </n-card> |
| 150 | + <n-collapse-transition :show="settingStore.LyricFont !== 'follow'"> |
| 151 | + <n-card v-for="item in languageFontSettings" :key="item.key" class="set-item"> |
| 152 | + <div class="label"> |
| 153 | + <n-text class="name">{{ item.name }}歌词字体</n-text> |
| 154 | + <n-text class="tip" :depth="3"> {{ item.tip }} </n-text> |
| 155 | + </div> |
| 156 | + <n-flex> |
| 157 | + <Transition name="fade" mode="out-in"> |
| 158 | + <n-button |
| 159 | + v-if="settingStore[item.key] !== 'follow'" |
| 160 | + type="primary" |
| 161 | + strong |
| 162 | + secondary |
| 163 | + @click="settingStore[item.key] = 'follow'" |
| 164 | + > |
| 165 | + 恢复默认 |
| 166 | + </n-button> |
| 167 | + </Transition> |
| 168 | + <n-select |
| 169 | + v-model:value="settingStore[item.key]" |
| 170 | + :options="[ |
| 171 | + { label: '跟随全局', value: 'follow' }, |
| 172 | + ...allFontsData.filter((v) => v.value !== 'default'), |
| 173 | + ]" |
| 174 | + class="set" |
| 175 | + filterable |
| 176 | + /> |
| 177 | + </n-flex> |
| 178 | + </n-card> |
| 179 | + </n-collapse-transition> |
122 | 180 | <n-card class="set-item"> |
123 | 181 | <div class="label"> |
124 | 182 | <n-text class="name">歌词字体加粗</n-text> |
@@ -649,6 +707,25 @@ const restoreDesktopLyricConfig = () => { |
649 | 707 | } |
650 | 708 | }; |
651 | 709 |
|
| 710 | +// 语言字体配置 |
| 711 | +const languageFontSettings = [ |
| 712 | + { |
| 713 | + name: "英语", |
| 714 | + key: "englishLyricFont" as const, |
| 715 | + tip: "是否在歌词为英语时单独设置字体", |
| 716 | + }, |
| 717 | + { |
| 718 | + name: "日语", |
| 719 | + key: "japaneseLyricFont" as const, |
| 720 | + tip: "是否在歌词为日语时单独设置字体", |
| 721 | + }, |
| 722 | + { |
| 723 | + name: "韩语", |
| 724 | + key: "koreanLyricFont" as const, |
| 725 | + tip: "是否在歌词为韩语时单独设置字体", |
| 726 | + }, |
| 727 | +]; |
| 728 | +
|
652 | 729 | // 获取全部系统字体 |
653 | 730 | const getAllSystemFonts = async () => { |
654 | 731 | const allFonts = await window.electron.ipcRenderer.invoke("get-all-fonts"); |
|
0 commit comments