mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 23:18:11 +08:00
Add TOS and Privacy url via config (#1300)
* add tos and privacy url via config * typo * readd condition * param
This commit is contained in:
@@ -32,7 +32,9 @@ import UndoRedoReset from "./undoRedo";
|
|||||||
aboutLink: state.config?.links?.["about-dataset"],
|
aboutLink: state.config?.links?.["about-dataset"],
|
||||||
disableDiffexp: state.config?.parameters?.["disable-diffexp"] ?? false,
|
disableDiffexp: state.config?.parameters?.["disable-diffexp"] ?? false,
|
||||||
diffexpMayBeSlow: state.config?.parameters?.["diffexp-may-be-slow"] ?? false,
|
diffexpMayBeSlow: state.config?.parameters?.["diffexp-may-be-slow"] ?? false,
|
||||||
showCentroidLabels: state.centroidLabels.showLabels
|
showCentroidLabels: state.centroidLabels.showLabels,
|
||||||
|
tosURL: state.config?.parameters?.about_legal_tos,
|
||||||
|
privacyURL: state.config?.parameters?.about_legal_privacy
|
||||||
}))
|
}))
|
||||||
class MenuBar extends React.Component {
|
class MenuBar extends React.Component {
|
||||||
static isValidDigitKeyEvent(e) {
|
static isValidDigitKeyEvent(e) {
|
||||||
@@ -279,7 +281,9 @@ class MenuBar extends React.Component {
|
|||||||
clipPercentileMax,
|
clipPercentileMax,
|
||||||
graphInteractionMode,
|
graphInteractionMode,
|
||||||
aboutLink,
|
aboutLink,
|
||||||
showCentroidLabels
|
showCentroidLabels,
|
||||||
|
privacyURL,
|
||||||
|
tosURL
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { pendingClipPercentiles } = this.state;
|
const { pendingClipPercentiles } = this.state;
|
||||||
|
|
||||||
@@ -402,6 +406,8 @@ class MenuBar extends React.Component {
|
|||||||
<InformationMenu
|
<InformationMenu
|
||||||
libraryVersions={libraryVersions}
|
libraryVersions={libraryVersions}
|
||||||
aboutLink={aboutLink}
|
aboutLink={aboutLink}
|
||||||
|
tosURL={tosURL}
|
||||||
|
privacyURL={privacyURL}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React from "react";
|
|||||||
import { Button, Popover, Menu, MenuItem, Position } from "@blueprintjs/core";
|
import { Button, Popover, Menu, MenuItem, Position } from "@blueprintjs/core";
|
||||||
|
|
||||||
function InformationMenu(props) {
|
function InformationMenu(props) {
|
||||||
const { libraryVersions, aboutLink } = props;
|
const { libraryVersions, aboutLink, tosURL, privacyURL } = props;
|
||||||
return (
|
return (
|
||||||
<div style={{}} className="bp3-button-group">
|
<div style={{}} className="bp3-button-group">
|
||||||
<Popover
|
<Popover
|
||||||
@@ -47,6 +47,16 @@ function InformationMenu(props) {
|
|||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
<MenuItem text="MIT License" />
|
<MenuItem text="MIT License" />
|
||||||
|
{tosURL ? <MenuItem
|
||||||
|
href={tosURL}
|
||||||
|
target="_blank"
|
||||||
|
text="Terms of Service"
|
||||||
|
/> : null }
|
||||||
|
{privacyURL ? <MenuItem
|
||||||
|
href={privacyURL}
|
||||||
|
target="_blank"
|
||||||
|
text="Privacy Policy"
|
||||||
|
/> : null }
|
||||||
</Menu>
|
</Menu>
|
||||||
}
|
}
|
||||||
position={Position.BOTTOM_RIGHT}
|
position={Position.BOTTOM_RIGHT}
|
||||||
|
|||||||
Reference in New Issue
Block a user