diff options
| author | bobzel <zzzman@gmail.com> | 2022-05-20 10:48:04 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-05-20 10:48:04 -0400 |
| commit | 51199aae80013073d4f1a0749a36051dcee591c1 (patch) | |
| tree | f70b4e7fe24a0cc0a04f3cbb9e95d6c64ad91520 /src/client/views/topbar | |
| parent | 99558fd67dcdb028692f1d219331ab86e07898f1 (diff) | |
moved explore mode to topBar. fixed highlighting of overlay toggle. fixed pointerEvents on lockedPosition collectoins that are not children of a free form view.
Diffstat (limited to 'src/client/views/topbar')
| -rw-r--r-- | src/client/views/topbar/TopBar.tsx | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx index 0af7de6af..be248ab92 100644 --- a/src/client/views/topbar/TopBar.tsx +++ b/src/client/views/topbar/TopBar.tsx @@ -1,4 +1,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { Tooltip } from "@material-ui/core"; +import { action } from "mobx"; import { observer } from "mobx-react"; import * as React from 'react'; import { Doc, DocListCast } from '../../../fields/Doc'; @@ -9,6 +11,7 @@ import { CurrentUserUtils } from "../../util/CurrentUserUtils"; import { SettingsManager } from "../../util/SettingsManager"; import { undoBatch, UndoManager } from "../../util/UndoManager"; import { Borders, Colors } from "../global/globalEnums"; +import { MainView } from "../MainView"; import "./TopBar.scss"; /** @@ -40,20 +43,28 @@ export class TopBar extends React.Component { </select> </div> <div className="topbar-dashboards"> - <div className="topbar-icon" onClick={async () => { + <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> - {<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">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" > @@ -64,7 +75,6 @@ export class TopBar extends React.Component { <div className="topbar-icon" onClick={() => SettingsManager.Instance.open()}> {"Settings"}<FontAwesomeIcon icon="cog" /> </div> - </div> </div> </div > |
