-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(kubepanel): improve the overall style (#4494)
* chore(kubepanel): remove unused packages * style(kubepanel): adjust workload pie * style(kubepanel): cascader style improve * style(kubepanel): modal fullscreen * chore: deal with conflict * style: editor style perf * perf: editor feature perf * style(kubepanel): tooltip style perf * style(kubepanel): pagination style perf * fix: zustand * fix: fix node:fs
- Loading branch information
Showing
19 changed files
with
454 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,15 @@ | ||
import { create } from 'zustand'; | ||
import { devtools } from 'zustand/middleware'; | ||
import { immer } from 'zustand/middleware/immer'; | ||
|
||
type State = { | ||
screenWidth: number; | ||
setScreenWidth: (e: number) => void; | ||
loading: boolean; | ||
setLoading: (val: boolean) => void; | ||
lastRoute: string; | ||
setLastRoute: (val: string) => void; | ||
}; | ||
|
||
export const useGlobalStore = create<State>()( | ||
devtools( | ||
immer((set, get) => ({ | ||
screenWidth: 1440, | ||
setScreenWidth(e: number) { | ||
set((state) => { | ||
state.screenWidth = e; | ||
}); | ||
}, | ||
loading: false, | ||
setLoading(val: boolean) { | ||
set((state) => { | ||
state.loading = val; | ||
}); | ||
}, | ||
lastRoute: '/', | ||
setLastRoute(val) { | ||
set((state) => { | ||
state.lastRoute = val; | ||
}); | ||
} | ||
})) | ||
) | ||
); | ||
export const useGlobalStore = create<State>()((set) => ({ | ||
screenWidth: 1440, | ||
setScreenWidth: (e) => set({ screenWidth: e }), | ||
lastRoute: '/', | ||
setLastRoute: (val) => set({ lastRoute: val }) | ||
})); |
Oops, something went wrong.