[Glitch] Add an explanation banner on switching to single column mode

Port 2c0eaf50f6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
th-downstream
Stanislas Signoud 1 year ago committed by Claire
parent 432bd89f72
commit f7e8c8033f

@ -29,6 +29,7 @@ const messages = defineMessages({
about: { id: 'navigation_bar.about', defaultMessage: 'About' }, about: { id: 'navigation_bar.about', defaultMessage: 'About' },
search: { id: 'navigation_bar.search', defaultMessage: 'Search' }, search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
advancedInterface: { id: 'navigation_bar.advanced_interface', defaultMessage: 'Open in advanced web interface' }, advancedInterface: { id: 'navigation_bar.advanced_interface', defaultMessage: 'Open in advanced web interface' },
openedInClassicInterface: { id: 'navigation_bar.opened_in_classic_interface', defaultMessage: 'Posts, accounts, and other specific pages are opened by default in the classic web interface.' },
app_settings: { id: 'navigation_bar.app_settings', defaultMessage: 'App settings' }, app_settings: { id: 'navigation_bar.app_settings', defaultMessage: 'App settings' },
}); });
@ -56,9 +57,13 @@ class NavigationPanel extends Component {
<div className='navigation-panel'> <div className='navigation-panel'>
{transientSingleColumn && ( {transientSingleColumn && (
<div className='navigation-panel__logo'> <div className='navigation-panel__logo'>
<a href={`/deck${location.pathname}`} className='button button--block'> <div class='switch-to-advanced'>
{intl.formatMessage(messages.openedInClassicInterface)}
{" "}
<a href={`/deck${location.pathname}`} class='switch-to-advanced__toggle'>
{intl.formatMessage(messages.advancedInterface)} {intl.formatMessage(messages.advancedInterface)}
</a> </a>
</div>
<hr /> <hr />
</div> </div>
)} )}

@ -228,6 +228,22 @@ $ui-header-height: 55px;
top: -48px; top: -48px;
} }
.switch-to-advanced {
color: $classic-primary-color;
background-color: $classic-base-color;
padding: 15px;
border-radius: 4px;
margin-top: 4px;
margin-bottom: 12px;
font-size: 13px;
line-height: 18px;
.switch-to-advanced__toggle {
color: $ui-button-tertiary-color;
font-weight: bold;
}
}
.column-link { .column-link {
background: lighten($ui-base-color, 8%); background: lighten($ui-base-color, 8%);
color: $primary-text-color; color: $primary-text-color;

Loading…
Cancel
Save