refs #5475 redesign 2FA email
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-07-11 07:41:05 +02:00
parent 0afddb546b
commit 1bcd3039cd
7 changed files with 54 additions and 35 deletions

View File

@ -1,5 +1,6 @@
.code {
border: 2px dashed #8dba25;
border-radius: 3px;
text-align: center
}
text-align: center;
font-size: 24px;
}

View File

@ -1,23 +1,45 @@
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('description') }}</p>
<p>
{{ $t('device') }}: <strong>{{ device }}</strong>
</p>
<p>
{{$t('ip')}}: <strong>{{ ip }}</strong>
</p>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<p>{{ $t('Enter the following code to continue to your account') }}</p>
<div class="code vn-pa-sm vn-m-md">
{{ code }}
</div>
<p>{{ $t('It expires in 5 minutes') }}</p>
</div>
</div>
</email-body>
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width" />
<meta name="format-detection" content="telephone=no" />
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-md">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('description') }}</p>
<p>
{{ $t('device') }}: <strong>{{ device }}</strong>
</p>
<p>
{{$t('ip')}}: <strong>{{ ip }}</strong>
</p>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-sm">
<p>{{ $t('Enter the following code to continue to your account. It expires in 5 minutes.') }}</p>
<div class="code vn-pa-sm vn-m-md">
{{ code }}
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,10 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailBody = new Component('email-body');
const emailHeader = new Component('email-header');
module.exports = {
name: 'auth-code',
components: {
'email-body': emailBody.build(),
'email-header': emailHeader.build(),
},
props: {
code: {

View File

@ -3,5 +3,4 @@ title: Verification code
description: Somebody did request a verification code for login. If you didn't request it, please ignore this email.
device: 'Device'
ip: 'IP'
Enter the following code to continue to your account: Enter the following code to continue to your account
It expires in 5 minutes: It expires in 5 minutes
Enter the following code to continue to your account. It expires in 5 minutes.: Enter the following code to continue to your account. It expires in 5 minutes.

View File

@ -3,5 +3,4 @@ title: Código de verificación
description: Alguien ha solicitado un código de verificación para poder iniciar sesión. Si no lo has solicitado tu, ignora este email.
device: 'Dispositivo'
ip: 'IP'
Enter the following code to continue to your account: Introduce el siguiente código para poder continuar con tu cuenta
It expires in 5 minutes: Expira en 5 minutos
Enter the following code to continue to your account. It expires in 5 minutes: Introduce el siguiente código para poder continuar con tu cuenta. Expira en 5 minutos.

View File

@ -3,5 +3,4 @@ title: Code de vérification
description: Quelqu'un a demandé un code de vérification pour se connecter. Si ce n'était pas toi, ignore cet email.
device: 'Appareil'
ip: 'IP'
Enter the following code to continue to your account: Entrez le code suivant pour continuer avec votre compte
It expires in 5 minutes: Il expire dans 5 minutes.
Enter the following code to continue to your account. It expires in 5 minutes.: Entrez le code suivant pour continuer avec votre compte. Il expire dans 5 minutes.

View File

@ -3,5 +3,4 @@ title: Código de verificação
description: Alguém solicitou um código de verificação para entrar. Se você não fez essa solicitação, ignore este e-mail.
device: 'Dispositivo'
ip: 'IP'
Enter the following code to continue to your account: Insira o seguinte código para continuar com sua conta.
It expires in 5 minutes: Expira em 5 minutos.
Enter the following code to continue to your account. It expires in 5 minutes: Insira o seguinte código para continuar com sua conta. Expira em 5 minutos.