Add: #348 新規登録の上限人数 (#527)

* Add: #348 新規登録の上限人数

* Fix test

* Fix test

* Wip

* Fix test

* Add invite support

* Wip

* Fix test

* Fix test

* Fix test
This commit is contained in:
KMY(雪あすか) 2024-02-12 22:05:32 +09:00 committed by GitHub
parent d7cc6b788c
commit e317edecb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 362 additions and 6 deletions

View file

@ -4,7 +4,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import { fetchServer } from 'mastodon/actions/server';
import { domain } from 'mastodon/initial_state';
import { domain, registrationsReachLimit } from 'mastodon/initial_state';
const mapStateToProps = state => ({
message: state.getIn(['server', 'server', 'registrations', 'message']),
@ -27,6 +27,16 @@ class ClosedRegistrationsModal extends ImmutablePureComponent {
dangerouslySetInnerHTML={{ __html: this.props.message }}
/>
);
} else if (registrationsReachLimit) {
closedRegistrationsMessage = (
<p className='prose'>
<FormattedMessage
id='closed_registrations_modal.description_when_reaching_limit'
defaultMessage='New registrations are currently temporarily restricted. Either the maximum number of registrations has been reached or it is outside the time frame available for registration. Please contact the administrator for more information or wait until the restriction is lifted.'
values={{ domain: <strong>{domain}</strong> }}
/>
</p>
);
} else {
closedRegistrationsMessage = (
<p className='prose'>

View file

@ -48,6 +48,7 @@
* @property {string=} owner
* @property {boolean} profile_directory
* @property {boolean} registrations_open
* @property {boolean} registrations_reach_limit
* @property {boolean} reduce_motion
* @property {string} repository
* @property {boolean} search_enabled
@ -134,6 +135,7 @@ export const owner = getMeta('owner');
export const profile_directory = getMeta('profile_directory');
export const reduceMotion = getMeta('reduce_motion');
export const registrationsOpen = getMeta('registrations_open');
export const registrationsReachLimit = getMeta('registrations_reach_limit');
export const repository = getMeta('repository');
export const searchEnabled = getMeta('search_enabled');
export const trendsEnabled = getMeta('trends_enabled');

View file

@ -113,6 +113,7 @@
"circles.edit": "Edit circle",
"closed_registrations.other_server_instructions": "Since Mastodon is decentralized, you can create an account on another server and still interact with this one.",
"closed_registrations_modal.description": "Creating an account on {domain} is currently not possible, but please keep in mind that you do not need an account specifically on {domain} to use Mastodon.",
"closed_registrations_modal.description_when_reaching_limit": "New registrations are currently temporarily restricted. Either the maximum number of registrations has been reached or it is outside the time frame available for registration. Please contact the administrator for more information or wait until the restriction is lifted.",
"closed_registrations_modal.find_another_server": "Find another server",
"closed_registrations_modal.preamble": "Mastodon is decentralized, so no matter where you create your account, you will be able to follow and interact with anyone on this server. You can even self-host it!",
"closed_registrations_modal.title": "Signing up on Mastodon",

View file

@ -170,6 +170,7 @@
"circles.subheading": "あなたのサークル",
"closed_registrations.other_server_instructions": "Mastodonは分散型なので他のサーバーにアカウントを作ってもこのサーバーとやり取りできます。",
"closed_registrations_modal.description": "現在{domain}でアカウント作成はできませんがMastodonは{domain}のアカウントでなくても利用できます。",
"closed_registrations_modal.description_when_reaching_limit": "新規登録は現在一時的に制限されています。登録の上限人数に達したか、または登録可能な時間帯の範囲外です。詳細を管理人に問い合わせるか、制限が解除されるまでお待ち下さい。",
"closed_registrations_modal.find_another_server": "別のサーバーを探す",
"closed_registrations_modal.preamble": "Mastodonは分散型なのでどのサーバーでアカウントを作成してもこのサーバーのユーザーを誰でもフォローして交流することができます。また自分でホスティングすることもできます",
"closed_registrations_modal.title": "Mastodonでアカウントを作成",