From d5ca5eeaf40722681d2622c26eb3cbab44163aaf Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 16 Jul 2024 17:32:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=96=E8=A7=82=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/api/theme.ts | 19 +- ui/src/assets/icon_robot.svg | 2 +- ui/src/components/icons/index.ts | 6 +- ui/src/components/login-layout/index.vue | 39 ++- ui/src/components/logo/LogoFull.vue | 129 ++++---- ui/src/components/logo/LogoIcon.vue | 4 +- ui/src/layout/components/app-header/index.vue | 4 +- .../components/top-bar/avatar/AboutDialog.vue | 4 +- ui/src/main.ts | 3 - ui/src/router/modules/setting.ts | 4 +- ui/src/stores/modules/common.ts | 10 +- ui/src/stores/modules/user.ts | 17 +- ui/src/styles/app.scss | 4 +- ui/src/theme/defaultInferData.ts | 13 - ui/src/theme/defaultKeyValueData.ts | 5 - ui/src/theme/index.ts | 281 ------------------ ui/src/theme/setting.ts | 12 - ui/src/theme/type.ts | 71 ----- ui/src/utils/theme.ts | 44 +++ ui/src/views/application-workflow/index.vue | 2 +- ui/src/views/authentication/index.vue | 9 +- ui/src/views/login/index.vue | 100 ++++--- ui/src/views/theme/LoginPreview.vue | 37 ++- ui/src/views/theme/index.vue | 179 +++++++---- .../icons/search-dataset-node-icon.vue | 2 +- 25 files changed, 381 insertions(+), 619 deletions(-) delete mode 100644 ui/src/theme/defaultInferData.ts delete mode 100644 ui/src/theme/defaultKeyValueData.ts delete mode 100644 ui/src/theme/index.ts delete mode 100644 ui/src/theme/setting.ts delete mode 100644 ui/src/theme/type.ts create mode 100644 ui/src/utils/theme.ts diff --git a/ui/src/api/theme.ts b/ui/src/api/theme.ts index a397f3a90..b404df397 100644 --- a/ui/src/api/theme.ts +++ b/ui/src/api/theme.ts @@ -1,7 +1,6 @@ import { Result } from '@/request/Result' import { get, post, del, put } from '@/request/index' -import type { TeamMember } from '@/api/type/team' - +import type { Ref } from 'vue' const prefix = '/display' /** @@ -13,7 +12,7 @@ const getThemeInfo: () => Promise> = () => { /** * 更新外观设置 - * @param 参数 + * @param 参数 * * formData { * theme * icon @@ -23,12 +22,14 @@ const getThemeInfo: () => Promise> = () => { * slogan * } */ -const postThemeInfo: (data: any) => Promise> = (data) => { - return post(`${prefix}/update`, data) +const postThemeInfo: (data: any, loading?: Ref) => Promise> = ( + data, + loading +) => { + return post(`${prefix}/update`, data, undefined, loading) } export default { - getThemeInfo, - postThemeInfo - } - \ No newline at end of file + getThemeInfo, + postThemeInfo +} diff --git a/ui/src/assets/icon_robot.svg b/ui/src/assets/icon_robot.svg index 5f50e4cf3..cca9ee604 100644 --- a/ui/src/assets/icon_robot.svg +++ b/ui/src/assets/icon_robot.svg @@ -1 +1 @@ -MaxKB \ No newline at end of file +MaxKB \ No newline at end of file diff --git a/ui/src/components/icons/index.ts b/ui/src/components/icons/index.ts index b9e3ddfda..c14811734 100644 --- a/ui/src/components/icons/index.ts +++ b/ui/src/components/icons/index.ts @@ -955,7 +955,7 @@ export const iconMap: any = { ]) } }, - 'app-minify': { + 'app-magnify': { iconReader: () => { return h('i', [ h( @@ -976,7 +976,7 @@ export const iconMap: any = { ]) } }, - 'app-magnify': { + 'app-minify': { iconReader: () => { return h('i', [ h( @@ -1071,5 +1071,5 @@ export const iconMap: any = { ) ]) } - }, + } } diff --git a/ui/src/components/login-layout/index.vue b/ui/src/components/login-layout/index.vue index 7d065e278..4f8b185c7 100644 --- a/ui/src/components/login-layout/index.vue +++ b/ui/src/components/login-layout/index.vue @@ -3,9 +3,7 @@ @@ -29,7 +48,9 @@ const props = defineProps({ height: 100vh; .login-image { - object-fit: cover; + background-repeat: no-repeat; + background-position: center; + background-size: cover; width: 100%; height: 100%; } diff --git a/ui/src/components/logo/LogoFull.vue b/ui/src/components/logo/LogoFull.vue index 24169a2f8..c65499aaf 100644 --- a/ui/src/components/logo/LogoFull.vue +++ b/ui/src/components/logo/LogoFull.vue @@ -1,59 +1,62 @@