diff --git a/app/soapbox/components/birth_date_input.js b/app/soapbox/components/birth_date_input.js
index 5183973d6..3147c317e 100644
--- a/app/soapbox/components/birth_date_input.js
+++ b/app/soapbox/components/birth_date_input.js
@@ -9,7 +9,7 @@ import 'react-datepicker/dist/react-datepicker.css';
import { getFeatures } from 'soapbox/utils/features';
const messages = defineMessages({
- birthDatePlaceholder: { id: 'edit_profile.fields.birth_date_placeholder', defaultMessage: 'Your birth date' },
+ birthDatePlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birth date' },
});
const mapStateToProps = state => {
@@ -17,7 +17,7 @@ const mapStateToProps = state => {
return {
supportsBirthDates: features.birthDates,
- minAge: state.getIn(['instance', 'pleroma', 'metadata', 'birth_date_min_age']),
+ minAge: state.getIn(['instance', 'pleroma', 'metadata', 'birthday_min_age']),
};
};
diff --git a/app/soapbox/features/auth_login/components/registration_form.js b/app/soapbox/features/auth_login/components/registration_form.js
index 8b6ceb3a9..0bc68be30 100644
--- a/app/soapbox/features/auth_login/components/registration_form.js
+++ b/app/soapbox/features/auth_login/components/registration_form.js
@@ -47,7 +47,7 @@ const mapStateToProps = (state, props) => ({
needsApproval: state.getIn(['instance', 'approval_required']),
supportsEmailList: getFeatures(state.get('instance')).emailList,
supportsAccountLookup: getFeatures(state.get('instance')).accountLookup,
- birthDateRequired: state.getIn(['instance', 'pleroma', 'metadata', 'birth_date_required']),
+ birthDateRequired: state.getIn(['instance', 'pleroma', 'metadata', 'birthday_required']),
});
export default @connect(mapStateToProps)
@@ -223,7 +223,7 @@ class RegistrationForm extends ImmutablePureComponent {
}
if (birthDate) {
- params.set('birth_date', birthDate.toISOString().slice(0, 10));
+ params.set('birthday', birthDate.toISOString().slice(0, 10));
}
});
diff --git a/app/soapbox/features/birthdays/account.js b/app/soapbox/features/birthdays/account.js
index 141fd7b8e..4a266cd8f 100644
--- a/app/soapbox/features/birthdays/account.js
+++ b/app/soapbox/features/birthdays/account.js
@@ -56,7 +56,7 @@ class Account extends ImmutablePureComponent {
if (!account) return null;
- const birthDate = account.getIn(['pleroma', 'birth_date']);
+ const birthDate = account.getIn(['pleroma', 'birthday']);
if (!birthDate) return null;
const formattedBirthDate = intl.formatDate(birthDate, { day: 'numeric', month: 'short', year: 'numeric' });
diff --git a/app/soapbox/features/edit_profile/index.js b/app/soapbox/features/edit_profile/index.js
index f055d601e..426af2a39 100644
--- a/app/soapbox/features/edit_profile/index.js
+++ b/app/soapbox/features/edit_profile/index.js
@@ -50,7 +50,7 @@ const messages = defineMessages({
error: { id: 'edit_profile.error', defaultMessage: 'Profile update failed' },
bioPlaceholder: { id: 'edit_profile.fields.bio_placeholder', defaultMessage: 'Tell us about yourself.' },
displayNamePlaceholder: { id: 'edit_profile.fields.display_name_placeholder', defaultMessage: 'Name' },
- birthDatePlaceholder: { id: 'edit_profile.fields.birth_date_placeholder', defaultMessage: 'Your birth date' },
+ birthDatePlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birth date' },
});
const makeMapStateToProps = () => {
@@ -113,8 +113,8 @@ class EditProfile extends ImmutablePureComponent {
const strangerNotifications = account.getIn(['pleroma', 'notification_settings', 'block_from_strangers']);
const acceptsEmailList = account.getIn(['pleroma', 'accepts_email_list']);
const discoverable = account.getIn(['source', 'pleroma', 'discoverable']);
- const birthDate = account.getIn(['pleroma', 'birth_date']);
- const hideBirthDate = account.getIn(['pleroma', 'hide_birth_date']);
+ const birthDate = account.getIn(['pleroma', 'birthday']);
+ const showBirthDate = account.getIn(['source', 'pleroma', 'show_birthday']);
const initialState = account.withMutations(map => {
map.merge(map.get('source'));
@@ -124,7 +124,7 @@ class EditProfile extends ImmutablePureComponent {
map.set('accepts_email_list', acceptsEmailList);
map.set('hide_network', hidesNetwork(account));
map.set('discoverable', discoverable);
- map.set('hide_birth_date', hideBirthDate);
+ map.set('show_birthday', showBirthDate);
if (birthDate) map.set('birthDate', new Date(birthDate));
unescapeParams(map, ['display_name', 'bio']);
});
@@ -166,8 +166,8 @@ class EditProfile extends ImmutablePureComponent {
hide_follows: state.hide_network,
hide_followers_count: state.hide_network,
hide_follows_count: state.hide_network,
- birth_date: state.birthDate?.toISOString().slice(0, 10),
- hide_birth_date: state.hide_birth_date,
+ birthday: state.birthDate?.toISOString().slice(0, 10),
+ show_birthday: state.show_birthday,
}, this.getFieldParams().toJS());
}
@@ -286,7 +286,7 @@ class EditProfile extends ImmutablePureComponent {
rows={3}
/>
}
+ hint={}
value={this.state.birthDate}
onChange={this.handleBirthDateChange}
/>
@@ -345,10 +345,10 @@ class EditProfile extends ImmutablePureComponent {
onChange={this.handleCheckboxChange}
/>
{supportsBirthDates && }
- hint={}
- name='hide_birth_date'
- checked={this.state.hide_birth_date}
+ label={}
+ hint={}
+ name='show_birthday'
+ checked={this.state.show_birthday}
onChange={this.handleCheckboxChange}
/>}
{supportsEmailList && {
const { account, intl } = this.props;
- const birthDate = account.getIn(['pleroma', 'birth_date']);
+ const birthDate = account.getIn(['pleroma', 'birthday']);
if (!birthDate) return null;
const formattedBirthDate = intl.formatDate(birthDate, { day: 'numeric', month: 'long', year: 'numeric' });