aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/topbar
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-07-27 11:06:43 -0400
committerGitHub <noreply@github.com>2023-07-27 11:06:43 -0400
commit1f80b87178a84c1a449e27c90b1f7b635593cdad (patch)
treea560b8010d9105c88219635913edb8598b0c42e9 /src/client/views/topbar
parent92cb8cd4fd46a4796cd585fd8fd9c9fc4d36811e (diff)
parent31368b599dee83ccd2538f33b760ae25f19073cc (diff)
Merge pull request #183 from brown-dash/collaboration-again
override nested -> upgrade nested and a few small ui things
Diffstat (limited to 'src/client/views/topbar')
-rw-r--r--src/client/views/topbar/TopBar.tsx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 79f41fe9d..ec4252eb8 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -134,14 +134,16 @@ export class TopBar extends React.Component {
@computed get topbarRight() {
return (
<div className="topbar-right">
- <Button
- text={GetEffectiveAcl(Doc.ActiveDashboard) === AclAdmin ? 'Share' : 'View Original'}
- type={Type.TERT}
- color={this.variantColor}
- onClick={() => {
- SharingManager.Instance.open(undefined, Doc.ActiveDashboard);
- }}
- />
+ {Doc.ActiveDashboard ?
+ <Button
+ text={GetEffectiveAcl(Doc.ActiveDashboard) === AclAdmin ? 'Share' : 'View Original'}
+ type={Type.TERT}
+ color={this.variantColor}
+ onClick={() => {
+ SharingManager.Instance.open(undefined, Doc.ActiveDashboard);
+ }}
+ />
+ : null }
<IconButton tooltip={"Issue Reporter ⌘I"} size={Size.SMALL} color={this.color} onClick={ReportManager.Instance.open} icon={<FaBug />} />
<IconButton tooltip={"Documentation ⌘D"} size={Size.SMALL} color={this.color} onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/', '_blank')} icon={<FontAwesomeIcon icon="question-circle" />} />
<IconButton tooltip={"Settings ⌘⇧S"} size={Size.SMALL} color={this.color} onClick={SettingsManager.Instance.open} icon={<FontAwesomeIcon icon="cog" />} />