0
0
Fork 0

Add logged-out access to the web UI (#18961)

This commit is contained in:
Eugen Rochko 2022-09-29 04:39:33 +02:00 committed by GitHub
parent 1a5150e9c3
commit 43b5d5e38d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 423 additions and 145 deletions

View file

@ -10,6 +10,10 @@ import { changeComposing } from 'mastodon/actions/compose';
export default @connect()
class ComposePanel extends React.PureComponent {
static contextTypes = {
identity: PropTypes.object.isRequired,
};
static propTypes = {
dispatch: PropTypes.func.isRequired,
};
@ -23,11 +27,25 @@ class ComposePanel extends React.PureComponent {
}
render() {
const { signedIn } = this.context.identity;
return (
<div className='compose-panel' onFocus={this.onFocus}>
<SearchContainer openInRoute />
<NavigationContainer onClose={this.onBlur} />
<ComposeFormContainer singleColumn />
{!signedIn && (
<React.Fragment>
<div className='flex-spacer' />
</React.Fragment>
)}
{signedIn && (
<React.Fragment>
<NavigationContainer onClose={this.onBlur} />
<ComposeFormContainer singleColumn />
</React.Fragment>
)}
<LinkFooter withHotkeys />
</div>
);