chore: init bj_power monorepo (dashboard/mes/wms/wms_client/workstation), clear subproject git metadata and align naming to folder names

This commit is contained in:
SunYF
2026-08-27 10:09:54 +08:00
commit 1f0ee844a4
408 changed files with 102201 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import { create } from 'zustand'
import { createJSONStorage, devtools, persist } from 'zustand/middleware'
type State = {
connected: boolean
currentKeys: string[]
}
type Action = {
setConnected: (ok: boolean) => void
setCurrentKeys: (keys: string[]) => void
}
const useGlobalStore = create<State & Action>()(
devtools(
persist(
set => ({
connected: false,
currentKeys: ['Home'],
currentSections: ['首页'],
setConnected: (ok: boolean) =>
set(() => ({
connected: ok
})),
setCurrentKeys: (currentKeys: string[]) =>
set(() => ({
currentKeys: currentKeys
}))
}),
{
name: 'hdm_storage',
storage: createJSONStorage(() => sessionStorage)
}
)
)
)
export default useGlobalStore