aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-24 18:37:46 -0400
committerbobzel <zzzman@gmail.com>2020-08-24 18:37:46 -0400
commit69f94b19baa37a0a9114bc21710d2e09b49b638d (patch)
treef19e30107f0c2242de167b1179994cdfb45b6766 /src/client/views/MainView.tsx
parent2e4ab06f38323bba06a4d77c04da1507bac5657f (diff)
removed treeViewOpen from sidebar panels since they don't need them now that the top level is hidden.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 9189c1951..67d1de2ec 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -293,8 +293,9 @@ export class MainView extends React.Component {
const toggleTheme = ScriptField.MakeScript(`self.darkScheme = !self.darkScheme`);
const toggleComic = ScriptField.MakeScript(`toggleComicMode()`);
const copyDashboard = ScriptField.MakeScript(`copyDashboard()`);
- dashboardDoc.contextMenuScripts = new List<ScriptField>([toggleTheme!, toggleComic!, copyDashboard!]);
- dashboardDoc.contextMenuLabels = new List<string>(["Toggle Theme Colors", "Toggle Comic Mode", "Snapshot Dashboard"]);
+ const createDashboard = ScriptField.MakeScript(`createDashb oard()`);
+ dashboardDoc.contextMenuScripts = new List<ScriptField>([toggleTheme!, toggleComic!, copyDashboard!, createDashboard!]);
+ dashboardDoc.contextMenuLabels = new List<string>(["Toggle Theme Colors", "Toggle Comic Mode", "Snapshot Dashboard", "Create Dashboard"]);
Doc.AddDocToList(dashboards, "data", dashboardDoc);
// bcz: strangely, we need a timeout to prevent exceptions/issues initializing GoldenLayout (the rendering engine for Main Container)
@@ -1005,5 +1006,6 @@ Scripting.addGlobal(function copyDashboard() {
setTimeout(() => MainView.Instance.openDashboard(copy), 0);
});
});
+Scripting.addGlobal(function createDashboard() { MainView.Instance.createNewDashboard(); });
Scripting.addGlobal(function importDocument() { return MainView.Instance.importDocument(); },
"imports files from device directly into the import sidebar");