feat(ui): add recent section toggle
This commit is contained in:
@@ -5,14 +5,20 @@ export type SessionDisplayMode = 'default' | 'minimal';
|
||||
|
||||
type SessionDisplayStore = {
|
||||
displayMode: SessionDisplayMode;
|
||||
showRecentSection: boolean;
|
||||
setDisplayMode: (mode: SessionDisplayMode) => void;
|
||||
setShowRecentSection: (show: boolean) => void;
|
||||
toggleRecentSection: () => void;
|
||||
};
|
||||
|
||||
export const useSessionDisplayStore = create<SessionDisplayStore>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
displayMode: 'default',
|
||||
showRecentSection: true,
|
||||
setDisplayMode: (mode) => set({ displayMode: mode }),
|
||||
setShowRecentSection: (show) => set({ showRecentSection: show }),
|
||||
toggleRecentSection: () => set((state) => ({ showRecentSection: !state.showRecentSection })),
|
||||
}),
|
||||
{
|
||||
name: 'session-display-mode',
|
||||
|
||||
Reference in New Issue
Block a user