diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-05 22:25:44 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-05 22:25:44 -0500 |
commit | 2df0503edefde20ba1b3c46c16788effb0a7560c (patch) | |
tree | bac31bc2356e7de4aa1df43b382eb8c957ce969f /src/client/util/CurrentUserUtils.ts | |
parent | ea855ecda2c3df9e5d0881d43e2fdbceb9dccafc (diff) | |
parent | 6d8dfee38bd39b95396cbc97405516693116b58f (diff) |
merge
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 70a4ceb68..1f140e145 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -769,8 +769,19 @@ export class CurrentUserUtils { } } + static setupSidebarContainer(doc: Doc) { + if (doc.sidebar === undefined) { + const sidebarContainer = new Doc(); + sidebarContainer._chromeStatus = "disabled"; + sidebarContainer.onClick = ScriptField.MakeScript("freezeSidebar()"); + doc.sidebar = new PrefetchProxy(sidebarContainer); + } + return doc.sidebar as Doc; + } + // setup the list of sidebar mode buttons which determine what is displayed in the sidebar static async setupSidebarButtons(doc: Doc) { + CurrentUserUtils.setupSidebarContainer(doc); await CurrentUserUtils.setupToolsBtnPanel(doc); CurrentUserUtils.setupWorkspaces(doc); CurrentUserUtils.setupCatalog(doc); |