diff --git a/.eslintignore b/.eslintignore index 6a3bf2b..4d9c079 100644 --- a/.eslintignore +++ b/.eslintignore @@ -9,4 +9,5 @@ index.html src/assets .eslintrc.cjs **/config -commitlint.config.cjs \ No newline at end of file +commitlint.config.cjs +auto-imports.d.ts \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 7c2ed9e..fa48cdf 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,4 +4,5 @@ /node_modules/** **/*.svg **/*.sh -/public/* \ No newline at end of file +/public/* +auto-imports.d.ts \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e4171..4455f3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,38 +1,3 @@ - - -## [2.5.0](https://github.com/HuLaSpark/HuLa/compare/v2.4.0...v2.5.0) (2024-10-27) - - -### ⚠ BREAKING CHANGES - -* **util:** http请求异常bug - -### ✨ Features | 新功能 - -* **layout:** :sparkles: 自动更新增加进度条 ([4ee3e2b](https://github.com/HuLaSpark/HuLa/commit/4ee3e2b8a36b34cdc996a8b538bddea61bbf1af2)) - - -### 🐛 Bug Fixes | Bug 修复 - -* **api:** 修改websocket请求地址, 修改请求方式采用fetch处理 ([e55f863](https://github.com/HuLaSpark/HuLa/commit/e55f86385fb8e25e826ae57341e0d818f5fe34b2)) -* **layout:** :bug: 修复更新进度条显示异常bug ([45e2bfc](https://github.com/HuLaSpark/HuLa/commit/45e2bfce669c76cbb72be641febf59509b3e6204)) -* **service:** :bug: 修复请求体包裹多层data的问题 ([d97d24f](https://github.com/HuLaSpark/HuLa/commit/d97d24f1c1d554e5477b221c725e45100655c0e0)) -* **util:** :bug: http请求异常bug ([6e82a09](https://github.com/HuLaSpark/HuLa/commit/6e82a099a2a51ea08548c4d5da496393a94b7b05)) -* **view:** :bug: 修复点击右侧布局页面时候不跳转回消息页 ([be0edf9](https://github.com/HuLaSpark/HuLa/commit/be0edf974778b58fe5af9ec030d9927999a6d7bb)) - -## [2.5.0](https://github.com/HuLaSpark/HuLa/compare/v2.4.5...v2.5.0) (2024-10-27) - - -### ✨ Features | 新功能 - -* **layout:** :sparkles: 自动更新增加进度条 ([6b781a4](https://github.com/HuLaSpark/HuLa/commit/6b781a419417bda256c90a4013bfec0559242e23)) - -## [2.4.5](https://github.com/HuLaSpark/HuLa/compare/v2.4.4...v2.4.5) (2024-10-26) - -## [2.4.4](https://github.com/HuLaSpark/HuLa/compare/v2.4.3...v2.4.4) (2024-10-26) - -## [2.4.3](https://github.com/HuLaSpark/HuLa/compare/v2.4.2...v2.4.3) (2024-10-26) - ## [2.4.0](https://github.com/HuLaSpark/HuLa/compare/v2.3.0...v2.4.0) (2024-10-24) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 5b8efe2..4a97824 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "productName": "HuLa", - "version": "2.5.0", + "version": "2.4.0", "identifier": "com.tauri.build", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json index dc69203..799049c 100644 --- a/src-tauri/tauri.macos.conf.json +++ b/src-tauri/tauri.macos.conf.json @@ -1,6 +1,6 @@ { "productName": "HuLa", - "version": "2.5.0", + "version": "2.4.0", "identifier": "com.tauri.build", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src-tauri/tauri.windows.conf.json b/src-tauri/tauri.windows.conf.json index b583a38..4e3a243 100644 --- a/src-tauri/tauri.windows.conf.json +++ b/src-tauri/tauri.windows.conf.json @@ -1,6 +1,6 @@ { "productName": "HuLa", - "version": "2.5.0", + "version": "2.4.0", "identifier": "com.tauri.build", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src/layout/left/components/InfoPopover.vue b/src/layout/left/components/InfoPopover.vue index 0a56f24..e348a16 100644 --- a/src/layout/left/components/InfoPopover.vue +++ b/src/layout/left/components/InfoPopover.vue @@ -115,7 +115,7 @@ onMounted(() => { }) /** 获取用户信息 */ apis.getUserInfo().then((res) => { - editInfo.value.content = res + editInfo.value.content = res as any }) }) }) diff --git a/src/layout/left/hook.ts b/src/layout/left/hook.ts index 1c4fbf2..904f0e1 100644 --- a/src/layout/left/hook.ts +++ b/src/layout/left/hook.ts @@ -41,11 +41,11 @@ export const leftHook = () => { // TODO 这里考虑是否查接口查实时的用户信息还是直接查本地存储的用户信息 (nyh -> 2024-05-05 01:12:36) const editInfo = ref<{ show: boolean - content: Partial + content: UserInfoType badgeList: BadgeType[] }>({ show: false, - content: {}, + content: {} as UserInfoType, badgeList: [] }) /** 当前用户佩戴的徽章 */ @@ -142,7 +142,7 @@ export const leftHook = () => { window.$message.success('佩戴成功') /** 获取用户信息 */ apis.getUserInfo().then((res) => { - editInfo.value.content = res + editInfo.value.content = res as any }) } } diff --git a/src/typings/auto-imports.d.ts b/src/typings/auto-imports.d.ts index e862842..e1dc052 100644 --- a/src/typings/auto-imports.d.ts +++ b/src/typings/auto-imports.d.ts @@ -5,96 +5,84 @@ // Generated by unplugin-auto-import export {} declare global { - const EffectScope: (typeof import('vue'))['EffectScope'] - const acceptHMRUpdate: (typeof import('pinia'))['acceptHMRUpdate'] - const computed: (typeof import('vue'))['computed'] - const createApp: (typeof import('vue'))['createApp'] - const createPinia: (typeof import('pinia'))['createPinia'] - const customRef: (typeof import('vue'))['customRef'] - const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent'] - const defineComponent: (typeof import('vue'))['defineComponent'] - const defineStore: (typeof import('pinia'))['defineStore'] - const effectScope: (typeof import('vue'))['effectScope'] - const getActivePinia: (typeof import('pinia'))['getActivePinia'] - const getCurrentInstance: (typeof import('vue'))['getCurrentInstance'] - const getCurrentScope: (typeof import('vue'))['getCurrentScope'] - const h: (typeof import('vue'))['h'] - const inject: (typeof import('vue'))['inject'] - const isProxy: (typeof import('vue'))['isProxy'] - const isReactive: (typeof import('vue'))['isReactive'] - const isReadonly: (typeof import('vue'))['isReadonly'] - const isRef: (typeof import('vue'))['isRef'] - const mapActions: (typeof import('pinia'))['mapActions'] - const mapGetters: (typeof import('pinia'))['mapGetters'] - const mapState: (typeof import('pinia'))['mapState'] - const mapStores: (typeof import('pinia'))['mapStores'] - const mapWritableState: (typeof import('pinia'))['mapWritableState'] - const markRaw: (typeof import('vue'))['markRaw'] - const nextTick: (typeof import('vue'))['nextTick'] - const onActivated: (typeof import('vue'))['onActivated'] - const onBeforeMount: (typeof import('vue'))['onBeforeMount'] - const onBeforeRouteLeave: (typeof import('vue-router'))['onBeforeRouteLeave'] - const onBeforeRouteUpdate: (typeof import('vue-router'))['onBeforeRouteUpdate'] - const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount'] - const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate'] - const onDeactivated: (typeof import('vue'))['onDeactivated'] - const onErrorCaptured: (typeof import('vue'))['onErrorCaptured'] - const onMounted: (typeof import('vue'))['onMounted'] - const onRenderTracked: (typeof import('vue'))['onRenderTracked'] - const onRenderTriggered: (typeof import('vue'))['onRenderTriggered'] - const onScopeDispose: (typeof import('vue'))['onScopeDispose'] - const onServerPrefetch: (typeof import('vue'))['onServerPrefetch'] - const onUnmounted: (typeof import('vue'))['onUnmounted'] - const onUpdated: (typeof import('vue'))['onUpdated'] - const provide: (typeof import('vue'))['provide'] - const reactive: (typeof import('vue'))['reactive'] - const readonly: (typeof import('vue'))['readonly'] - const ref: (typeof import('vue'))['ref'] - const resolveComponent: (typeof import('vue'))['resolveComponent'] - const setActivePinia: (typeof import('pinia'))['setActivePinia'] - const setMapStoreSuffix: (typeof import('pinia'))['setMapStoreSuffix'] - const shallowReactive: (typeof import('vue'))['shallowReactive'] - const shallowReadonly: (typeof import('vue'))['shallowReadonly'] - const shallowRef: (typeof import('vue'))['shallowRef'] - const storeToRefs: (typeof import('pinia'))['storeToRefs'] - const toRaw: (typeof import('vue'))['toRaw'] - const toRef: (typeof import('vue'))['toRef'] - const toRefs: (typeof import('vue'))['toRefs'] - const toValue: (typeof import('vue'))['toValue'] - const triggerRef: (typeof import('vue'))['triggerRef'] - const unref: (typeof import('vue'))['unref'] - const useAttrs: (typeof import('vue'))['useAttrs'] - const useCssModule: (typeof import('vue'))['useCssModule'] - const useCssVars: (typeof import('vue'))['useCssVars'] - const useDialog: (typeof import('naive-ui'))['useDialog'] - const useLink: (typeof import('vue-router'))['useLink'] - const useLoadingBar: (typeof import('naive-ui'))['useLoadingBar'] - const useMessage: (typeof import('naive-ui'))['useMessage'] - const useModal: (typeof import('naive-ui'))['useModal'] - const useNotification: (typeof import('naive-ui'))['useNotification'] - const useRoute: (typeof import('vue-router'))['useRoute'] - const useRouter: (typeof import('vue-router'))['useRouter'] - const useSlots: (typeof import('vue'))['useSlots'] - const watch: (typeof import('vue'))['watch'] - const watchEffect: (typeof import('vue'))['watchEffect'] - const watchPostEffect: (typeof import('vue'))['watchPostEffect'] - const watchSyncEffect: (typeof import('vue'))['watchSyncEffect'] + const EffectScope: typeof import('vue')['EffectScope'] + const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const createPinia: typeof import('pinia')['createPinia'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const defineStore: typeof import('pinia')['defineStore'] + const effectScope: typeof import('vue')['effectScope'] + const getActivePinia: typeof import('pinia')['getActivePinia'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const mapActions: typeof import('pinia')['mapActions'] + const mapGetters: typeof import('pinia')['mapGetters'] + const mapState: typeof import('pinia')['mapState'] + const mapStores: typeof import('pinia')['mapStores'] + const mapWritableState: typeof import('pinia')['mapWritableState'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] + const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const setActivePinia: typeof import('pinia')['setActivePinia'] + const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const storeToRefs: typeof import('pinia')['storeToRefs'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] + const useDialog: typeof import('naive-ui')['useDialog'] + const useLink: typeof import('vue-router')['useLink'] + const useLoadingBar: typeof import('naive-ui')['useLoadingBar'] + const useMessage: typeof import('naive-ui')['useMessage'] + const useModal: typeof import('naive-ui')['useModal'] + const useNotification: typeof import('naive-ui')['useNotification'] + const useRoute: typeof import('vue-router')['useRoute'] + const useRouter: typeof import('vue-router')['useRouter'] + const useSlots: typeof import('vue')['useSlots'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } // for type re-export declare global { // @ts-ignore - export type { - Component, - ComponentPublicInstance, - ComputedRef, - ExtractDefaultPropTypes, - ExtractPropTypes, - ExtractPublicPropTypes, - InjectionKey, - PropType, - Ref, - VNode, - WritableComputedRef - } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/src/views/homeWindow/more/settings/General.vue b/src/views/homeWindow/more/settings/General.vue index 2ac9d0d..ae10a3f 100644 --- a/src/views/homeWindow/more/settings/General.vue +++ b/src/views/homeWindow/more/settings/General.vue @@ -27,7 +27,7 @@ 系统 - + 关闭主面板 @@ -62,7 +62,7 @@ 聊天 - + 发送信息快捷键 @@ -89,7 +89,7 @@ 界面 - + 是否开启阴影 @@ -97,6 +97,8 @@ + + 字体样式 @@ -108,12 +110,23 @@ :options="fontOptions" /> + + 显示菜单名 + + + + + + 临时功能: 清除localstorage缓存 + + 清除缓存 + @@ -152,6 +165,11 @@ const handleTheme = (code: string) => { const setHomeHeight = async () => { invoke('set_height', { height: showMode.value === ShowModeEnum.TEXT ? 505 : 423 }) } + +const clearLocalstorage = () => { + localStorage.clear() + window.$message?.success('清除成功') +}