aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-10 10:23:48 -0400
committerbobzel <zzzman@gmail.com>2022-06-10 10:23:48 -0400
commit4909910355c321c3776a6405fd131bfb2954c4b9 (patch)
tree653a7eb7e272ef2ed9694a08f3fb40a2c35130f8 /src
parentbc662b4e7eaaa1f33f41f64ce64d60579939b971 (diff)
added snapshot and explore back into topbar for now.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/topbar/TopBar.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 5bee58ccb..0efde8197 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -47,10 +47,20 @@ export class TopBar extends React.Component {
<div className="topbar-button-icon" onClick={e => {
const dashView = DocumentManager.Instance.getDocumentView(activeDashboard);
ContextMenu.Instance.addItem({ description: "Open Dashboard View", event: this.navigateToHome, icon: "edit" });
+ ContextMenu.Instance.addItem({ description: "Snapshot Dashboard", event: async () => {
+ const batch = UndoManager.StartBatch("snapshot");
+ await CurrentUserUtils.snapshotDashboard(Doc.UserDoc());
+ batch.end();
+ }, icon: "edit" });
dashView?.showContextMenu(e.clientX+20, e.clientY+30);
}}>
- <FontAwesomeIcon color="white" icon="bars" />
+ <FontAwesomeIcon color="white" size="lg" icon="bars" />
</div>
+ <Tooltip title={<div className="dash-tooltip">Browsing mode for directly navigating to documents</div>} placement="bottom">
+ <div className="topbar-icon" style={{ background: MainView.Instance._exploreMode ? Colors.LIGHT_BLUE : undefined }} onClick={action(() => MainView.Instance._exploreMode = !MainView.Instance._exploreMode)}>
+ <FontAwesomeIcon color={MainView.Instance._exploreMode ? "red":"white"} icon="eye" size="lg" />
+ </div>
+ </Tooltip>
</div>
<div className="topbar-right" >
<div className="topbar-button-text" onClick={() => {SharingManager.Instance.open(undefined, activeDashboard)}}>