aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json6
-rw-r--r--package.json2
-rw-r--r--src/client/views/topbar/TopBar.tsx17
3 files changed, 13 insertions, 12 deletions
diff --git a/package-lock.json b/package-lock.json
index 052a9fa14..50b0ae024 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4497,9 +4497,9 @@
}
},
"browndash-components": {
- "version": "0.0.33",
- "resolved": "https://registry.npmjs.org/browndash-components/-/browndash-components-0.0.33.tgz",
- "integrity": "sha512-GvapLe8z61FLVru7rosxTT9mgqbhci2frAXkp7xzzgq6KubQZK56oNUygsq5Vk9SKRYdf82ovazI/MOXLcXV7A==",
+ "version": "0.0.34",
+ "resolved": "https://registry.npmjs.org/browndash-components/-/browndash-components-0.0.34.tgz",
+ "integrity": "sha512-wlvNL41FWSvkhDtWWOd6mPZcT+qS6R0eLJ2IrFMk0WG9ejEoURVy8URy566ZLCUKQkkZ3VKISVeidX/pdSRmAg==",
"requires": {
"color": "^4.2.3",
"react-color": "^2.19.3",
diff --git a/package.json b/package.json
index 965439600..f8392171f 100644
--- a/package.json
+++ b/package.json
@@ -177,7 +177,7 @@
"body-parser": "^1.19.2",
"bootstrap": "^4.6.1",
"brotli": "^1.3.3",
- "browndash-components": "0.0.33",
+ "browndash-components": "0.0.34",
"browser-assert": "^1.2.1",
"bson": "^4.6.1",
"canvas": "^2.9.3",
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 32b56b202..b591e0250 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -1,5 +1,5 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { Button, IconButton, Size } from 'browndash-components';
+import { Button, IconButton, Size, Type } from 'browndash-components';
import { action, computed, observable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
@@ -102,13 +102,6 @@ export class TopBar extends React.Component {
dashView?.showContextMenu(e.clientX + 20, e.clientY + 30);
}}
/>
- <Button
- text={GetEffectiveAcl(Doc.GetProto(Doc.ActiveDashboard)) === AclAdmin ? 'Share' : 'View Original'}
- onClick={() => {
- SharingManager.Instance.open(undefined, Doc.ActiveDashboard);
- }}
- size={Size.SMALL}
- />
{!Doc.noviceMode && (
<IconButton
tooltip="Work on a copy of the dashboard layout"
@@ -134,6 +127,14 @@ export class TopBar extends React.Component {
@computed get topbarRight() {
return (
<div className="topbar-right">
+ {Doc.ActiveDashboard && <Button
+ text={GetEffectiveAcl(Doc.GetProto(Doc.ActiveDashboard)) === AclAdmin ? 'Share' : 'View Original'}
+ type={Type.TERT}
+ onClick={() => {
+ SharingManager.Instance.open(undefined, Doc.ActiveDashboard);
+ }}
+ size={Size.SMALL}
+ />}
<IconButton size={Size.SMALL} color={Colors.LIGHT_GRAY} onClick={ServerStats.Instance.open} icon={<FaStamp />} />
<IconButton size={Size.SMALL} color={Colors.LIGHT_GRAY} onClick={ReportManager.Instance.open} icon={<FaBug />} />
<IconButton size={Size.SMALL} color={Colors.LIGHT_GRAY} onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/', '_blank')} icon={<FontAwesomeIcon icon="question-circle" />} />