From a0dc46dc565418fef9a257508a92c788c4ec50af Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sat, 16 May 2020 00:01:06 -0400 Subject: fixed some issues with frame animation. added comic rendering mode. added server certficate keys to get SSL to work? --- src/client/views/MainView.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/client/views/MainView.tsx') diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index f58313f06..3e4833052 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -256,8 +256,9 @@ export class MainView extends React.Component { const mainDoc = Docs.Create.StandardCollectionDockingDocument([{ doc: freeformDoc, initialWidth: 600, path: [Doc.UserDoc().myCatalog as Doc] }], { title: `Workspace ${workspaceCount}` }, id, "row"); const toggleTheme = ScriptField.MakeScript(`self.darkScheme = !self.darkScheme`); - mainDoc.contextMenuScripts = new List([toggleTheme!]); - mainDoc.contextMenuLabels = new List(["Toggle Theme Colors"]); + const toggleComic = ScriptField.MakeScript(`toggleComicMode()`); + mainDoc.contextMenuScripts = new List([toggleTheme!, toggleComic!]); + mainDoc.contextMenuLabels = new List(["Toggle Theme Colors", "Toggle Comic Mode"]); Doc.AddDocToList(workspaces, "data", mainDoc); // bcz: strangely, we need a timeout to prevent exceptions/issues initializing GoldenLayout (the rendering engine for Main Container) @@ -629,3 +630,4 @@ export class MainView extends React.Component { } } Scripting.addGlobal(function freezeSidebar() { MainView.expandFlyout(); }); +Scripting.addGlobal(function toggleComicMode() { Doc.UserDoc().fontFamily = "Comic Sans MS"; Doc.UserDoc().renderStyle = Doc.UserDoc().renderStyle === "comic" ? undefined : "comic" }); -- cgit v1.2.3-70-g09d2