* feat: local engine management * chore: move remote engine into engine page instead extension page * chore: set default engine from extension * chore: update endpoint update engine * chore: update event onEngineUpdate * chore: filter out engine download * chore: update version env * chore: select default engine variant base on user device specs * chore: symlink engine variants * chore: rolldown.config in mjs format * chore: binary codesign * fix: download state in footer bar and variant status * chore: update yarn.lock * fix: rimraf failure * fix: setup-node@v3 for built-in cache * fix: cov pipeline * fix: build syntax * chore: fix build step * fix: create engines folder on launch * chore: update ui delete engine variant with modal confirmation * chore: fix linter * chore: add installing progress for Local Engine download * chore: wording --------- Co-authored-by: Louis <louis@jan.ai>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { useEffect } from 'react'
|
|
|
|
import { useSetAtom } from 'jotai'
|
|
|
|
import CenterPanelContainer from '@/containers/CenterPanelContainer'
|
|
|
|
import SettingDetail from '@/screens/Settings/SettingDetail'
|
|
import SettingLeftPanel from '@/screens/Settings/SettingLeftPanel'
|
|
|
|
import { SUCCESS_SET_NEW_DESTINATION } from './Advanced/DataFolder'
|
|
|
|
import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom'
|
|
|
|
export const SettingScreenList = [
|
|
'My Models',
|
|
'Preferences',
|
|
'Keyboard Shortcuts',
|
|
'Privacy',
|
|
'Advanced Settings',
|
|
'Engines',
|
|
'Extensions',
|
|
] as const
|
|
|
|
export type SettingScreenTuple = typeof SettingScreenList
|
|
export type SettingScreen = SettingScreenTuple[number]
|
|
|
|
const SettingsScreen = () => {
|
|
const setSelectedSettingScreen = useSetAtom(selectedSettingAtom)
|
|
|
|
useEffect(() => {
|
|
if (localStorage.getItem(SUCCESS_SET_NEW_DESTINATION) === 'true') {
|
|
setSelectedSettingScreen('Advanced Settings')
|
|
localStorage.removeItem(SUCCESS_SET_NEW_DESTINATION)
|
|
}
|
|
}, [setSelectedSettingScreen])
|
|
|
|
return (
|
|
<div data-testid="testid-setting-description" className="flex h-full">
|
|
<SettingLeftPanel />
|
|
<CenterPanelContainer>
|
|
<SettingDetail />
|
|
</CenterPanelContainer>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default SettingsScreen
|