Feature(custom): optimize theme download logic

This commit is contained in:
Kuingsmile
2026-01-15 11:18:40 +08:00
parent 5169f00254
commit f7667b5ff6
3 changed files with 9 additions and 5 deletions

View File

@@ -2142,7 +2142,10 @@ async function loadThemes() {
async function handleDownloadThemes() {
try {
downloadingThemes.value = true
await window.electron.triggerRPC(IRPCActionType.THEME_FETCH_THEMES)
const result = await window.electron.triggerRPC(IRPCActionType.THEME_FETCH_THEMES)
if (!result) {
throw new Error('No themes were downloaded.')
}
message.success(t('pages.settings.system.downloadThemesSuccess'))
await loadThemes()
} catch (error) {