mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
fix account authorize page
This commit is contained in:
parent
b64d02798d
commit
703be8a9fd
@ -4,10 +4,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||||||
import Permalink from '../../../components/permalink';
|
import Permalink from '../../../components/permalink';
|
||||||
import Avatar from '../../../components/avatar';
|
import Avatar from '../../../components/avatar';
|
||||||
import DisplayName from '../../../components/display_name';
|
import DisplayName from '../../../components/display_name';
|
||||||
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
|
import IconButton from '../../../components/icon_button';
|
||||||
import { shortNumberFormat } from 'mastodon/utils/numbers';
|
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
|
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
|
||||||
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
|
authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
|
||||||
@ -28,6 +28,8 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||||||
const { intl, account, onAuthorize, onReject } = this.props;
|
const { intl, account, onAuthorize, onReject } = this.props;
|
||||||
const content = { __html: account.get('note_emojified') };
|
const content = { __html: account.get('note_emojified') };
|
||||||
|
|
||||||
|
|
||||||
|
const fields = account.get('fields');
|
||||||
return (
|
return (
|
||||||
<div className='account-authorize__wrapper'>
|
<div className='account-authorize__wrapper'>
|
||||||
<div className='account-authorize'>
|
<div className='account-authorize'>
|
||||||
@ -36,17 +38,21 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||||||
to={`/accounts/${account.get('id')}`}
|
to={`/accounts/${account.get('id')}`}
|
||||||
className='detailed-status__display-name'
|
className='detailed-status__display-name'
|
||||||
>
|
>
|
||||||
<div className='account-authorize__avatar'>
|
<div className='account-authorize__avatar'><Avatar
|
||||||
<Avatar
|
|
||||||
account={account}
|
account={account}
|
||||||
size={100}
|
size={48}
|
||||||
/>
|
/></div >
|
||||||
|
|
||||||
</div >
|
|
||||||
<DisplayName account={account} />
|
<DisplayName account={account} />
|
||||||
|
|
||||||
</Permalink >
|
</Permalink >
|
||||||
{/*count posts*/}
|
<div className='more'>
|
||||||
|
{account.get('remote_url')}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className='account__header__content'
|
||||||
|
dangerouslySetInnerHTML={content}
|
||||||
|
/>
|
||||||
|
</div >
|
||||||
<span className='account-authorize--more-data'>
|
<span className='account-authorize--more-data'>
|
||||||
<NavLink
|
<NavLink
|
||||||
isActive={this.isStatusesPageActive}
|
isActive={this.isStatusesPageActive}
|
||||||
@ -55,7 +61,7 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||||||
title={intl.formatNumber(account.get('statuses_count'))}
|
title={intl.formatNumber(account.get('statuses_count'))}
|
||||||
>
|
>
|
||||||
<i className='fa fa-comment' />
|
<i className='fa fa-comment' />
|
||||||
<strong >{shortNumberFormat(account.get('statuses_count'))}</strong > <FormattedMessage
|
<strong >{(account.get('statuses_count'))}</strong > <FormattedMessage
|
||||||
id='account.posts'
|
id='account.posts'
|
||||||
defaultMessage='Toots'
|
defaultMessage='Toots'
|
||||||
/>
|
/>
|
||||||
@ -67,7 +73,7 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||||||
to={`/accounts/${account.get('id')}/following`}
|
to={`/accounts/${account.get('id')}/following`}
|
||||||
title={intl.formatNumber(account.get('following_count'))}
|
title={intl.formatNumber(account.get('following_count'))}
|
||||||
>
|
>
|
||||||
<strong >{shortNumberFormat(account.get('following_count'))}</strong > <FormattedMessage
|
<strong >{(account.get('following_count'))}</strong > <FormattedMessage
|
||||||
id='account.follows'
|
id='account.follows'
|
||||||
defaultMessage='Follows'
|
defaultMessage='Follows'
|
||||||
/>
|
/>
|
||||||
@ -79,7 +85,7 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||||||
to={`/accounts/${account.get('id')}/followers`}
|
to={`/accounts/${account.get('id')}/followers`}
|
||||||
title={intl.formatNumber(account.get('followers_count'))}
|
title={intl.formatNumber(account.get('followers_count'))}
|
||||||
>
|
>
|
||||||
<strong >{shortNumberFormat(account.get('followers_count'))}</strong > <FormattedMessage
|
<strong >{(account.get('followers_count'))}</strong > <FormattedMessage
|
||||||
id='account.followers'
|
id='account.followers'
|
||||||
defaultMessage='Followers'
|
defaultMessage='Followers'
|
||||||
/>
|
/>
|
||||||
@ -87,33 +93,17 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||||||
|
|
||||||
</span >
|
</span >
|
||||||
|
|
||||||
<div
|
|
||||||
className='account__header__content'
|
|
||||||
dangerouslySetInnerHTML={content}
|
|
||||||
/>
|
|
||||||
</div >
|
|
||||||
|
|
||||||
<div className='account--panel'>
|
<div className='account--panel'>
|
||||||
<div
|
<div className='account--panel__button'><IconButton
|
||||||
className='account--panel__button account--panel__button__allow clickable'
|
|
||||||
onClick={onAuthorize}
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
className='fa fa-check'
|
|
||||||
title={intl.formatMessage(messages.authorize)}
|
title={intl.formatMessage(messages.authorize)}
|
||||||
/>
|
icon='check'
|
||||||
{intl.formatMessage(messages.authorize)}
|
onClick={onAuthorize}
|
||||||
</div >
|
/></div >
|
||||||
<div
|
<div className='account--panel__button'><IconButton
|
||||||
className='account--panel__button account--panel__button__reject clickable'
|
|
||||||
onClick={onReject}
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
className='fa fa-times'
|
|
||||||
title={intl.formatMessage(messages.reject)}
|
title={intl.formatMessage(messages.reject)}
|
||||||
/>
|
icon='times'
|
||||||
{intl.formatMessage(messages.reject)}
|
onClick={onReject}
|
||||||
</div >
|
/></div >
|
||||||
</div >
|
</div >
|
||||||
</div >
|
</div >
|
||||||
);
|
);
|
||||||
|
@ -24,7 +24,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// const themeIsDark = true;
|
// const themeIsDark = true;
|
||||||
// const displaythemetoggler = true;
|
const displayMoreLinks = false;
|
||||||
export default @injectIntl
|
export default @injectIntl
|
||||||
@connect(null, mapDispatchToProps)
|
@connect(null, mapDispatchToProps)
|
||||||
class LinkFooter extends React.PureComponent {
|
class LinkFooter extends React.PureComponent {
|
||||||
@ -65,11 +65,12 @@ class LinkFooter extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var weekNumber = (new Date()).getWeek();
|
var weekNumber = (new Date()).getWeek();
|
||||||
|
console.log('we are the week number weekNumber', weekNumber);
|
||||||
// display snow during the last two weeks of the year
|
// display snow during the last two weeks of the year
|
||||||
const shouldWeDisplaySnow = (weekNumber > props.minimumWeekToShowSnow) && props.enableChristmasSnow;
|
const shouldWeDisplaySnow = (weekNumber > props.minimumWeekToShowSnow) && props.enableChristmasSnow;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
displayMoreLinks : false,
|
displayMoreLinks : displayMoreLinks,
|
||||||
enableChristmasSnow: shouldWeDisplaySnow,
|
enableChristmasSnow: shouldWeDisplaySnow,
|
||||||
theme : props.theme,
|
theme : props.theme,
|
||||||
};
|
};
|
||||||
@ -89,8 +90,8 @@ class LinkFooter extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleMoreLinks = () => {
|
toggleMoreLinks = () => {
|
||||||
this.state.displayMoreLinks = !this.state.displayMoreLinks;
|
this.setState({ displayMoreLinks: !this.state.displayMoreLinks });
|
||||||
console.log('this.state.displayMoreLinks', this.state.displayMoreLinks)
|
console.log('this.state.displayMoreLinks', this.state.displayMoreLinks);
|
||||||
};
|
};
|
||||||
|
|
||||||
toggleSnow = () => {
|
toggleSnow = () => {
|
||||||
@ -136,6 +137,13 @@ class LinkFooter extends React.PureComponent {
|
|||||||
|
|
||||||
<div className='links-started__footer desktop-only'>
|
<div className='links-started__footer desktop-only'>
|
||||||
|
|
||||||
|
<a href='https://mastodon.cipherbliss.com/@tykayn'>
|
||||||
|
<i className='fa fa-paper-plane' />
|
||||||
|
contactez l'admin
|
||||||
|
</a >
|
||||||
|
<a href='https://liberapay.com/cipherbliss'>
|
||||||
|
<i className='fa fa-coffee' /> Supportez
|
||||||
|
Cipherbliss</a >
|
||||||
<div className='extras'>
|
<div className='extras'>
|
||||||
|
|
||||||
{this.state.enableChristmasSnow && (
|
{this.state.enableChristmasSnow && (
|
||||||
@ -178,7 +186,7 @@ class LinkFooter extends React.PureComponent {
|
|||||||
href='#external_utilities'
|
href='#external_utilities'
|
||||||
onClick={this.toggleMoreLinks}
|
onClick={this.toggleMoreLinks}
|
||||||
>
|
>
|
||||||
<i className='fa fa-list-ul'></i > toggle links ( {this.state.displayMoreLinks} )
|
<i className='fa fa-list-ul' />
|
||||||
</a >
|
</a >
|
||||||
{this.state.displayMoreLinks && (
|
{this.state.displayMoreLinks && (
|
||||||
|
|
||||||
@ -188,13 +196,6 @@ class LinkFooter extends React.PureComponent {
|
|||||||
>
|
>
|
||||||
<div >
|
<div >
|
||||||
|
|
||||||
<a href='https://mastodon.cipherbliss.com/@tykayn'>
|
|
||||||
<i className='fa fa-paper-plane' />
|
|
||||||
contactez nous
|
|
||||||
</a >
|
|
||||||
<a href='https://liberapay.com/cipherbliss'><i className='fa fa-coffee' /> Supportez
|
|
||||||
Cipherbliss</a >
|
|
||||||
|
|
||||||
<a href='https://peertube.cipherbliss.com'> <i className='fa fa-play ' /> Videos</a >
|
<a href='https://peertube.cipherbliss.com'> <i className='fa fa-play ' /> Videos</a >
|
||||||
<a href='https://framadate.org/'> <i className='fa fa-calendar' /> FramaDate</a >
|
<a href='https://framadate.org/'> <i className='fa fa-calendar' /> FramaDate</a >
|
||||||
<a href='https://framapad.org/'> <i className='fa fa-file-text' /> Pad</a >
|
<a href='https://framapad.org/'> <i className='fa fa-file-text' /> Pad</a >
|
||||||
@ -203,7 +204,7 @@ class LinkFooter extends React.PureComponent {
|
|||||||
</div >
|
</div >
|
||||||
<div className='suggested-tags'>
|
<div className='suggested-tags'>
|
||||||
<ul >
|
<ul >
|
||||||
navToTags
|
{navToTags}
|
||||||
</ul >
|
</ul >
|
||||||
</div >
|
</div >
|
||||||
</div >
|
</div >
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
"account.edit_profile": "Modifier le profil",
|
"account.edit_profile": "Modifier le profil",
|
||||||
"account.endorse": "Recommander sur le profil",
|
"account.endorse": "Recommander sur le profil",
|
||||||
"account.follow": "Suivre",
|
"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.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.followers_counter": "{count, plural, one {{counter} Abonné·e} other {{counter} Abonné·e·s}}",
|
||||||
"account.following_counter": "{count, plural, other {{counter} Abonnements}}",
|
"account.following_counter": "{count, plural, other {{counter} Abonnements}}",
|
||||||
@ -69,7 +70,7 @@
|
|||||||
"column.home": "Accueil",
|
"column.home": "Accueil",
|
||||||
"column.lists": "Listes",
|
"column.lists": "Listes",
|
||||||
"column.mutes": "Comptes masqués",
|
"column.mutes": "Comptes masqués",
|
||||||
"column.notifications": "Notifications",
|
"column.notifications": "Bafouilles",
|
||||||
"column.pins": "Pouets épinglés",
|
"column.pins": "Pouets épinglés",
|
||||||
"column.public": "Fil public global",
|
"column.public": "Fil public global",
|
||||||
"column_back_button.label": "Retour",
|
"column_back_button.label": "Retour",
|
||||||
@ -277,7 +278,7 @@
|
|||||||
"navigation_bar.direct": "Messages privés",
|
"navigation_bar.direct": "Messages privés",
|
||||||
"navigation_bar.discover": "Découvrir",
|
"navigation_bar.discover": "Découvrir",
|
||||||
"navigation_bar.domain_blocks": "Domaines bloqués",
|
"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.favourites": "Favoris",
|
||||||
"navigation_bar.filters": "Mots masqués",
|
"navigation_bar.filters": "Mots masqués",
|
||||||
"navigation_bar.follow_requests": "Demandes de suivi",
|
"navigation_bar.follow_requests": "Demandes de suivi",
|
||||||
|
@ -331,7 +331,18 @@
|
|||||||
.sidebar__toggle__logo, .sidebar__toggle{
|
.sidebar__toggle__logo, .sidebar__toggle{
|
||||||
display: none;
|
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) {
|
@media screen and (max-width: 600px) {
|
||||||
|
|
||||||
|
@ -34,7 +34,9 @@
|
|||||||
div[data-component] {
|
div[data-component] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.status__content__text{
|
||||||
|
min-height: 3em;
|
||||||
|
}
|
||||||
.entry {
|
.entry {
|
||||||
background: $ui-base-color;
|
background: $ui-base-color;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user