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 (
-
+
-
- Account Info +
+ {intl.formatMessage(messages.headerPhoto)}
-
+
+
-
-
- - - +
+
+ + + +
+
+ +
-
- -
- -
- - {shortNumberFormat(account.get('followers_count'))}  - {intl.formatMessage(messages.followers)} - - - {shortNumberFormat(account.get('following_count'))}  - {intl.formatMessage(messages.follows)} - -
-
+
-
- -
- -
+
+
-
+ +
+
+
+ Preferences +
+ + +
+
+ +
+
+
+ More +
+ + +
+
+
) @@ -225,7 +210,7 @@ const messages = defineMessages({ followers: { id: 'account.followers', defaultMessage: 'Followers' }, follows: { id: 'account.follows', defaultMessage: 'Following' }, profile: { id: 'account.profile', defaultMessage: 'Profile' }, - preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' }, + settings: { id: 'navigation_bar.settings', defaultMessage: 'Settings' }, follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, @@ -243,6 +228,7 @@ const messages = defineMessages({ display: { id: 'display_options', defaultMessage: 'Display Options' }, proFeed: { id: 'pro_feed', defaultMessage: 'Pro Feed' }, shortcuts: { id: 'shortcuts', defaultMessage: 'Shortcuts' }, + headerPhoto: { id: 'header_photo', defaultMessage: 'Header photo' }, }) const mapStateToProps = (state) => ({ diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css index 0451762a..bcd65a43 100644 --- a/app/javascript/styles/global.css +++ b/app/javascript/styles/global.css @@ -767,6 +767,7 @@ pre { .pt5 { padding-top: 5px; } .pt2 { padding-top: 2px; } +.pb35 { padding-bottom: 35px; } .pb15 { padding-bottom: 15px; } .pb10 { padding-bottom: 10px; } .pb5 { padding-bottom: 5px; }