feat: 添加字体配置功能 可配置歌词页面 或全局字体

This commit is contained in:
alger
2025-01-17 22:45:59 +08:00
parent 914e043502
commit 1bdb8fcb4a
13 changed files with 525 additions and 42 deletions
+9 -2
View File
@@ -14,11 +14,18 @@ const api = {
unblockMusic: (id) => ipcRenderer.invoke('unblock-music', id),
// 歌词缓存相关
invoke: (channel: string, ...args: any[]) => {
const validChannels = ['get-cached-lyric', 'cache-lyric', 'clear-lyric-cache'];
const validChannels = [
'get-lyrics',
'clear-lyrics-cache',
'get-system-fonts',
'get-cached-lyric',
'cache-lyric',
'clear-lyric-cache'
];
if (validChannels.includes(channel)) {
return ipcRenderer.invoke(channel, ...args);
}
return Promise.reject(new Error(`Invalid channel: ${channel}`));
return Promise.reject(new Error(`未授权的 IPC 通道: ${channel}`));
}
};