-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement: default open Jan Input Box Settings and Right panel (#4234)
* enhancement: default open Jan Input Box Settings and Right panel * chore: added option getOnInit atomstorage
- Loading branch information
Showing
3 changed files
with
15 additions
and
5 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
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,14 +1,25 @@ | ||
import { atom } from 'jotai' | ||
|
||
import { atomWithStorage } from 'jotai/utils' | ||
|
||
import { MainViewState } from '@/constants/screens' | ||
|
||
export const mainViewStateAtom = atom<MainViewState>(MainViewState.Thread) | ||
|
||
export const defaultJanDataFolderAtom = atom<string>('') | ||
|
||
const SHOW_RIGHT_PANEL = 'showRightPanel' | ||
|
||
// Store panel atom | ||
export const showLeftPanelAtom = atom<boolean>(true) | ||
export const showRightPanelAtom = atom<boolean>(true) | ||
|
||
export const showRightPanelAtom = atomWithStorage<boolean>( | ||
SHOW_RIGHT_PANEL, | ||
false, | ||
undefined, | ||
{ getOnInit: true } | ||
) | ||
|
||
export const showSystemMonitorPanelAtom = atom<boolean>(false) | ||
export const appDownloadProgressAtom = atom<number>(-1) | ||
export const updateVersionErrorAtom = atom<string | undefined>(undefined) |
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