diff --git a/src/containers/ChannelHeader.js b/src/containers/ChannelHeader.js index fb013b1..655c247 100644 --- a/src/containers/ChannelHeader.js +++ b/src/containers/ChannelHeader.js @@ -21,6 +21,11 @@ function ChannelHeader () { uiStore.openControlPanel() } + function goBack(e){ + e.stopPropagation() + window.location.hash = (window.lastChannel == undefined) ? '#' : '#/channel/'+window.lastChannel + } + const overrideName = t(`viewNames.${location.pathname.slice(1)}`) return useObserver(() => ( @@ -35,6 +40,18 @@ function ChannelHeader () { ) : null}
{channel ? `#${channel}` : overrideName}
+ { + (window.location.hash == '#/settings') ? + ( +
×
+ ) : ( +
+ ) + } )) } diff --git a/src/styles/ChannelHeader.scss b/src/styles/ChannelHeader.scss index 7729403..1909663 100644 --- a/src/styles/ChannelHeader.scss +++ b/src/styles/ChannelHeader.scss @@ -31,6 +31,10 @@ $channel-name-min-height: 1.6em; font-size: 0.7em; cursor: pointer; font-weight: 100; + + &.exit-button{ + font-size: 1em; + } } .currentChannel { diff --git a/src/views/ChannelView.js b/src/views/ChannelView.js index f9d9ae0..ebb96b9 100644 --- a/src/views/ChannelView.js +++ b/src/views/ChannelView.js @@ -19,6 +19,7 @@ const MessageUserProfilePanel = lazy(() => function ChannelView () { const { networkStore } = useContext(RootContext) const { channel } = useParams() + window.lastChannel = (channel == undefined) ? window.lastChannel : channel return useObserver(() => networkStore.isOnline ? (