feat: add preferredFlowPilotView to user preferences store
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ type ExportFormat = 'markdown' | 'text' | 'html' | 'psa'
|
|||||||
type TreeLibraryView = 'grid' | 'list' | 'table'
|
type TreeLibraryView = 'grid' | 'list' | 'table'
|
||||||
type TreeSortBy = 'usage_count' | 'updated_at' | 'created_at' | 'name' | 'name_desc' | 'version'
|
type TreeSortBy = 'usage_count' | 'updated_at' | 'created_at' | 'name' | 'name_desc' | 'version'
|
||||||
type EditorMode = 'form' | 'code'
|
type EditorMode = 'form' | 'code'
|
||||||
|
type FlowPilotView = 'flowpilot' | 'cockpit'
|
||||||
|
|
||||||
interface UserPreferencesState {
|
interface UserPreferencesState {
|
||||||
defaultExportFormat: ExportFormat
|
defaultExportFormat: ExportFormat
|
||||||
@@ -21,6 +22,8 @@ interface UserPreferencesState {
|
|||||||
toggleSidebarPinned: () => void
|
toggleSidebarPinned: () => void
|
||||||
dashboardMyFlowsView: TreeLibraryView
|
dashboardMyFlowsView: TreeLibraryView
|
||||||
setDashboardMyFlowsView: (view: TreeLibraryView) => void
|
setDashboardMyFlowsView: (view: TreeLibraryView) => void
|
||||||
|
preferredFlowPilotView: FlowPilotView
|
||||||
|
setPreferredFlowPilotView: (view: FlowPilotView) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useUserPreferencesStore = create<UserPreferencesState>()(
|
export const useUserPreferencesStore = create<UserPreferencesState>()(
|
||||||
@@ -40,6 +43,8 @@ export const useUserPreferencesStore = create<UserPreferencesState>()(
|
|||||||
toggleSidebarPinned: () => set({ sidebarPinned: !get().sidebarPinned }),
|
toggleSidebarPinned: () => set({ sidebarPinned: !get().sidebarPinned }),
|
||||||
dashboardMyFlowsView: 'grid',
|
dashboardMyFlowsView: 'grid',
|
||||||
setDashboardMyFlowsView: (view) => set({ dashboardMyFlowsView: view }),
|
setDashboardMyFlowsView: (view) => set({ dashboardMyFlowsView: view }),
|
||||||
|
preferredFlowPilotView: 'flowpilot',
|
||||||
|
setPreferredFlowPilotView: (view) => set({ preferredFlowPilotView: view }),
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
name: 'user-preferences-storage',
|
name: 'user-preferences-storage',
|
||||||
|
|||||||
Reference in New Issue
Block a user