overleaf/services/web/frontend/js/features/ide-react/scope-adapters/layout-context-adapter.ts
ilkin-overleaf 5c7fbdceac Merge pull request #15347 from overleaf/ii-ide-page-prototype-chat-pane
Chat for React IDE page

GitOrigin-RevId: 2a34e754a810fd6ef07e4213ad1d31d5e8e54b4c
2023-10-30 09:04:24 +00:00

18 lines
690 B
TypeScript

import { ReactScopeValueStore } from '../scope-value-store/react-scope-value-store'
import getMeta from '@/utils/meta'
const reviewPanelStorageKey = `ui.reviewPanelOpen.${getMeta('ol-project_id')}`
export default function populateLayoutScope(store: ReactScopeValueStore) {
store.set('ui.view', 'editor')
// TODO: Find out what this needs to do and make it do it
store.set('toggleHistory', () => {})
store.set('openFile', null)
store.persisted('ui.chatOpen', false, 'ui.chatOpen')
store.persisted('ui.reviewPanelOpen', false, reviewPanelStorageKey)
store.set('ui.leftMenuShown', false)
store.set('ui.pdfLayout', 'sideBySide')
store.set('ui.loadingStyleSheet', false)
}