From f5446783b8b9fc87ef7b4682a1f2003d9d640699 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Tue, 6 Oct 2020 19:47:34 -0400 Subject: [PATCH] Updated mobile slide out sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - mobile slide out sidebar --- .../gabsocial/components/sidebar_xs.js | 258 +++++++++--------- app/javascript/styles/global.css | 1 + 2 files changed, 123 insertions(+), 136 deletions(-) diff --git a/app/javascript/gabsocial/components/sidebar_xs.js b/app/javascript/gabsocial/components/sidebar_xs.js index 724001fa..c4e8061d 100644 --- a/app/javascript/gabsocial/components/sidebar_xs.js +++ b/app/javascript/gabsocial/components/sidebar_xs.js @@ -10,6 +10,7 @@ import Avatar from './avatar' import DisplayName from './display_name' import Button from './button' import Heading from './heading' +import Image from './image' import Text from './text' import List from './list' import { closeSidebar } from '../actions/sidebar' @@ -47,93 +48,6 @@ class SidebarXS extends ImmutablePureComponent { const acct = account.get('acct') const isPro = account.get('is_pro') - const mainItems = [ - { - to: `/${acct}`, - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.profile), - }, - { - icon: 'list', - to: '/lists', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.lists), - }, - { - icon: 'star', - to: '/shortcuts', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.shortcuts), - }, - { - icon: 'pro', - href: 'https://pro.gab.com', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.pro), - }, - { - icon: 'shop', - href: 'https://shop.dissenter.com', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.shop), - }, - { - icon: 'search', - to: '/search', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.search), - }, - { - icon: 'explore', - to: '/timeline/pro', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.proFeed), - }, - { - icon: 'cog', - href: '/settings/preferences', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.preferences), - }, - // { - // icon: 'group', - // to: '/follow_requests', - // onClick: this.handleSidebarClose, - // title: intl.formatMessage(messages.follow_requests), - // }, - { - icon: 'block', - to: '/settings/blocks', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.blocks), - }, - { - icon: 'audio-mute', - to: '/settings/mutes', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.mutes), - }, - // { - // icon: 'report', - // to: '/filters', - // onClick: this.handleSidebarClose, - // title: intl.formatMessage(messages.filters), - // }, - { - onClick: this.props.onOpenDisplayModel, //on open display model - title: intl.formatMessage(messages.display), - }, - { - href: 'https://help.gab.com', - onClick: this.handleSidebarClose, - title: intl.formatMessage(messages.help), - }, - { - href: '/auth/sign_out', - title: intl.formatMessage(messages.logout), - }, - ] - const containerClasses = CX({ d: 1, posFixed: 1, @@ -148,72 +62,143 @@ class SidebarXS extends ImmutablePureComponent { return (