~cytrogen/masto-fe

6c05ac4068f2c942331458c00bbb8a835f0f56e5 — Stanislas Signoud 2 years ago ac2dae0
[Glitch] Add an explanation banner on switching to single column mode

Port 40b69cc1cd62fa57047905a6999985ae6c183f6c to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
M app/javascript/flavours/glitch/features/ui/components/navigation_panel.jsx => app/javascript/flavours/glitch/features/ui/components/navigation_panel.jsx +8 -3
@@ 29,6 29,7 @@ const messages = defineMessages({
  about: { id: 'navigation_bar.about', defaultMessage: 'About' },
  search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
  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' },
});



@@ 56,9 57,13 @@ class NavigationPanel extends Component {
      <div className='navigation-panel'>
        {transientSingleColumn && (
          <div className='navigation-panel__logo'>
            <a href={`/deck${location.pathname}`} className='button button--block'>
              {intl.formatMessage(messages.advancedInterface)}
            </a>
            <div class='switch-to-advanced'>
              {intl.formatMessage(messages.openedInClassicInterface)}
              {" "}
              <a href={`/deck${location.pathname}`} class='switch-to-advanced__toggle'>
                {intl.formatMessage(messages.advancedInterface)}
              </a>
            </div>
            <hr />
          </div>
        )}

M app/javascript/flavours/glitch/styles/components/columns.scss => app/javascript/flavours/glitch/styles/components/columns.scss +16 -0
@@ 228,6 228,22 @@ $ui-header-height: 55px;
  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 {
  background: lighten($ui-base-color, 8%);
  color: $primary-text-color;