enhance(frontend): 빌트인 테마를 설치하려고 할 때 오류 메시지 개선

This commit is contained in:
NoriDev 2024-01-11 16:50:25 +09:00
parent 18e92014c7
commit 24ead85f8f
3 changed files with 16 additions and 0 deletions

View file

@ -29,6 +29,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGELOG.md#2023xx) 문서를 참고하십시오.
### Client
- Enhance: 빌트인 테마를 설치하려고 할 때 오류 메시지 개선
- Fix: 장식 추가로 일부 태그를 추가할 수 없음
---

View file

@ -235,6 +235,13 @@ async function fetch() {
};
} catch (err) {
switch (err.message.toLowerCase()) {
case 'builtin theme':
errorKV.value = {
title: i18n.ts._externalResourceInstaller._errors._themeParseFailed.title,
description: i18n.ts._theme.alreadyInstalled,
};
break;
case 'this theme is already installed':
errorKV.value = {
title: i18n.ts._externalResourceInstaller._errors._themeParseFailed.title,

View file

@ -36,7 +36,15 @@ async function install(code: string): Promise<void> {
text: i18n.t('_theme.installed', { name: theme.name }),
});
} catch (err) {
console.log(err.message.toLowerCase());
switch (err.message.toLowerCase()) {
case 'builtin theme':
os.alert({
type: 'info',
text: i18n.ts._theme.alreadyInstalled,
});
break;
case 'this theme is already installed':
os.alert({
type: 'info',