diff options
author | Jenny Yu <jennyyu212@outlook.com> | 2022-06-15 19:46:10 -0700 |
---|---|---|
committer | Jenny Yu <jennyyu212@outlook.com> | 2022-06-15 19:46:10 -0700 |
commit | 6dc7a0d37f055c57135b91d4d54174ee156b61f5 (patch) | |
tree | 773979ac856ccbffb7ca2440f8f83ad628a0c0d1 /src/client/util/CurrentUserUtils.ts | |
parent | 51c60d4d349c66432e57255f459c3d175ac3b251 (diff) |
share and remove dashboard from context menu
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 199ef701d..c0318e86b 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -1226,6 +1226,13 @@ export class CurrentUserUtils { Doc.UserDoc().activeDashboard = undefined; } + public static async removeDashboard(dashboard: Doc) { + const dashboards = await DocListCastAsync(CurrentUserUtils.MyDashboards.data); + if (dashboards && dashboards.length > 0) { + Doc.RemoveDocFromList(CurrentUserUtils.MyDashboards, "data", dashboard); + } + } + public static createNewDashboard = async (userDoc: Doc, id?: string, name?: string) => { console.log(name) const presentation = Doc.MakeCopy(userDoc.emptyPresentation as Doc, true); |