overleaf/services/web/frontend/js/features/ide-react/scope-adapters/layout-context-adapter.ts
Tim Down 01439641ca Merge pull request #15376 from overleaf/td-ide-page-working-editor
React IDE page: working editor

GitOrigin-RevId: 3ba8cb787a6f7f8435686d8962adb7444d09acb5
2023-10-27 08:03:07 +00:00

18 lines
669 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.set('ui.chatOpen', false)
store.persisted('ui.reviewPanelOpen', false, reviewPanelStorageKey)
store.set('ui.leftMenuShown', false)
store.set('ui.pdfLayout', 'sideBySide')
store.set('ui.loadingStyleSheet', false)
}