mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 09:18:12 +08:00
Login / Logout button (#1718)
* first pass auth button * only pop anno dialogue if authenticated * add config to ignore * remove config
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
@connect((state) => ({
|
||||
idhash: state.config?.parameters?.["annotations-user-data-idhash"] ?? null,
|
||||
annotations: state.annotations,
|
||||
auth: state.config?.authentication,
|
||||
writableCategoriesEnabled: state.config?.parameters?.annotations ?? false,
|
||||
}))
|
||||
class FilenameDialog extends React.Component {
|
||||
@@ -90,12 +91,13 @@ class FilenameDialog extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { writableCategoriesEnabled, annotations, idhash } = this.props;
|
||||
const { writableCategoriesEnabled, annotations, idhash, auth } = this.props;
|
||||
const { filenameText } = this.state;
|
||||
|
||||
return writableCategoriesEnabled &&
|
||||
!annotations.dataCollectionNameIsReadOnly &&
|
||||
!annotations.dataCollectionName ? (
|
||||
!annotations.dataCollectionName &&
|
||||
auth.is_authenticated ? (
|
||||
<Dialog
|
||||
icon="tag"
|
||||
title="Annotations Collection"
|
||||
|
||||
Reference in New Issue
Block a user