feat: add user manager

This commit is contained in:
2025-02-28 15:31:32 +08:00
parent 5f7bd0de5f
commit bd58d5983c
26 changed files with 149 additions and 57 deletions

View File

@@ -1,6 +1,6 @@
import { query } from '@/modules/query';
import { message } from 'antd';
import { create } from 'zustand';
import { message } from '@/modules/message';
export const getIsMac = async () => {
// @ts-ignore
const userAgentData = navigator.userAgentData;
@@ -37,7 +37,7 @@ export const usePlatformStore = create<PlatfromStore>((set) => {
init: async () => {
const mac = await getIsMac();
// @ts-ignore
const isElectron = getIsElectron()
const isElectron = getIsElectron();
set({ isMac: isElectron && mac, isElectron: isElectron, mount: true });
},
};