From cf142e85569be5e7e0dae7e02f490c737a238319 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Thu, 13 Sep 2018 11:20:21 +0200 Subject: [Glitch] Highlight active tab in action bar Port 7b7c26063e3fcf9e75a61780d81bd60b7c398ead to glitch-soc --- .../glitch/features/account/components/action_bar.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/javascript/flavours/glitch/features/account/components') diff --git a/app/javascript/flavours/glitch/features/account/components/action_bar.js b/app/javascript/flavours/glitch/features/account/components/action_bar.js index 26717ee49..e60b25855 100644 --- a/app/javascript/flavours/glitch/features/account/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/account/components/action_bar.js @@ -2,7 +2,7 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container'; -import { Link } from 'react-router-dom'; +import { NavLink } from 'react-router-dom'; import { defineMessages, injectIntl, FormattedMessage, FormattedNumber } from 'react-intl'; import { me, isStaff } from 'flavours/glitch/util/initial_state'; @@ -136,20 +136,20 @@ export default class ActionBar extends React.PureComponent {
- + - + - + - + - + - +
-- cgit From c1701ae2a837d7e6a59fc98d800a4c67fc4adaa8 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 21 Sep 2018 07:17:44 +0200 Subject: [Glitch] Fix “Toots” tab highlighting for replies and media timelines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port front-end changes from f8b54d229f70cb726511bcd35e1440618e487672 --- .../flavours/glitch/features/account/components/action_bar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features/account/components') diff --git a/app/javascript/flavours/glitch/features/account/components/action_bar.js b/app/javascript/flavours/glitch/features/account/components/action_bar.js index e60b25855..3d6eeb06a 100644 --- a/app/javascript/flavours/glitch/features/account/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/account/components/action_bar.js @@ -52,6 +52,13 @@ export default class ActionBar extends React.PureComponent { }); } + isStatusesPageActive = (match, location) => { + if (!match) { + return false; + } + return !location.pathname.match(/\/(followers|following)\/?$/); + } + render () { const { account, intl } = this.props; @@ -136,7 +143,7 @@ export default class ActionBar extends React.PureComponent {
- + -- cgit From 5833cc41c2a3e53332968dbeed384f565472eba4 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 21 Sep 2018 07:25:46 +0200 Subject: [Glitch] Add edit profile action button to profile Port some parts from 1a7a74ff76a129031a3fd6d73688ab9409899002 --- .../flavours/glitch/features/account/components/header.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/javascript/flavours/glitch/features/account/components') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index eda0d637e..9cf2e9131 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -15,6 +15,7 @@ const messages = defineMessages({ follow: { id: 'account.follow', defaultMessage: 'Follow' }, requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' }, unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' }, + edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' }, }); @injectIntl @@ -27,6 +28,10 @@ export default class Header extends ImmutablePureComponent { intl: PropTypes.object.isRequired, }; + openEditProfile = () => { + window.open('/settings/profile', '_blank'); + } + render () { const { account, intl } = this.props; @@ -77,6 +82,12 @@ export default class Header extends ImmutablePureComponent {
); } + } else { + actionBtn = ( +
+ +
+ ); } if (account.get('moved') && !account.getIn(['relationship', 'following'])) { -- cgit From 9e8d776a77731598c1ad57c5d61d8c74dc04b5a4 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 21 Sep 2018 07:37:37 +0200 Subject: [Glitch] Display verified links in glitch flavor Port front-end changes from f4d549d30081478b1fe2bde9d340262e132bb891 to glitch-soc --- .../glitch/features/account/components/header.js | 14 +++++++++++++- .../flavours/glitch/styles/components/metadata.scss | 21 ++++++--------------- 2 files changed, 19 insertions(+), 16 deletions(-) (limited to 'app/javascript/flavours/glitch/features/account/components') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 9cf2e9131..f0d36947d 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -16,8 +16,18 @@ const messages = defineMessages({ requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' }, unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' }, edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' }, + link_verified_on: { id: 'account.link_verified_on', defaultMessage: 'Ownership of this link was checked on {date}' }, }); +const dateFormatOptions = { + month: 'short', + day: 'numeric', + year: 'numeric', + hour12: false, + hour: '2-digit', + minute: '2-digit', +}; + @injectIntl export default class Header extends ImmutablePureComponent { @@ -122,7 +132,9 @@ export default class Header extends ImmutablePureComponent { {fields.map((pair, i) => (
-
+
+ {pair.get('verified_at') && } +
))} diff --git a/app/javascript/flavours/glitch/styles/components/metadata.scss b/app/javascript/flavours/glitch/styles/components/metadata.scss index 2efe6cd66..32bdcdcf1 100644 --- a/app/javascript/flavours/glitch/styles/components/metadata.scss +++ b/app/javascript/flavours/glitch/styles/components/metadata.scss @@ -4,17 +4,11 @@ overflow: hidden; margin: 20px -10px -20px; border-bottom: 0; - - a { - text-decoration: none; - - &:hover{ - text-decoration: underline; - } - } + border-top: 0; dl { - border-top: 1px solid lighten($ui-base-color, 8%); + border-top: 1px solid lighten($ui-base-color, 4%); + border-bottom: 0; display: flex; } @@ -35,10 +29,6 @@ width: 120px; flex: 0 0 auto; font-weight: 500; - - a { - color: $primary-text-color; - } } dd { @@ -46,8 +36,9 @@ color: $primary-text-color; background: $ui-base-color; - a { - color: $highlight-text-color; + &.verified { + border: 1px solid rgba($valid-value-color, 0.5); + background: rgba($valid-value-color, 0.25); } } } -- cgit