diff options
| author | bobzel <zzzman@gmail.com> | 2022-06-09 16:59:09 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-06-09 16:59:09 -0400 |
| commit | 140e2f643f97057ba9c89c502cff7843bd738cd6 (patch) | |
| tree | 033330390616fde7a6b3797f2a71153e28939e51 /src/client/views/topbar | |
| parent | 8ef0c6c08bd9c2e3654477b039686bab6b0ff991 (diff) | |
fixed issues with taking dashboard snapshots to update dashboard view
Diffstat (limited to 'src/client/views/topbar')
| -rw-r--r-- | src/client/views/topbar/TopBar.tsx | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx index fcc72b73d..21ef807ff 100644 --- a/src/client/views/topbar/TopBar.tsx +++ b/src/client/views/topbar/TopBar.tsx @@ -21,7 +21,7 @@ import "./TopBar.scss"; @observer export class TopBar extends React.Component { navigateToHome = () => { - Doc.UserDoc().activeDashboard = undefined + CurrentUserUtils.CaptureDashboardThumbnail()?.then(() => Doc.UserDoc().activeDashboard = undefined); } render() { const myDashboards = DocListCast(CurrentUserUtils.MyDashboards.data); @@ -61,68 +61,6 @@ export class TopBar extends React.Component { </div> </div> </div> - - - {/* <div className="topbar-left"> - <div className="topbar-lozenge-user"> - {`${Doc.CurrentUserEmail}`} - </div> - <div className="topbar-icon" onClick={() => window.location.assign(Utils.prepend("/logout"))}> - {"Log out"} - </div> - </div> */} - {/* <div className="topbar-center" > - <div className="topbar-lozenge-dashboard"> - <div style={{ color: Colors.WHITE }}> - {activeDashboard ? StrCast(activeDashboard.title) : "Dash"} - </div> */} - - {/* <select className="topbar-dashSelect" onChange={undoBatch(e => CurrentUserUtils.openDashboard(Doc.UserDoc(), myDashboards[Number(e.target.value)]))} - value={myDashboards.indexOf(CurrentUserUtils.ActiveDashboard)} - style={{ color: Colors.WHITE }}> - {myDashboards.map((dash, i) => <option key={dash[Id]} value={i}> {StrCast(dash.title)} </option>)} - </select> */} - {/* </div> */ } - {/* <div className="topbar-dashboards"> - <Tooltip title={<div className="dash-tooltip">Create a new dashboard </div>} placement="bottom"><div className="topbar-icon" onClick={async () => { - const batch = UndoManager.StartBatch("new dash"); - await CurrentUserUtils.createNewDashboard(Doc.UserDoc()); - batch.end(); - }}> - New<FontAwesomeIcon icon="plus" /> - </div> - </Tooltip> - <Tooltip title={<div className="dash-tooltip">Work on a copy of the dashboard layout</div>} placement="bottom"> - <div className="topbar-icon" onClick={async () => { - const batch = UndoManager.StartBatch("snapshot"); - await CurrentUserUtils.snapshotDashboard(Doc.UserDoc()); - batch.end(); - }}> - Snapshot<FontAwesomeIcon icon="camera" /> - </div> - </Tooltip> - <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)}> - Explore<FontAwesomeIcon icon="map" /> - </div> - </Tooltip> - </div> */} - {/* </div> */ } - {/* <div className="topbar-right" > */ } - {/* <div onClick={() => window.open( - "https://brown-dash.github.io/Dash-Documentation/", "_blank")}> - <FontAwesomeIcon icon="question-circle" /> - </div> - <div onClick={() => SettingsManager.Instance.open()}> - <FontAwesomeIcon icon="cog" /> - </div> */} - {/* <div className="topbar-icon" > - <FontAwesomeIcon icon="question-circle" /> - </div> - <div className="topbar-icon" onClick={() => SettingsManager.Instance.open()}> - <FontAwesomeIcon icon="cog" /> - </div> - </div> */} ); } |
