From c9f379adab864132e6cf044f808a43254601e4bb Mon Sep 17 00:00:00 2001 From: geireann Date: Fri, 30 Jul 2021 13:26:25 -0400 Subject: major UI / updates + refactoring --- src/client/views/topbar/TopBar.scss | 12 ++--- src/client/views/topbar/TopBar.tsx | 89 ++++++++++++++++++++----------------- 2 files changed, 52 insertions(+), 49 deletions(-) (limited to 'src/client/views/topbar') diff --git a/src/client/views/topbar/TopBar.scss b/src/client/views/topbar/TopBar.scss index 324b96dbd..e2d27d5a6 100644 --- a/src/client/views/topbar/TopBar.scss +++ b/src/client/views/topbar/TopBar.scss @@ -30,7 +30,7 @@ display: flex; .topbar-dashboards { - display: none; + display: inline-flex; } .topbar-dashSelect { @@ -46,12 +46,6 @@ } } } - - .topbar-lozenge-dashboard:hover { - .topbar-dashboards { - display: inline-flex; - } - } } .topBar-icon { @@ -85,7 +79,7 @@ .topbar-lozenge { height: 23; font-size: 12; - color: black; + color: white; font-family: 'Roboto'; font-weight: 400; padding: 4px; @@ -93,7 +87,7 @@ margin-right: 7px; display: flex; align-items: center; - border: black 1px solid; + border: white 1px solid; .topbar-logoff { border-radius: 3px; diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx index 79239d4ea..65da717f8 100644 --- a/src/client/views/topbar/TopBar.tsx +++ b/src/client/views/topbar/TopBar.tsx @@ -1,58 +1,67 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { observer } from "mobx-react"; import * as React from 'react'; import { Doc, DocListCast } from '../../../fields/Doc'; import { Id } from '../../../fields/FieldSymbols'; import { StrCast } from '../../../fields/Types'; import { Utils } from '../../../Utils'; import { CurrentUserUtils } from "../../util/CurrentUserUtils"; -import { ColorScheme, SettingsManager } from "../../util/SettingsManager"; +import { SettingsManager } from "../../util/SettingsManager"; import { undoBatch } from "../../util/UndoManager"; +import { Borders, Colors } from "../global/globalEnums"; import "./TopBar.scss"; -import { Colors, Borders } from "../global/globalEnums"; -export const TopBar = () => { - - const myDashboards = DocListCast(CurrentUserUtils.MyDashboards.data); - return ( -
-
-
-
- -
-
CurrentUserUtils.createNewDashboard(Doc.UserDoc()))} - style={{ color: Doc.UserDoc().colorScheme === ColorScheme.Dark ? "white" : "black" }}> - -
-
CurrentUserUtils.snapshotDashboard(Doc.UserDoc()))} - style={{ color: Doc.UserDoc().colorScheme === ColorScheme.Dark ? "white" : "black" }}> - +/** + * REACT TYPE: FUNCTIONAL + * ABOUT: This is the topbar in Dash, which included the current Dashboard as well as access to information on the user + * and settings and help buttons. Future scope for this bar is to include the collaborators that are on the same Dashboard. + */ +@observer +export class TopBar extends React.Component { + render() { + const myDashboards = DocListCast(CurrentUserUtils.MyDashboards.data); + return ( + //TODO:glr Add support for light / dark mode +
+
+
+
+ +
+
CurrentUserUtils.createNewDashboard(Doc.UserDoc()))} + style={{ color: Colors.WHITE }}> + +
+
CurrentUserUtils.snapshotDashboard(Doc.UserDoc()))} + style={{ color: Colors.WHITE }}> + +
-
-
-
- -
-
SettingsManager.Instance.open()} - style={{ color: Doc.UserDoc().colorScheme === ColorScheme.Dark ? "white" : "black" }}> - -
-
- {`${Doc.CurrentUserEmail}`} -
window.location.assign(Utils.prepend("/logout"))}> - Logoff +
+
+ +
+
SettingsManager.Instance.open()} + style={{ color: Colors.WHITE }}> + +
+
+ {`${Doc.CurrentUserEmail}`} +
window.location.assign(Utils.prepend("/logout"))}> + Logoff +
-
+
-
- ); + ); + } } \ No newline at end of file -- cgit v1.2.3-70-g09d2