jan/web/helpers/atoms/App.atom.ts
hiento09 bd0e525d66
chore: upgrade to turbo v2 and reduce ci quality gate runtime (#4324)
* 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>
2024-12-29 17:46:15 +07:00

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
)