code refactor

This commit is contained in:
MaysWind
2025-01-05 21:39:39 +08:00
parent 49f1f3c86b
commit 6dc0ebcac6
22 changed files with 279 additions and 229 deletions
+3 -2
View File
@@ -119,6 +119,7 @@ import { useSettingsStore } from '@/stores/setting.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
import { ThemeType } from '@/core/theme.ts';
import { isUserVerifyEmailEnabled } from '@/lib/server_settings.ts';
import { isUserLogined } from '@/lib/userstate.ts';
import {
mdiChevronLeft
@@ -183,7 +184,7 @@ export default {
self.rootStore.verifyEmail({
token: self.token,
requestNewToken: !self.$user.isUserLogined()
requestNewToken: !isUserLogined()
}).then(() => {
self.loading = false;
self.verified = true;
@@ -219,7 +220,7 @@ export default {
});
},
onSnackbarShowStateChanged(newValue) {
if (!newValue && this.verified && this.$user.isUserLogined()) {
if (!newValue && this.verified && isUserLogined()) {
this.$router.replace('/');
}
},