[feature] Add logout button to sidebar (#48)
This one should probably be scrutinized a little more than my previous two. For example, I don't know why I needed to do this: https://codeberg.org/prplecake/masto-fe-standalone/src/commit/1a1f48ceaa544650a8b8f50f8fa4e8c7cdc44c12/app/javascript/flavours/glitch/features/ui/index.jsx#L152 ~~But, it appears to work.~~ It's live at https://masto-fe.compostintraining.club if you want to test it out. ~~Edit: it breaks stuff. Images don't load anymore...~~ Maybe that was just a network glitch... Fixes #21. Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/48 Co-authored-by: prplecake <me@prplecake.com> Co-committed-by: prplecake <me@prplecake.com>
This commit is contained in:
@@ -55,6 +55,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
|
||||
singleColumn: PropTypes.bool,
|
||||
children: PropTypes.node,
|
||||
openSettings: PropTypes.func,
|
||||
onLogout: PropTypes.func,
|
||||
};
|
||||
|
||||
// Corresponds to (max-width: $no-gap-breakpoint + 285px - 1px) in SCSS
|
||||
@@ -139,7 +140,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
|
||||
};
|
||||
|
||||
render () {
|
||||
const { columns, children, singleColumn, openSettings } = this.props;
|
||||
const { columns, children, singleColumn, openSettings, onLogout } = this.props;
|
||||
const { renderComposePanel } = this.state;
|
||||
|
||||
if (singleColumn) {
|
||||
@@ -158,7 +159,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
|
||||
|
||||
<div className='columns-area__panels__pane columns-area__panels__pane--start columns-area__panels__pane--navigational'>
|
||||
<div className='columns-area__panels__pane__inner'>
|
||||
<NavigationPanel onOpenSettings={openSettings} />
|
||||
<NavigationPanel onOpenSettings={openSettings} onLogout={onLogout} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user