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 --- .../glitch/features/account/components/header.js | 7 +++- .../features/account_timeline/components/header.js | 3 ++ .../account_timeline/components/moved_note.js | 48 ++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 app/javascript/flavours/glitch/features/account_timeline/components/moved_note.js (limited to 'app/javascript/flavours/glitch/features') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index f346bd108..1170bdb49 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -10,6 +10,7 @@ import IconButton from 'flavours/glitch/components/icon_button'; import emojify from 'flavours/glitch/util/emoji'; import { me } from 'flavours/glitch/util/initial_state'; import { processBio } from 'flavours/glitch/util/bio_metadata'; +import classNames from 'classnames'; const messages = defineMessages({ unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' }, @@ -75,11 +76,15 @@ export default class Header extends ImmutablePureComponent { } } + if (account.get('moved')) { + actionBtn = ''; + } + const { text, metadata } = processBio(account.get('note')); 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 From b5948044b31c548de15337dcdca35b4c894224c0 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Thu, 29 Mar 2018 14:46:00 +0200 Subject: [Glitch] Display unfollow button even if account moved Backport 3987bd18a4bfaee49ea9a3439fc51610aeca6c2c to glitch-soc --- app/javascript/flavours/glitch/components/account.js | 2 +- app/javascript/flavours/glitch/features/account/components/header.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/features') diff --git a/app/javascript/flavours/glitch/components/account.js b/app/javascript/flavours/glitch/components/account.js index df17f1897..80f20b8ad 100644 --- a/app/javascript/flavours/glitch/components/account.js +++ b/app/javascript/flavours/glitch/components/account.js @@ -99,7 +99,7 @@ export default class Account extends ImmutablePureComponent { {hidingNotificationsButton} ); - } else if (!account.get('moved')) { + } else if (!account.get('moved') || following) { buttons = ; } } diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 1170bdb49..a208f1a8e 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -76,7 +76,7 @@ export default class Header extends ImmutablePureComponent { } } - if (account.get('moved')) { + if (account.get('moved') && !account.getIn(['relationship', 'following'])) { actionBtn = ''; } -- cgit