* chore: upgrade to turbo v2 and reduce ci quality gate runtime * chore: upgrade to yarn v4 and deprecate turborepo * chore: reconfigure modules and fix tests * chore: switch to github-hosted runner * fix: dependency resolving * chore: clean redundant step * chore: headless test * chore: remove headed param * fix: resolve dependency version * fix: ubuntu no-sandbox test --------- Co-authored-by: Hien To <tominhhien97@gmail.com> Co-authored-by: Louis <louis@jan.ai>
33 lines
879 B
TypeScript
33 lines
879 B
TypeScript
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 = 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)
|
|
|
|
const COPY_OVER_INSTRUCTION_ENABLED = 'copy_over_instruction_enabled'
|
|
|
|
export const copyOverInstructionEnabledAtom = atomWithStorage(
|
|
COPY_OVER_INSTRUCTION_ENABLED,
|
|
false
|
|
)
|