diff --git a/app/soapbox/components/sub_navigation.js b/app/soapbox/components/sub_navigation.js
index abaceedfa..063448b5c 100644
--- a/app/soapbox/components/sub_navigation.js
+++ b/app/soapbox/components/sub_navigation.js
@@ -73,9 +73,9 @@ class SubNavigation extends React.PureComponent {
handleScroll = throttle(() => {
if (this.node) {
- const { top } = this.node.getBoundingClientRect();
+ const { offsetTop } = this.node;
- if (top <= 50) {
+ if (offsetTop > 0) {
this.setState({ scrolled: true });
} else {
this.setState({ scrolled: false });
diff --git a/app/soapbox/features/account_timeline/components/column_settings.js b/app/soapbox/features/account_timeline/components/column_settings.js
index 7836c01f0..130cb47db 100644
--- a/app/soapbox/features/account_timeline/components/column_settings.js
+++ b/app/soapbox/features/account_timeline/components/column_settings.js
@@ -1,38 +1,59 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
-import { injectIntl, FormattedMessage } from 'react-intl';
+import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
+import IconButton from 'soapbox/components/icon_button';
import SettingToggle from '../../notifications/components/setting_toggle';
+const messages = defineMessages({
+ close: { id: 'lightbox.close', defaultMessage: 'Close' },
+});
+
export default @injectIntl
class ColumnSettings extends React.PureComponent {
static propTypes = {
+ intl: PropTypes.object.isRequired,
settings: ImmutablePropTypes.map.isRequired,
onChange: PropTypes.func.isRequired,
- intl: PropTypes.object.isRequired,
+ onClose: PropTypes.func.isRequired,
};
render() {
- const { settings, onChange } = this.props;
+ const { intl, settings, onChange, onClose } = this.props;
return (
-
-
-
}
- />
-
}
- />
+
+
+
+
+
+
+
+
+
+ }
+ />
+ }
+ />
+
);
diff --git a/app/soapbox/features/account_timeline/index.js b/app/soapbox/features/account_timeline/index.js
index 003ab8dda..4d4d916ea 100644
--- a/app/soapbox/features/account_timeline/index.js
+++ b/app/soapbox/features/account_timeline/index.js
@@ -8,7 +8,8 @@ import Icon from 'soapbox/components/icon';
import StatusList from '../../components/status_list';
import LoadingIndicator from '../../components/loading_indicator';
import Column from '../ui/components/column';
-import ColumnSettingsContainer from './containers/column_settings_container';
+// import ColumnSettingsContainer from './containers/column_settings_container';
+import SubNavigation from 'soapbox/components/sub_navigation';
import { OrderedSet as ImmutableOrderedSet } from 'immutable';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
@@ -19,7 +20,6 @@ import { fetchPatronAccount } from '../../actions/patron';
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import { getSettings } from 'soapbox/actions/settings';
import { makeGetStatusIds, findAccountByUsername } from 'soapbox/selectors';
-import classNames from 'classnames';
const makeMapStateToProps = () => {
const getStatusIds = makeGetStatusIds();
@@ -146,7 +146,6 @@ class AccountTimeline extends ImmutablePureComponent {
render() {
const { statusIds, featuredStatusIds, isLoading, hasMore, isBlocked, isAccount, accountId, unavailable, accountUsername } = this.props;
- const { collapsed, animating } = this.state;
if (!isAccount && accountId !== -1) {
return (
@@ -176,7 +175,8 @@ class AccountTimeline extends ImmutablePureComponent {
}
return (
-
+
+
@@ -193,11 +193,6 @@ class AccountTimeline extends ImmutablePureComponent {
-
-
- {(!collapsed || animating) && }
-
-
- {account &&
+ {account ? (
<>
+
+ 0,
+ })}
+ count={notificationCount}
+ />
+
+
+
+ {features.chats && (
+
+
+
+
+ )}
+
+ {isStaff(account) && (
+
+
+
+
+ )}
+
@@ -87,9 +128,7 @@ class TabsBar extends React.PureComponent {
{intl.formatMessage(messages.post)}
>
- }
- {
- !account &&
+ ) : (
@@ -98,7 +137,7 @@ class TabsBar extends React.PureComponent {
- }
+ )}
@@ -109,10 +148,17 @@ class TabsBar extends React.PureComponent {
const mapStateToProps = state => {
const me = state.get('me');
+ const reportsCount = state.getIn(['admin', 'openReports']).count();
+ const approvalCount = state.getIn(['admin', 'awaitingApproval']).count();
+ const instance = state.get('instance');
return {
account: state.getIn(['accounts', me]),
logo: getSoapboxConfig(state).get('logo'),
+ features: getFeatures(instance),
+ notificationCount: state.getIn(['notifications', 'unread']),
+ chatsCount: state.get('chats').reduce((acc, curr) => acc + Math.min(curr.get('unread', 0), 1), 0),
+ dashboardCount: reportsCount + approvalCount,
};
};
diff --git a/app/styles/components/account-header.scss b/app/styles/components/account-header.scss
index 401e3fcc5..69902227c 100644
--- a/app/styles/components/account-header.scss
+++ b/app/styles/components/account-header.scss
@@ -335,3 +335,9 @@
}
}
}
+
+@media (min-width: 896px) {
+ .account-timeline .sub-navigation {
+ top: 134px;
+ }
+}
diff --git a/app/styles/components/columns.scss b/app/styles/components/columns.scss
index 61c3ab489..36b172599 100644
--- a/app/styles/components/columns.scss
+++ b/app/styles/components/columns.scss
@@ -625,6 +625,12 @@
overflow-y: auto;
}
+ &__description {
+ font-size: 14px;
+ margin: 5px 0 15px;
+ color: var(--primary-text-color--faint);
+ }
+
&__close {
display: flex;
align-items: center;
@@ -949,3 +955,7 @@
.column .explanation-box {
background: var(--foreground-color);
}
+
+.sub-navigation + .account__section-headline {
+ background: var(--foreground-color);
+}
diff --git a/app/styles/components/icon.scss b/app/styles/components/icon.scss
index 40b55cdda..3514ab03a 100644
--- a/app/styles/components/icon.scss
+++ b/app/styles/components/icon.scss
@@ -25,14 +25,14 @@
svg.icon-tabler-bell,
svg.icon-tabler-messages {
path:nth-child(2) {
- fill: var(--primary-text-color);
+ fill: currentColor;
}
}
svg.icon-tabler-users {
circle,
circle + path {
- fill: var(--primary-text-color);
+ fill: currentColor;
}
}
@@ -40,8 +40,8 @@
stroke: var(--background-color);
rect {
- fill: var(--primary-text-color);
- stroke: var(--primary-text-color);
+ fill: currentColor;
+ stroke: currentColor;
}
}
}
diff --git a/app/styles/components/tabs-bar.scss b/app/styles/components/tabs-bar.scss
index a0226aef8..0a14c211a 100644
--- a/app/styles/components/tabs-bar.scss
+++ b/app/styles/components/tabs-bar.scss
@@ -8,7 +8,7 @@
width: 100%;
position: sticky;
top: 0;
- z-index: 1000;
+ z-index: 1100;
transition: transform 0.2s ease;
&--collapsed {
@@ -142,11 +142,13 @@
}
.theme-toggle {
- @media screen and (max-width: $nav-breakpoint-3) { display: none; }
+ margin-left: 20px;
+
+ @media screen and (max-width: $nav-breakpoint-3) {
+ display: none;
+ }
.setting-toggle {
- margin-left: 10px;
-
.react-toggle-track {
background-color: var(--foreground-color);
}
@@ -168,7 +170,6 @@
.tabs-bar__link {
display: flex;
flex: 1 1 auto;
- margin: 0 20px 0 0;
color: #fff;
text-decoration: none;
position: relative;
@@ -183,14 +184,18 @@
width: 36px;
margin: 4px 4px 0 0;
justify-content: center;
-
- & > span { display: none; }
+ display: none;
}
> span {
font-size: 15px;
line-height: 50px;
margin-left: 4px;
+ display: none;
+ }
+
+ & + & {
+ margin-left: 20px;
}
&--search {
@@ -199,28 +204,12 @@
}
}
- i.fa {
- font-size: 14px;
- transform: translate(-1px, -1px);
- transition: 0.1s;
+ .svg-icon {
+ width: 22px;
+ height: 22px;
- @media screen and (max-width: 895px) {
- font-size: 20px;
- }
-
- &.fa-home {
- font-size: 18px;
- transform: translate(-1px, -2px);
-
- @media screen and (max-width: 895px) {
- font-size: 26px;
- }
- }
- }
-
- .icon-with-counter__counter {
- @media screen and (min-width: 896px) {
- left: 5px;
+ svg.icon-tabler {
+ stroke-width: 1.5px;
}
}
@@ -244,8 +233,8 @@
height: 15px;
border-radius: 999px;
z-index: -1;
- width: calc(100% + 20px);
- margin-left: -12px;
+ width: calc(100% + 12px);
+ margin-left: -9px;
@media screen and (max-width: 895px) {
height: 0;
@@ -339,3 +328,7 @@
}
}
}
+
+.tabs-bar__link + .tabs-bar__profile {
+ margin-left: 20px;
+}
diff --git a/app/styles/ui.scss b/app/styles/ui.scss
index f47c10f87..62aba1510 100644
--- a/app/styles/ui.scss
+++ b/app/styles/ui.scss
@@ -346,10 +346,11 @@
width: 100%;
&__top {
+ @include standard-panel-shadow;
display: flex;
width: 100%;
height: auto;
- z-index: 105;
+ z-index: 1000;
background: var(--foreground-color);
@media (min-width: 896px) {