From a4034b6b783642e13c1e6a739ff0c9c4758c55e0 Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 21 Dec 2025 01:11:53 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=B5=E7=A7=B0=E5=92=8C=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E6=9E=84=E7=9B=B8=E5=85=B3=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=92=8C=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 7 + components.d.ts | 4 - package.json | 1 + pnpm-lock.yaml | 10 ++ src/App.vue | 17 +- src/api/types.ts | 4 +- src/auth/index.ts | 14 ++ src/composables/beforeApp.ts | 12 ++ src/composables/useAuth.ts | 25 ++- src/main.ts | 6 +- src/router/index.ts | 20 ++- src/store/index.ts | 1 + src/store/user.ts | 25 +++ src/utils/pattern.ts | 2 + src/views/auth/login/components/email.vue | 17 +- src/views/auth/login/index.vue | 2 +- src/views/user-settings/email.vue | 181 ++++++++++++++++++++ src/views/user-settings/index.vue | 155 ++++++++++++++++++ src/views/user-settings/nickname.vue | 71 ++++++++ src/views/user-settings/outlet.vue | 9 + src/views/user-settings/username.vue | 71 ++++++++ src/views/user/settings.vue | 191 ---------------------- 22 files changed, 620 insertions(+), 225 deletions(-) create mode 100644 src/composables/beforeApp.ts create mode 100644 src/store/user.ts create mode 100644 src/views/user-settings/email.vue create mode 100644 src/views/user-settings/index.vue create mode 100644 src/views/user-settings/nickname.vue create mode 100644 src/views/user-settings/outlet.vue create mode 100644 src/views/user-settings/username.vue delete mode 100644 src/views/user/settings.vue diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 3148e71..50b4ee1 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -10,6 +10,7 @@ declare global { const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate const asyncComputed: typeof import('@vueuse/core').asyncComputed const autoResetRef: typeof import('@vueuse/core').autoResetRef + const beforeApp: typeof import('./src/composables/beforeApp').beforeApp const clearExpiredCaches: typeof import('./src/composables/useStorageCache').clearExpiredCaches const computed: typeof import('vue').computed const computedAsync: typeof import('@vueuse/core').computedAsync @@ -304,6 +305,7 @@ declare global { const useTransition: typeof import('@vueuse/core').useTransition const useUrlSearchParams: typeof import('@vueuse/core').useUrlSearchParams const useUserMedia: typeof import('@vueuse/core').useUserMedia + const useUserStore: typeof import('./src/store/user').useUserStore const useVModel: typeof import('@vueuse/core').useVModel const useVModels: typeof import('@vueuse/core').useVModels const useVibrate: typeof import('@vueuse/core').useVibrate @@ -317,6 +319,8 @@ declare global { const useWindowFocus: typeof import('@vueuse/core').useWindowFocus const useWindowScroll: typeof import('@vueuse/core').useWindowScroll const useWindowSize: typeof import('@vueuse/core').useWindowSize + const userStore: typeof import('./src/store/user').userStore + const usernamePattern: typeof import('./src/utils/pattern').usernamePattern const watch: typeof import('vue').watch const watchArray: typeof import('@vueuse/core').watchArray const watchAtMost: typeof import('@vueuse/core').watchAtMost @@ -368,6 +372,7 @@ declare module 'vue' { readonly acceptHMRUpdate: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef + readonly beforeApp: UnwrapRef readonly clearExpiredCaches: UnwrapRef readonly computed: UnwrapRef readonly computedAsync: UnwrapRef @@ -660,6 +665,7 @@ declare module 'vue' { readonly useTransition: UnwrapRef readonly useUrlSearchParams: UnwrapRef readonly useUserMedia: UnwrapRef + readonly useUserStore: UnwrapRef readonly useVModel: UnwrapRef readonly useVModels: UnwrapRef readonly useVibrate: UnwrapRef @@ -673,6 +679,7 @@ declare module 'vue' { readonly useWindowFocus: UnwrapRef readonly useWindowScroll: UnwrapRef readonly useWindowSize: UnwrapRef + readonly usernamePattern: UnwrapRef readonly watch: UnwrapRef readonly watchArray: UnwrapRef readonly watchAtMost: UnwrapRef diff --git a/components.d.ts b/components.d.ts index 4755a1e..521da65 100644 --- a/components.d.ts +++ b/components.d.ts @@ -31,8 +31,6 @@ declare module 'vue' { IonInfiniteScroll: typeof import('@ionic/vue')['IonInfiniteScroll'] IonInfiniteScrollContent: typeof import('@ionic/vue')['IonInfiniteScrollContent'] IonInput: typeof import('@ionic/vue')['IonInput'] - IonInputOtp: typeof import('@ionic/vue')['IonInputOtp'] - IonInputPasswordToggle: typeof import('@ionic/vue')['IonInputPasswordToggle'] IonItem: typeof import('@ionic/vue')['IonItem'] IonLabel: typeof import('@ionic/vue')['IonLabel'] IonList: typeof import('@ionic/vue')['IonList'] @@ -94,8 +92,6 @@ declare global { const IonInfiniteScroll: typeof import('@ionic/vue')['IonInfiniteScroll'] const IonInfiniteScrollContent: typeof import('@ionic/vue')['IonInfiniteScrollContent'] const IonInput: typeof import('@ionic/vue')['IonInput'] - const IonInputOtp: typeof import('@ionic/vue')['IonInputOtp'] - const IonInputPasswordToggle: typeof import('@ionic/vue')['IonInputPasswordToggle'] const IonItem: typeof import('@ionic/vue')['IonItem'] const IonLabel: typeof import('@ionic/vue')['IonLabel'] const IonList: typeof import('@ionic/vue')['IonList'] diff --git a/package.json b/package.json index 83bb361..9de5644 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "@iconify-json/cryptocurrency-color": "^1.2.4", "@iconify-json/ic": "^1.2.4", "@iconify-json/material-icon-theme": "^1.2.44", + "@iconify-json/tdesign": "^1.2.11", "@iconify/vue": "^5.0.0", "@ionic/cli": "^7.2.1", "@types/lodash-es": "^4.17.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b10af1..1b3eb5c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -114,6 +114,9 @@ importers: '@iconify-json/material-icon-theme': specifier: ^1.2.44 version: 1.2.44 + '@iconify-json/tdesign': + specifier: ^1.2.11 + version: 1.2.11 '@iconify/vue': specifier: ^5.0.0 version: 5.0.0(vue@3.5.25(typescript@5.9.3)) @@ -1160,6 +1163,9 @@ packages: '@iconify-json/material-icon-theme@1.2.44': resolution: {integrity: sha512-fw6hluIUX2rudZucEBevvKHHnR7GQOyjHHXUXRJsv8KmdHqxsV7JPPUlNnVO/eAELuXjM+UgtuAeRE9WlCPHog==} + '@iconify-json/tdesign@1.2.11': + resolution: {integrity: sha512-bhIDvRGFve+n8Q06PHeviW5X9pRpXzc/STus+Eq7A6HusaAYPzoti/Bp92Wzq/y6ZLe3Z5LC+6YbUMR1Jerg6Q==} + '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -6108,6 +6114,10 @@ snapshots: dependencies: '@iconify/types': 2.0.0 + '@iconify-json/tdesign@1.2.11': + dependencies: + '@iconify/types': 2.0.0 + '@iconify/types@2.0.0': {} '@iconify/utils@3.1.0': diff --git a/src/App.vue b/src/App.vue index 783809a..caa926b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,12 +1,19 @@