show more user-friendly messages when some features are disabled

This commit is contained in:
MaysWind
2025-12-12 13:17:34 +08:00
parent 89dd306bb4
commit 1eb958a21b
21 changed files with 219 additions and 3 deletions
@@ -63,6 +63,7 @@ import type { Router } from 'framework7/types';
import { useI18n } from '@/locales/helpers.ts';
import { useI18nUIComponents, showLoading, hideLoading } from '@/lib/ui/mobile.ts';
import { KnownErrorCode } from '@/consts/api.ts';
import { useTwoFactorAuthStore } from '@/stores/twoFactorAuth.ts';
const props = defineProps<{
@@ -100,6 +101,10 @@ function init(): void {
loading.value = false;
}).catch(error => {
if (error.processed) {
status.value = null;
loading.value = false;
} else if (error.error && error.error.errorCode === KnownErrorCode.ApiNotFound) {
status.value = null;
loading.value = false;
} else {
loadingError.value = error;