From a59c146bf866e28840db37ffe9cfa9759a6497ad Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Thu, 29 Mar 2018 14:43:20 +0200 Subject: [Glitch] Profile redirect notes Port WebUI changes from 58cede4808baa4db6cc143b80ef23e8179a8415b --- .../features/account_timeline/components/header.js | 3 ++ .../account_timeline/components/moved_note.js | 48 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 app/javascript/flavours/glitch/features/account_timeline/components/moved_note.js (limited to 'app/javascript/flavours/glitch/features/account_timeline/components') diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/header.js b/app/javascript/flavours/glitch/features/account_timeline/components/header.js index 43fa68ce2..e788ea660 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/header.js +++ b/app/javascript/flavours/glitch/features/account_timeline/components/header.js @@ -7,6 +7,7 @@ import MissingIndicator from 'flavours/glitch/components/missing_indicator'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import { NavLink } from 'react-router-dom'; +import MovedNote from './moved_note'; export default class Header extends ImmutablePureComponent { @@ -76,6 +77,8 @@ export default class Header extends ImmutablePureComponent { return (
+ {account.get('moved') && } + { + if (e.button === 0) { + e.preventDefault(); + this.context.router.history.push(`/accounts/${this.props.to.get('id')}`); + } + + e.stopPropagation(); + } + + render () { + const { from, to } = this.props; + const displayNameHtml = { __html: from.get('display_name_html') }; + + return ( +
+
+
+ }} /> +
+ + +
+ +
+
+ ); + } + +} -- cgit