"birth date" --> "birthday", move the toggle next to the picker
This commit is contained in:
parent
ac42b43fab
commit
0f9e01b4a1
|
@ -9,7 +9,7 @@ import 'react-datepicker/dist/react-datepicker.css';
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
import { getFeatures } from 'soapbox/utils/features';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birth date' },
|
birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
|
@ -52,7 +52,6 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
<div className='datepicker__input'>
|
<div className='datepicker__input'>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
selected={value}
|
selected={value}
|
||||||
dateFormat='d MMMM yyyy'
|
|
||||||
wrapperClassName='react-datepicker-wrapper'
|
wrapperClassName='react-datepicker-wrapper'
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
placeholderText={intl.formatMessage(messages.birthdayPlaceholder)}
|
placeholderText={intl.formatMessage(messages.birthdayPlaceholder)}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import Permalink from 'soapbox/components/permalink';
|
||||||
import { makeGetAccount } from 'soapbox/selectors';
|
import { makeGetAccount } from 'soapbox/selectors';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
birthDate: { id: 'account.birth_date', defaultMessage: 'Birth date: {date}' },
|
birthday: { id: 'account.birthday', defaultMessage: 'Born {date}' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const makeMapStateToProps = () => {
|
const makeMapStateToProps = () => {
|
||||||
|
@ -73,7 +73,7 @@ class Account extends ImmutablePureComponent {
|
||||||
</Permalink>
|
</Permalink>
|
||||||
<div
|
<div
|
||||||
className='account__birthday'
|
className='account__birthday'
|
||||||
title={intl.formatMessage(messages.birthDate, {
|
title={intl.formatMessage(messages.birthday, {
|
||||||
date: formattedBirthday,
|
date: formattedBirthday,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|
|
@ -50,7 +50,7 @@ const messages = defineMessages({
|
||||||
error: { id: 'edit_profile.error', defaultMessage: 'Profile update failed' },
|
error: { id: 'edit_profile.error', defaultMessage: 'Profile update failed' },
|
||||||
bioPlaceholder: { id: 'edit_profile.fields.bio_placeholder', defaultMessage: 'Tell us about yourself.' },
|
bioPlaceholder: { id: 'edit_profile.fields.bio_placeholder', defaultMessage: 'Tell us about yourself.' },
|
||||||
displayNamePlaceholder: { id: 'edit_profile.fields.display_name_placeholder', defaultMessage: 'Name' },
|
displayNamePlaceholder: { id: 'edit_profile.fields.display_name_placeholder', defaultMessage: 'Name' },
|
||||||
birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birth date' },
|
birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const makeMapStateToProps = () => {
|
const makeMapStateToProps = () => {
|
||||||
|
@ -285,11 +285,22 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
onChange={this.handleTextChange}
|
onChange={this.handleTextChange}
|
||||||
rows={3}
|
rows={3}
|
||||||
/>
|
/>
|
||||||
|
{supportsBirthdays && (
|
||||||
|
<>
|
||||||
<BirthdayInput
|
<BirthdayInput
|
||||||
hint={<FormattedMessage id='edit_profile.fields.birthday_label' defaultMessage='Birth date' />}
|
hint={<FormattedMessage id='edit_profile.fields.birthday_label' defaultMessage='Birthday' />}
|
||||||
value={this.state.birthday}
|
value={this.state.birthday}
|
||||||
onChange={this.handleBirthdayChange}
|
onChange={this.handleBirthdayChange}
|
||||||
/>
|
/>
|
||||||
|
<Checkbox
|
||||||
|
label={<FormattedMessage id='edit_profile.fields.show_birthday_label' defaultMessage='Show my birthday' />}
|
||||||
|
hint={<FormattedMessage id='edit_profile.hints.show_birthday' defaultMessage='Your birthday will be visible on your profile.' />}
|
||||||
|
name='show_birthday'
|
||||||
|
checked={this.state.show_birthday}
|
||||||
|
onChange={this.handleCheckboxChange}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<div className='fields-row'>
|
<div className='fields-row'>
|
||||||
<div className='fields-row__column fields-row__column-6'>
|
<div className='fields-row__column fields-row__column-6'>
|
||||||
<ProfilePreview account={this.makePreviewAccount()} />
|
<ProfilePreview account={this.makePreviewAccount()} />
|
||||||
|
@ -344,13 +355,6 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
checked={this.state.discoverable}
|
checked={this.state.discoverable}
|
||||||
onChange={this.handleCheckboxChange}
|
onChange={this.handleCheckboxChange}
|
||||||
/>
|
/>
|
||||||
{supportsBirthdays && <Checkbox
|
|
||||||
label={<FormattedMessage id='edit_profile.fields.show_birthday_label' defaultMessage='Show my birth date' />}
|
|
||||||
hint={<FormattedMessage id='edit_profile.hints.show_birthday' defaultMessage='Your birth date will be visible on your profile.' />}
|
|
||||||
name='show_birthday'
|
|
||||||
checked={this.state.show_birthday}
|
|
||||||
onChange={this.handleCheckboxChange}
|
|
||||||
/>}
|
|
||||||
{supportsEmailList && <Checkbox
|
{supportsEmailList && <Checkbox
|
||||||
label={<FormattedMessage id='edit_profile.fields.accepts_email_list_label' defaultMessage='Subscribe to newsletter' />}
|
label={<FormattedMessage id='edit_profile.fields.accepts_email_list_label' defaultMessage='Subscribe to newsletter' />}
|
||||||
hint={<FormattedMessage id='edit_profile.hints.accepts_email_list' defaultMessage='Opt-in to news and marketing updates.' />}
|
hint={<FormattedMessage id='edit_profile.hints.accepts_email_list' defaultMessage='Opt-in to news and marketing updates.' />}
|
||||||
|
|
|
@ -98,7 +98,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
|
||||||
<div className='profile-info-panel-content__birthday' title={formattedBirthday}>
|
<div className='profile-info-panel-content__birthday' title={formattedBirthday}>
|
||||||
<Icon src={require('@tabler/icons/icons/ballon.svg')} />
|
<Icon src={require('@tabler/icons/icons/ballon.svg')} />
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.birthday' defaultMessage='Has birthday today!'
|
id='account.birthday_today' defaultMessage='Birthday is today!'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -107,7 +107,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
|
||||||
<div className='profile-info-panel-content__birthday'>
|
<div className='profile-info-panel-content__birthday'>
|
||||||
<Icon src={require('@tabler/icons/icons/ballon.svg')} />
|
<Icon src={require('@tabler/icons/icons/ballon.svg')} />
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.birth_date' defaultMessage='Birth date: {date}' values={{
|
id='account.birthday' defaultMessage='Born {date}' values={{
|
||||||
date: formattedBirthday,
|
date: formattedBirthday,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue