From 2065186202404a2bb70f45da7ae842297da3c14c Mon Sep 17 00:00:00 2001 From: yipstanley Date: Sat, 27 Jul 2019 18:45:28 -0400 Subject: fixes --- src/server/authentication/models/current_user_utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/authentication/models/current_user_utils.ts') diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index 41eb1aa0c..1693d2f48 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -50,7 +50,6 @@ export class CurrentUserUtils { if (doc.workspaces === undefined) { const workspaces = Docs.Create.TreeDocument([], { title: "Workspaces", height: 100 }); workspaces.excludeFromLibrary = true; - workspaces.chromeStatus = "disabled"; workspaces.workspaceLibrary = true; workspaces.boxShadow = "0 0"; doc.workspaces = workspaces; @@ -58,7 +57,6 @@ export class CurrentUserUtils { if (doc.recentlyClosed === undefined) { const recentlyClosed = Docs.Create.TreeDocument([], { title: "Recently Closed", height: 75 }); recentlyClosed.excludeFromLibrary = true; - recentlyClosed.chromeStatus = "disabled"; recentlyClosed.boxShadow = "0 0"; doc.recentlyClosed = recentlyClosed; } @@ -67,12 +65,14 @@ export class CurrentUserUtils { sidebar.excludeFromLibrary = true; sidebar.gridGap = 5; sidebar.xMargin = 5; - sidebar.chromeStatus = "disabled"; sidebar.yMargin = 5; Doc.GetProto(sidebar).backgroundColor = "#aca3a6"; sidebar.boxShadow = "1 1 3"; doc.sidebar = sidebar; } + (Cast(doc.workspaces, Doc) as Doc).chromeStatus = "disabled"; + (Cast(doc.recentlyClosed, Doc) as Doc).chromeStatus = "disabled"; + (Cast(doc.sidebar, Doc) as Doc).chromeStatus = "disabled"; doc.chromeStatus = "disabled"; StrCast(doc.title).indexOf("@") !== -1 && (doc.title = StrCast(doc.title).split("@")[0] + "'s Library"); -- cgit v1.2.3-70-g09d2 From 4cab6e0d15ee27c68c358b59ecc3f7e0a89b514f Mon Sep 17 00:00:00 2001 From: yipstanley Date: Sat, 27 Jul 2019 19:05:23 -0400 Subject: fixed updating user doc stuff --- src/client/views/Main.tsx | 5 +++++ src/server/authentication/models/current_user_utils.ts | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/server/authentication/models/current_user_utils.ts') diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index 86578af3e..1cf13aa74 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -33,6 +33,11 @@ let swapDocs = async () => { DocServer.init(window.location.protocol, window.location.hostname, 4321, info.email); await Docs.Prototypes.initialize(); await CurrentUserUtils.loadUserDocument(info); + // updates old user documents to prevent chrome on tree view. + (await Cast(CurrentUserUtils.UserDocument.workspaces, Doc))!.chromeStatus = "disabled"; + (await Cast(CurrentUserUtils.UserDocument.recentlyClosed, Doc))!.chromeStatus = "disabled"; + (await Cast(CurrentUserUtils.UserDocument.sidebar, Doc))!.chromeStatus = "disabled"; + CurrentUserUtils.UserDocument.chromeStatus = "disabled"; await swapDocs(); ReactDOM.render(, document.getElementById('root')); })(); \ No newline at end of file diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index 1693d2f48..1c52a3f11 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -70,10 +70,6 @@ export class CurrentUserUtils { sidebar.boxShadow = "1 1 3"; doc.sidebar = sidebar; } - (Cast(doc.workspaces, Doc) as Doc).chromeStatus = "disabled"; - (Cast(doc.recentlyClosed, Doc) as Doc).chromeStatus = "disabled"; - (Cast(doc.sidebar, Doc) as Doc).chromeStatus = "disabled"; - doc.chromeStatus = "disabled"; StrCast(doc.title).indexOf("@") !== -1 && (doc.title = StrCast(doc.title).split("@")[0] + "'s Library"); } -- cgit v1.2.3-70-g09d2