@@ -238,9 +164,8 @@ class ColumnsArea extends ImmutablePureComponent {
- {!navbarUnder &&
}
- {content}
- {navbarUnder &&
}
+
+
{children}
diff --git a/app/javascript/flavours/glitch/features/ui/components/compose_panel.js b/app/javascript/flavours/glitch/features/ui/components/compose_panel.js
index 6e1c51d74b4..894a00747c8 100644
--- a/app/javascript/flavours/glitch/features/ui/components/compose_panel.js
+++ b/app/javascript/flavours/glitch/features/ui/components/compose_panel.js
@@ -34,7 +34,7 @@ class ComposePanel extends React.PureComponent {
)}
-
+
);
}
diff --git a/app/javascript/flavours/glitch/features/ui/components/header.js b/app/javascript/flavours/glitch/features/ui/components/header.js
new file mode 100644
index 00000000000..041bdff0514
--- /dev/null
+++ b/app/javascript/flavours/glitch/features/ui/components/header.js
@@ -0,0 +1,53 @@
+import React from 'react';
+import Logo from 'flavours/glitch/components/logo';
+import { Link } from 'react-router-dom';
+import { FormattedMessage } from 'react-intl';
+import { registrationsOpen, me } from 'flavours/glitch/initial_state';
+import Avatar from 'flavours/glitch/components/avatar';
+import Permalink from 'flavours/glitch/components/permalink';
+import PropTypes from 'prop-types';
+import { connect } from 'react-redux';
+
+const Account = connect(state => ({
+ account: state.getIn(['accounts', me]),
+}))(({ account }) => (
+
+ {account.get('acct')}
+
+
+));
+
+export default class Header extends React.PureComponent {
+
+ static contextTypes = {
+ identity: PropTypes.object,
+ };
+
+ render () {
+ const { signedIn } = this.context.identity;
+
+ let content;
+
+ if (signedIn) {
+ content =
;
+ } else {
+ content = (
+
+
+
+
+ );
+ }
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js
index 39576f17b45..cd32c8a3db6 100644
--- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js
+++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js
@@ -3,8 +3,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import { Link } from 'react-router-dom';
-import { limitedFederationMode, version, repository, source_url, profile_directory as profileDirectory } from 'flavours/glitch/initial_state';
-import { signOutLink, securityLink, privacyPolicyLink } from 'flavours/glitch/utils/backend_links';
+import { version, repository, source_url, profile_directory as profileDirectory } from 'flavours/glitch/initial_state';
import { logOut } from 'flavours/glitch/utils/log_out';
import { openModal } from 'flavours/glitch/actions/modal';
import { PERMISSION_INVITE_USERS } from 'flavours/glitch/permissions';
@@ -34,7 +33,6 @@ class LinkFooter extends React.PureComponent {
};
static propTypes = {
- withHotkeys: PropTypes.bool,
onLogout: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
};
@@ -49,44 +47,26 @@ class LinkFooter extends React.PureComponent {
}
render () {
- const { withHotkeys } = this.props;
const { signedIn, permissions } = this.context.identity;
-
const items = [];
- if ((this.context.identity.permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS) {
- items.push(
);
- }
-
- if (signedIn && withHotkeys) {
- items.push(
);
- }
-
- if (signedIn && securityLink) {
- items.push(
);
- }
-
- if (!limitedFederationMode) {
- items.push(
);
- }
+ items.push(
);
+ items.push(
);
+ items.push(
);
+ items.push(
);
+ items.push(
);
+ items.push(
);
if (profileDirectory) {
- items.push(
);
- }
-
- items.push(
);
-
- if (privacyPolicyLink) {
- items.push(
);
+ items.push(
);
}
if (signedIn) {
- items.push(
);
- }
+ if ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS) {
+ items.push(
);
+ }
- items.push(
);
-
- if (signedIn) {
+ items.push(
);
items.push(
);
}
diff --git a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js
index 57fbfb285a3..cb884ec7515 100644
--- a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js
+++ b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js
@@ -42,10 +42,10 @@ export default class NavigationPanel extends React.Component {
{!signedIn && (
-
+
-
+
)}
{signedIn && (
@@ -64,6 +64,11 @@ export default class NavigationPanel extends React.Component {
)}
+
+
+
+
+
{showTrends && (
diff --git a/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js b/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js
deleted file mode 100644
index 9c82fc91d3a..00000000000
--- a/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { NavLink, withRouter } from 'react-router-dom';
-import { FormattedMessage, injectIntl } from 'react-intl';
-import { debounce } from 'lodash';
-import { isUserTouching } from 'flavours/glitch/is_mobile';
-import Icon from 'flavours/glitch/components/icon';
-import NotificationsCounterIcon from './notifications_counter_icon';
-
-export const links = [
- ,
- ,
- ,
- ,
- ,
- ,
-];
-
-export function getIndex (path) {
- return links.findIndex(link => link.props.to === path);
-}
-
-export function getLink (index) {
- return links[index].props.to;
-}
-
-export default @injectIntl
-@withRouter
-class TabsBar extends React.PureComponent {
-
- static propTypes = {
- intl: PropTypes.object.isRequired,
- history: PropTypes.object.isRequired,
- }
-
- setRef = ref => {
- this.node = ref;
- }
-
- handleClick = (e) => {
- // Only apply optimization for touch devices, which we assume are slower
- // We thus avoid the 250ms delay for non-touch devices and the lag for touch devices
- if (isUserTouching()) {
- e.preventDefault();
- e.persist();
-
- requestAnimationFrame(() => {
- const tabs = Array(...this.node.querySelectorAll('.tabs-bar__link'));
- const currentTab = tabs.find(tab => tab.classList.contains('active'));
- const nextTab = tabs.find(tab => tab.contains(e.target));
- const { props: { to } } = links[Array(...this.node.childNodes).indexOf(nextTab)];
-
-
- if (currentTab !== nextTab) {
- if (currentTab) {
- currentTab.classList.remove('active');
- }
-
- const listener = debounce(() => {
- nextTab.removeEventListener('transitionend', listener);
- this.props.history.push(to);
- }, 50);
-
- nextTab.addEventListener('transitionend', listener);
- nextTab.classList.add('active');
- }
- });
- }
-
- }
-
- render () {
- const { intl: { formatMessage } } = this.props;
-
- return (
-
-
- {links.map(link => React.cloneElement(link, { key: link.props.to, onClick: this.handleClick, 'aria-label': formatMessage({ id: link.props['data-preview-title-id'] }) }))}
-
-
-
-
- );
- }
-
-}
diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js
index c8cc905e7b3..8ea7a0b028f 100644
--- a/app/javascript/flavours/glitch/features/ui/index.js
+++ b/app/javascript/flavours/glitch/features/ui/index.js
@@ -52,12 +52,14 @@ import {
Directory,
Explore,
FollowRecommendations,
+ About,
} from './util/async-components';
import { HotKeys } from 'react-hotkeys';
import { me, title } from 'flavours/glitch/initial_state';
import { closeOnboarding, INTRODUCTION_VERSION } from 'flavours/glitch/actions/onboarding';
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
import { Helmet } from 'react-helmet';
+import Header from './components/header';
// Dummy import, to make sure that ends up in the application bundle.
// Without this it ends up in ~8 very commonly used bundles.
@@ -183,6 +185,7 @@ class SwitchingColumnsArea extends React.PureComponent {
+
@@ -652,6 +655,9 @@ class UI extends React.Component {
)}}
/>
)}
+
+