Skip to content

Commit

Permalink
Merge pull request #2447 from ClearlyClaire/glitch-soc/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream changes up to 126cd77
  • Loading branch information
ClearlyClaire authored Oct 21, 2023
2 parents 1c53aec + 5d9df17 commit 18eacc7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ class NavigationPanel extends Component {
const { intl, onOpenSettings } = this.props;
const { signedIn, disabledAccountId } = this.context.identity;

let banner = undefined;

if(transientSingleColumn)
banner = (<div className='switch-to-advanced'>
{intl.formatMessage(messages.openedInClassicInterface)}
{" "}
<a href={`/deck${location.pathname}`} className='switch-to-advanced__toggle'>
{intl.formatMessage(messages.advancedInterface)}
</a>
</div>);

return (
<div className='navigation-panel'>
{transientSingleColumn && (
<div className='navigation-panel__logo'>
<div className='switch-to-advanced'>
{intl.formatMessage(messages.openedInClassicInterface)}
{" "}
<a href={`/deck${location.pathname}`} className='switch-to-advanced__toggle'>
{intl.formatMessage(messages.advancedInterface)}
</a>
</div>
<hr />
</div>
)}
{banner}

{signedIn && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@

.navigation-panel__sign-in-banner,
.navigation-panel__logo,
.navigation-panel__banner,
.getting-started__trends {
display: none;
}
Expand Down
30 changes: 18 additions & 12 deletions app/javascript/mastodon/features/ui/components/navigation_panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,30 @@ class NavigationPanel extends Component {
const { intl } = this.props;
const { signedIn, disabledAccountId } = this.context.identity;

let banner = undefined;

if(transientSingleColumn)
banner = (<div className='switch-to-advanced'>
{intl.formatMessage(messages.openedInClassicInterface)}
{" "}
<a href={`/deck${location.pathname}`} className='switch-to-advanced__toggle'>
{intl.formatMessage(messages.advancedInterface)}
</a>
</div>);

return (
<div className='navigation-panel'>
<div className='navigation-panel__logo'>
<Link to='/' className='column-link column-link--logo'><WordmarkLogo /></Link>

{transientSingleColumn ? (
<div className='switch-to-advanced'>
{intl.formatMessage(messages.openedInClassicInterface)}
{" "}
<a href={`/deck${location.pathname}`} className='switch-to-advanced__toggle'>
{intl.formatMessage(messages.advancedInterface)}
</a>
</div>
) : (
<hr />
)}
{!banner && <hr />}
</div>

{banner &&
<div class='navigation-panel__banner'>
{banner}
</div>
}

{signedIn && (
<>
<ColumnLink transparent to='/home' icon='home' text={intl.formatMessage(messages.home)} />
Expand Down
1 change: 1 addition & 0 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,7 @@ $ui-header-height: 55px;

.navigation-panel__sign-in-banner,
.navigation-panel__logo,
.navigation-panel__banner,
.getting-started__trends {
display: none;
}
Expand Down

0 comments on commit 18eacc7

Please sign in to comment.