change(client): メール認証の有効期限を30分で固定するように変更

This commit is contained in:
yukineko 2023-11-03 14:39:20 +09:00
parent 8f77b67975
commit 748dc3af28
No known key found for this signature in database
GPG Key ID: E5BACB72109B7B90
4 changed files with 2 additions and 32 deletions

3
locales/index.d.ts vendored
View File

@ -1158,8 +1158,6 @@ export interface Locale {
"pullDownToRefresh": string;
"disableStreamingTimeline": string;
"useGroupedNotifications": string;
"emailVerificationExpiresIn": string;
"emailVerificationExpiresInDescription": string;
"signupPendingError": string;
"cwNotationRequired": string;
"_announcement": {
@ -1639,7 +1637,6 @@ export interface Locale {
"almostThere": string;
"emailAddressInfo": string;
"emailSent": string;
"expiresTime": string;
};
"_accountDelete": {
"accountDelete": string;

View File

@ -1155,8 +1155,6 @@ refreshing: "リロード中"
pullDownToRefresh: "引っ張ってリロード"
disableStreamingTimeline: "タイムラインのリアルタイム更新を無効にする"
useGroupedNotifications: "通知をグルーピングして表示する"
emailVerificationExpiresIn: "メール認証の有効期限"
emailVerificationExpiresInDescription: "指定した有効期限を超えた場合はアカウントのサインアップが無効になりますが、サインアップ時に使用した招待コードが再度使用できるようになるなどのメリットがあります。0で無効になります。"
signupPendingError: "メールアドレスの確認中に問題が発生しました。リンクの有効期限が切れている可能性があります。"
cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述が必要です。"
@ -1557,8 +1555,7 @@ _ffVisibility:
_signup:
almostThere: "ほとんど完了です"
emailAddressInfo: "あなたが使っているメールアドレスを入力してください。メールアドレスが公開されることはありません。"
emailSent: "入力されたメールアドレス({email})宛に確認のメールが送信されました。メールに記載されたリンクにアクセスすると、アカウントの作成が完了します。"
expiresTime: "メールに記載されているリンクの有効期限は{time}です。"
emailSent: "入力されたメールアドレス({email})宛に確認のメールが送信されました。メールに記載されたリンクにアクセスすると、アカウントの作成が完了します。メールに記載されているリンクの有効期限は30分です。"
_accountDelete:
accountDelete: "アカウントの削除"

View File

@ -254,25 +254,10 @@ async function onSubmit(): Promise<void> {
'turnstile-response': turnstileResponse,
});
if (instance.emailRequiredForSignup) {
const text = [i18n.t('_signup.emailSent', { email })];
if (instance.emailVerificationExpiresIn) {
let time = '';
const hours = Math.floor(instance.emailVerificationExpiresIn / 60);
const minutes = instance.emailVerificationExpiresIn % 60;
if (hours > 0) {
time += hours + i18n.t('_time.hour');
}
if (minutes > 0) {
time += minutes + i18n.t('_time.minute');
}
text.push(i18n.t('_signup.expiresTime', { time }));
}
os.alert({
type: 'success',
title: i18n.ts._signup.almostThere,
text: text.join('\n'),
text: i18n.t('_signup.emailSent', { email }),
});
emit('signupEmailPending');
} else {

View File

@ -18,12 +18,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts.emailRequiredForSignup }}</template>
</MkSwitch>
<MkInput v-if="emailRequiredForSignup" v-model="emailVerificationExpiresIn" type="number" :min="0">
<template #label>{{ i18n.ts.emailVerificationExpiresIn }}</template>
<template #suffix>{{ i18n.ts._time.minute }}</template>
<template #caption>{{ i18n.ts.emailVerificationExpiresInDescription }}</template>
</MkInput>
<FormLink to="/admin/server-rules">{{ i18n.ts.serverRules }}</FormLink>
<MkInput v-model="tosUrl" type="url">
@ -77,7 +71,6 @@ import FormLink from '@/components/form/link.vue';
let enableRegistration: boolean = $ref(false);
let emailRequiredForSignup: boolean = $ref(false);
let emailVerificationExpiresIn: number = $ref(0);
let sensitiveWords: string = $ref('');
let preservedUsernames: string = $ref('');
let tosUrl: string | null = $ref(null);
@ -87,7 +80,6 @@ async function init() {
const meta = await os.api('admin/meta');
enableRegistration = !meta.disableRegistration;
emailRequiredForSignup = meta.emailRequiredForSignup;
emailVerificationExpiresIn = meta.emailVerificationExpiresIn;
sensitiveWords = meta.sensitiveWords.join('\n');
preservedUsernames = meta.preservedUsernames.join('\n');
tosUrl = meta.tosUrl;
@ -98,7 +90,6 @@ function save() {
os.apiWithDialog('admin/update-meta', {
disableRegistration: !enableRegistration,
emailRequiredForSignup,
emailVerificationExpiresIn,
tosUrl,
privacyPolicyUrl,
sensitiveWords: sensitiveWords.split('\n'),