mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43:33 +00:00
Add dedicated OS window bars (#22)
This commit is contained in:
parent
ececc394e2
commit
58c7370536
25 changed files with 823 additions and 462 deletions
|
|
@ -33,8 +33,8 @@ export interface AppState {
|
|||
export interface AppSlice extends AppState {
|
||||
actions: {
|
||||
setAppStore: (data: Partial<AppSlice>) => void;
|
||||
setSidebar: (options: Partial<SidebarProps>) => void;
|
||||
setTitlebar: (options: Partial<TitlebarProps>) => void;
|
||||
setSideBar: (options: Partial<SidebarProps>) => void;
|
||||
setTitleBar: (options: Partial<TitlebarProps>) => void;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,12 +46,12 @@ export const useAppStore = create<AppSlice>()(
|
|||
setAppStore: (data) => {
|
||||
set({ ...get(), ...data });
|
||||
},
|
||||
setSidebar: (options) => {
|
||||
setSideBar: (options) => {
|
||||
set((state) => {
|
||||
state.sidebar = { ...state.sidebar, ...options };
|
||||
});
|
||||
},
|
||||
setTitlebar: (options) => {
|
||||
setTitleBar: (options) => {
|
||||
set((state) => {
|
||||
state.titlebar = { ...state.titlebar, ...options };
|
||||
});
|
||||
|
|
@ -89,6 +89,6 @@ export const useSidebarStore = () => useAppStore((state) => state.sidebar);
|
|||
|
||||
export const useSidebarRightExpanded = () => useAppStore((state) => state.sidebar.rightExpanded);
|
||||
|
||||
export const useSetTitlebar = () => useAppStore((state) => state.actions.setTitlebar);
|
||||
export const useSetTitlebar = () => useAppStore((state) => state.actions.setTitleBar);
|
||||
|
||||
export const useTitlebarStore = () => useAppStore((state) => state.titlebar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue