diff --git a/client/src/components/categorical/index.js b/client/src/components/categorical/index.js index 5003ab8c..63db6cac 100644 --- a/client/src/components/categorical/index.js +++ b/client/src/components/categorical/index.js @@ -187,7 +187,7 @@ class Categories extends React.Component { {allCategoryNames.map((catName) => !schema.annotations.obsByName[catName].writable && (schema.annotations.obsByName[catName].categories?.length > 1 || - !schema.annotations.obsByName[catName].categories) ? ( + !schema.annotations.obsByName[catName].categories) ? ( ({ datasetTitle: state.config?.displayNames?.dataset ?? "", + auth: state.config?.authentication, + userinfo: state.userinfo, + libraryVersions: state.config?.["library_versions"], + aboutLink: state.config?.links?.["about-dataset"], + tosURL: state.config?.parameters?.["about_legal_tos"], + privacyURL: state.config?.parameters?.["about_legal_privacy"], })) class LeftSideBar extends React.Component { handleClick = () => { @@ -20,7 +28,16 @@ class LeftSideBar extends React.Component { }; render() { - const { datasetTitle } = this.props; + const { + datasetTitle, + auth, + userinfo, + libraryVersions, + aboutLink, + privacyURL, + tosURL, + dispatch, + } = this.props; return (
- - - cell +
+ - × - - gene - - - + gene + +
+
+ + + + {!userinfo.is_authenticated ? ( + + ) : null} +
); } diff --git a/client/src/components/menubar/authButtons.js b/client/src/components/menubar/authButtons.js index 9eaa3ba5..985b3da3 100644 --- a/client/src/components/menubar/authButtons.js +++ b/client/src/components/menubar/authButtons.js @@ -11,7 +11,7 @@ const Auth = React.memo((props) => { return ( @@ -19,7 +19,6 @@ const Auth = React.memo((props) => { type="button" data-testid="auth-button" disabled={false} - icon={!userinfo.is_authenticated ? "log-in" : "log-out"} href={!userinfo.is_authenticated ? auth.login : auth.logout} > {!userinfo.is_authenticated ? "Log In" : "Log Out"} diff --git a/client/src/components/menubar/index.js b/client/src/components/menubar/index.js index 3fd840c0..b4271302 100644 --- a/client/src/components/menubar/index.js +++ b/client/src/components/menubar/index.js @@ -6,8 +6,7 @@ import * as globals from "../../globals"; import styles from "./menubar.css"; import actions from "../../actions"; import Clip from "./clip"; -import AuthButtons from "./authButtons"; -import InformationMenu from "./infoMenu"; + import Subset from "./subset"; import UndoRedoReset from "./undoRedo"; import DiffexpButtons from "./diffexpButtons"; @@ -204,7 +203,6 @@ class MenuBar extends React.PureComponent { render() { const { dispatch, - libraryVersions, disableDiffexp, undoDisabled, redoDisabled, @@ -212,17 +210,12 @@ class MenuBar extends React.PureComponent { clipPercentileMin, clipPercentileMax, graphInteractionMode, - aboutLink, showCentroidLabels, - privacyURL, - tosURL, categoricalSelection, colorAccessor, subsetPossible, subsetResetPossible, enableReembedding, - auth, - userinfo, } = this.props; const { pendingClipPercentiles } = this.state; @@ -248,10 +241,6 @@ class MenuBar extends React.PureComponent { zIndex: 3, }} > - - { @@ -16,7 +16,14 @@ const handleClick = (dispatch) => { }; const InformationMenu = React.memo((props) => { - const { libraryVersions, tosURL, privacyURL, dispatch } = props; + const { + libraryVersions, + tosURL, + privacyURL, + auth, + userinfo, + dispatch, + } = props; return ( { handleClick(dispatch)} - icon={IconNames.INFO_SIGN} + icon="info-sign" text="Dataset Overview" /> { href={privacyURL} target="_blank" text="Privacy Policy" + rel="noopener" /> ) : null} + + {auth?.["requires_client_login"] && + userinfo?.["is_authenticated"] ? ( + <> + + + + ) : null} } position={Position.BOTTOM_RIGHT} + modifiers={{ + preventOverflow: { enabled: false }, + hide: { enabled: false }, + }} >