aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/topbar
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2023-07-17 23:26:24 -0400
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2023-07-17 23:26:24 -0400
commit71fb3eca3d5ebb90d2ab2cfe09a864a4fab9d625 (patch)
tree14a49cd9cb8ebff3d05df1f0c8b36c67da408275 /src/client/views/topbar
parent54308259a8cd3ac98aaee550ea01ad97f17172e6 (diff)
parent54547a9e69726bbacf545296d84723f902ec7097 (diff)
Merge branch 'master' into geireann_dash_components
Diffstat (limited to 'src/client/views/topbar')
-rw-r--r--src/client/views/topbar/TopBar.tsx16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 1b0c6803c..b9d5ed924 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -5,7 +5,7 @@ import { Tooltip } from '@mui/material';
import { observer } from 'mobx-react';
import * as React from 'react';
import { FaBug, FaCamera, FaStamp } from 'react-icons/fa';
-import { Doc } from '../../../fields/Doc';
+import { Doc, DocListCast } from '../../../fields/Doc';
import { AclAdmin } from '../../../fields/DocSymbols';
import { StrCast } from '../../../fields/Types';
import { GetEffectiveAcl } from '../../../fields/util';
@@ -60,7 +60,11 @@ export class TopBar extends React.Component {
return (
<div className="topbar-left">
{Doc.ActiveDashboard ? (
- <IconButton onClick={this.navigateToHome} icon={<FontAwesomeIcon icon="home" />} color={this.color} />
+ <IconButton
+ onClick={this.navigateToHome}
+ icon={<FontAwesomeIcon icon={DocListCast(Doc.MySharedDocs.data_dashboards).some(dash => !DocListCast(Doc.MySharedDocs.viewed).includes(dash)) ? 'portrait' : 'home'} />}
+ color={this.color}
+ />
) : (
<div className="logo-container">
<img className="logo" src="/assets/medium-blue-light-blue-circle.png" alt="dash logo"></img>
@@ -115,6 +119,14 @@ export class TopBar extends React.Component {
dashView?.showContextMenu(e.clientX + 20, e.clientY + 30);
}}
/>
+ <Button
+ text={GetEffectiveAcl(Doc.ActiveDashboard) === AclAdmin ? 'Share' : 'View Original'}
+ onClick={() => {
+ SharingManager.Instance.open(undefined, Doc.ActiveDashboard);
+ }}
+ color={this.color}
+ size={Size.SMALL}
+ />
{!Doc.noviceMode && (
<IconButton
tooltip="Work on a copy of the dashboard layout"