aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/topbar
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@Michaels-MacBook-Pro-5.local>2022-06-10 12:04:03 -0400
committerMichael Foiani <sotech117@Michaels-MacBook-Pro-5.local>2022-06-10 12:04:03 -0400
commit91e193ef15bfc82d21653e9f150ccc25389dd6f3 (patch)
treeddca3cfebcb32be50045b8483eb3a349cf93914c /src/client/views/topbar
parenta2c3ed470c941b108aede045ac294e3b966990bc (diff)
parente08c690dbeca3e58b1bc0d387df0287f60f58b7a (diff)
merge with jenny bug fixes and fix small ui
Diffstat (limited to 'src/client/views/topbar')
-rw-r--r--src/client/views/topbar/TopBar.tsx30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 0af7de6af..e486bcb52 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" />
+ 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 >