diff --git a/apps/vue/src/api/sys/model/themeModel.ts b/apps/vue/src/api/sys/model/themeModel.ts new file mode 100644 index 000000000..2f53c432e --- /dev/null +++ b/apps/vue/src/api/sys/model/themeModel.ts @@ -0,0 +1,8 @@ +import type { BeforeMiniState } from '/#/store'; +import type { ProjectConfig } from '/#/config'; + +export interface ThemeSetting { + darkMode?: string; + projectConfig: ProjectConfig; + beforeMiniInfo: BeforeMiniState; +} diff --git a/apps/vue/src/api/sys/theme.ts b/apps/vue/src/api/sys/theme.ts new file mode 100644 index 000000000..151b84cc8 --- /dev/null +++ b/apps/vue/src/api/sys/theme.ts @@ -0,0 +1,15 @@ +import { defAbpHttp } from '/@/utils/http/abp'; +import { ThemeSetting } from './model/themeModel'; + +export const getTheme = () => { + return defAbpHttp.get({ + url: '/api/theme/vue-vben-admin', + }); +}; + +export const changeTheme = (themeSetting: ThemeSetting) => { + return defAbpHttp.put({ + url: '/api/theme/vue-vben-admin/change', + data: themeSetting, + }); +}; diff --git a/apps/vue/src/hooks/web/useSignalR.ts b/apps/vue/src/hooks/web/useSignalR.ts index c550613ee..58a649cd9 100644 --- a/apps/vue/src/hooks/web/useSignalR.ts +++ b/apps/vue/src/hooks/web/useSignalR.ts @@ -4,6 +4,7 @@ import { HubConnectionBuilder, HubConnectionState, IHttpConnectionOptions, + LogLevel, } from '@microsoft/signalr'; import { useUserStoreWithOut } from '/@/store/modules/user'; @@ -45,7 +46,9 @@ export function useSignalR({ httpOptions.accessTokenFactory = () => token.startsWith('Bearer ') ? token.substring(7) : token; } - var connectionBuilder = new HubConnectionBuilder().withUrl(serverUrl, httpOptions); + var connectionBuilder = new HubConnectionBuilder() + .withUrl(serverUrl, httpOptions) + .configureLogging(LogLevel.Warning); if (automaticReconnect) { connectionBuilder.withAutomaticReconnect({ nextRetryDelayInMilliseconds: () => nextRetryDelayInMilliseconds, diff --git a/apps/vue/src/layouts/default/setting/components/SettingFooter.vue b/apps/vue/src/layouts/default/setting/components/SettingFooter.vue index 237566401..985fc04e4 100644 --- a/apps/vue/src/layouts/default/setting/components/SettingFooter.vue +++ b/apps/vue/src/layouts/default/setting/components/SettingFooter.vue @@ -1,25 +1,30 @@