diff options
| author | bobzel <zzzman@gmail.com> | 2022-07-08 12:37:06 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-07-08 12:37:06 -0400 |
| commit | 5628b585fa6356d66cf2e7454be20e3b847ad22e (patch) | |
| tree | 7836fd781c3cd82c00965d22c6bdf325414ef490 /src/client/views/DashboardView.tsx | |
| parent | 146f8622d5bac2edc6b09f57c173bd057dfbcfad (diff) | |
fixes for drawing ink on pdf/image/etc. fixes for showing contextMenu. moved gestureOverlay into main dashboard area to avoid drawing on UI widgets. more code cleanup to put things in reasonable places and avoid importing too much stuff.
Diffstat (limited to 'src/client/views/DashboardView.tsx')
| -rw-r--r-- | src/client/views/DashboardView.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx index c59c37488..526a32f5a 100644 --- a/src/client/views/DashboardView.tsx +++ b/src/client/views/DashboardView.tsx @@ -10,6 +10,7 @@ import { DocServer } from '../DocServer'; import { Docs, DocumentOptions } from '../documents/Documents'; import { CollectionViewType } from '../documents/DocumentTypes'; import { HistoryUtil } from '../util/History'; +import { ScriptingGlobals } from '../util/ScriptingGlobals'; import { SharingManager } from '../util/SharingManager'; import { undoBatch } from '../util/UndoManager'; import { CollectionDockingView } from './collections/CollectionDockingView'; @@ -288,3 +289,19 @@ export class DashboardView extends React.Component { export function AddToList(MySharedDocs: Doc, arg1: string, dash: any) { throw new Error('Function not implemented.'); } + +ScriptingGlobals.add(function createNewDashboard() { + return DashboardView.createNewDashboard(); +}, 'creates a new dashboard when called'); +ScriptingGlobals.add(function shareDashboard(dashboard: Doc) { + SharingManager.Instance.open(undefined, dashboard); +}, 'opens sharing dialog for Dashboard'); +ScriptingGlobals.add(function removeDashboard(dashboard: Doc) { + DashboardView.removeDashboard(dashboard); +}, 'Remove Dashboard from Dashboards'); +ScriptingGlobals.add(function addToDashboards(dashboard: Doc) { + DashboardView.openDashboard(Doc.MakeAlias(dashboard)); +}, 'adds Dashboard to set of Dashboards'); +ScriptingGlobals.add(function snapshotDashboard() { + DashboardView.snapshotDashboard(); +}, 'creates a snapshot copy of a dashboard'); |
