From 703be8a9fd21a2cb675acdee7d10f1aee678ea08 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Fri, 24 Jul 2020 17:42:22 +0200 Subject: [PATCH] fix account authorize page --- .../components/account_authorize.js | 128 ++++++++---------- .../features/ui/components/link_footer.js | 57 ++++---- app/javascript/mastodon/locales/fr.json | 7 +- app/javascript/styles/bliss/accounts.scss | 13 +- app/javascript/styles/bliss/statuses.scss | 4 +- 5 files changed, 107 insertions(+), 102 deletions(-) diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js index 9bc258f27..c1522af45 100644 --- a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js +++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js @@ -4,10 +4,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import Permalink from '../../../components/permalink'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; -import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; -import { shortNumberFormat } from 'mastodon/utils/numbers'; -import ImmutablePureComponent from 'react-immutable-pure-component'; +import IconButton from '../../../components/icon_button'; import { NavLink } from 'react-router-dom'; +import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; +import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' }, @@ -28,6 +28,8 @@ class AccountAuthorize extends ImmutablePureComponent { const { intl, account, onAuthorize, onReject } = this.props; const content = { __html: account.get('note_emojified') }; + + const fields = account.get('fields'); return (
@@ -36,84 +38,72 @@ class AccountAuthorize extends ImmutablePureComponent { to={`/accounts/${account.get('id')}`} className='detailed-status__display-name' > -
- - -
+
- - {/*count posts*/} - - - - {shortNumberFormat(account.get('statuses_count'))} - - - - {shortNumberFormat(account.get('following_count'))} - - - - {shortNumberFormat(account.get('followers_count'))} - - - +
+ {account.get('remote_url')} +
+ + + + {(account.get('statuses_count'))} + + + + {(account.get('following_count'))} + + + + {(account.get('followers_count'))} + + +
-
- - {intl.formatMessage(messages.authorize)} -
-
+
- - {intl.formatMessage(messages.reject)} -
+ />
); diff --git a/app/javascript/mastodon/features/ui/components/link_footer.js b/app/javascript/mastodon/features/ui/components/link_footer.js index 12651974b..37818df69 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.js +++ b/app/javascript/mastodon/features/ui/components/link_footer.js @@ -24,7 +24,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ }); // const themeIsDark = true; -// const displaythemetoggler = true; +const displayMoreLinks = false; export default @injectIntl @connect(null, mapDispatchToProps) class LinkFooter extends React.PureComponent { @@ -65,11 +65,12 @@ class LinkFooter extends React.PureComponent { }; var weekNumber = (new Date()).getWeek(); + console.log('we are the week number weekNumber', weekNumber); // display snow during the last two weeks of the year const shouldWeDisplaySnow = (weekNumber > props.minimumWeekToShowSnow) && props.enableChristmasSnow; this.state = { - displayMoreLinks : false, + displayMoreLinks : displayMoreLinks, enableChristmasSnow: shouldWeDisplaySnow, theme : props.theme, }; @@ -89,8 +90,8 @@ class LinkFooter extends React.PureComponent { } toggleMoreLinks = () => { - this.state.displayMoreLinks = !this.state.displayMoreLinks; - console.log('this.state.displayMoreLinks', this.state.displayMoreLinks) + this.setState({ displayMoreLinks: !this.state.displayMoreLinks }); + console.log('this.state.displayMoreLinks', this.state.displayMoreLinks); }; toggleSnow = () => { @@ -136,6 +137,13 @@ class LinkFooter extends React.PureComponent {
+ + + contactez l'admin + + + Supportez + Cipherbliss
{this.state.enableChristmasSnow && ( @@ -161,7 +169,7 @@ class LinkFooter extends React.PureComponent { href='/admin/tags?pending_review=1' > - Trending hashtags + Trending hashtags - toggle links ( {this.state.displayMoreLinks} ) + {this.state.displayMoreLinks && ( @@ -188,13 +196,6 @@ class LinkFooter extends React.PureComponent { >
- - - contactez nous - - Supportez - Cipherbliss - Videos FramaDate Pad @@ -203,7 +204,7 @@ class LinkFooter extends React.PureComponent {
    - navToTags + {navToTags}
@@ -215,8 +216,8 @@ class LinkFooter extends React.PureComponent { href='/invites' target='_blank' > · } {withHotkeys &&
  • ·
  • ·
  • ·
  • ·
  • ·
  • diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index a3a03038d..6c13c09d1 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -13,7 +13,8 @@ "account.edit_profile": "Modifier le profil", "account.endorse": "Recommander sur le profil", "account.follow": "Suivre", - "account.followers": "Abonné·e·s", + "account.follows": "Adeptes", + "account.followers": "Adept·e·s", "account.followers.empty": "Personne ne suit cet·te utilisateur·rice pour l’instant.", "account.followers_counter": "{count, plural, one {{counter} Abonné·e} other {{counter} Abonné·e·s}}", "account.following_counter": "{count, plural, other {{counter} Abonnements}}", @@ -69,7 +70,7 @@ "column.home": "Accueil", "column.lists": "Listes", "column.mutes": "Comptes masqués", - "column.notifications": "Notifications", + "column.notifications": "Bafouilles", "column.pins": "Pouets épinglés", "column.public": "Fil public global", "column_back_button.label": "Retour", @@ -277,7 +278,7 @@ "navigation_bar.direct": "Messages privés", "navigation_bar.discover": "Découvrir", "navigation_bar.domain_blocks": "Domaines bloqués", - "navigation_bar.edit_profile": "Modifier le profil", + "navigation_bar.edit_profile": "profil", "navigation_bar.favourites": "Favoris", "navigation_bar.filters": "Mots masqués", "navigation_bar.follow_requests": "Demandes de suivi", diff --git a/app/javascript/styles/bliss/accounts.scss b/app/javascript/styles/bliss/accounts.scss index bb8899e32..4bd0f1caf 100644 --- a/app/javascript/styles/bliss/accounts.scss +++ b/app/javascript/styles/bliss/accounts.scss @@ -331,7 +331,18 @@ .sidebar__toggle__logo, .sidebar__toggle{ display: none; } - +.account--panel{ + width: 100%; +} +.account-authorize--more-data{ + margin-bottom: 1em; + display: flex; + a{ + padding: 1em; + margin-bottom: 1em; + flex: auto; + } +} @media screen and (max-width: 600px) { diff --git a/app/javascript/styles/bliss/statuses.scss b/app/javascript/styles/bliss/statuses.scss index dc7f9e4dc..93c10e2fa 100644 --- a/app/javascript/styles/bliss/statuses.scss +++ b/app/javascript/styles/bliss/statuses.scss @@ -34,7 +34,9 @@ div[data-component] { width: 100%; } - +.status__content__text{ + min-height: 3em; +} .entry { background: $ui-base-color;