aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-04-03 20:13:58 -0400
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-04-03 20:13:58 -0400
commitd252d6dba8b789215ed8da5b66889a26b06a2a18 (patch)
tree01bdb17522b6301128bff248a49733cdd0db2c22 /src/client/util/CurrentUserUtils.ts
parentbd6b9c40f150fab76e8907c45e29fa809f9acae0 (diff)
dashboard sharing works, aliases to go
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r--src/client/util/CurrentUserUtils.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index f1357e3d7..fdceb60f3 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -1189,7 +1189,7 @@ export class CurrentUserUtils {
const toggleComic = ScriptField.MakeScript(`toggleComicMode()`);
const snapshotDashboard = ScriptField.MakeScript(`snapshotDashboard()`);
const createDashboard = ScriptField.MakeScript(`createNewDashboard()`);
- const shareDashboard = ScriptField.MakeScript(`shareDashboard()`);
+ const shareDashboard = ScriptField.MakeScript(`shareDashboard(self)`);
const addToDashboards = ScriptField.MakeScript(`addToDashboards(self)`);
dashboardDoc.contextMenuScripts = new List<ScriptField>([toggleTheme!, toggleComic!, snapshotDashboard!, createDashboard!, shareDashboard!, addToDashboards!]);
dashboardDoc.contextMenuLabels = new List<string>(["Toggle Theme Colors", "Toggle Comic Mode", "Snapshot Dashboard", "Create Dashboard", "Share Dashboard", "Add to Dashboards"]);
@@ -1244,9 +1244,8 @@ Scripting.addGlobal(function links(doc: any) { return new List(LinkManager.Insta
"returns all the links to the document or its annotations", "(doc: any)");
Scripting.addGlobal(function importDocument() { return CurrentUserUtils.importDocument(); },
"imports files from device directly into the import sidebar");
-Scripting.addGlobal(function shareDashboard() {
- CurrentUserUtils.ActiveDashboard.isShared = true;
- SharingManager.Instance.open(undefined, CurrentUserUtils.ActiveDashboard);
+Scripting.addGlobal(function shareDashboard(dashboard: Doc) {
+ SharingManager.Instance.open(undefined, dashboard);
},
"opens sharing dialog for Dashboard");
Scripting.addGlobal(function addToDashboards(dashboard: Doc) { Doc.AddDocToList(CurrentUserUtils.MyDashboards, "data", dashboard); },