Better 2FA input on sign in form (#3910)

* Update signin.vue

* Update ja-JP.yml

* Update settings.vue

* Update signin.vue

* Update init.ts
This commit is contained in:
Acid Chicken (硫酸鶏) 2019-01-18 13:20:32 +09:00 committed by GitHub
parent 4ba43b69b6
commit d93e60d4dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -27,6 +27,7 @@ common:
do-not-copy-paste: "ここにコードを入力したり張り付けたりしないでください。アカウントが不正利用される可能性があります。" do-not-copy-paste: "ここにコードを入力したり張り付けたりしないでください。アカウントが不正利用される可能性があります。"
load-more: "もっと読み込む" load-more: "もっと読み込む"
enter-password: "パスワードを入力してください" enter-password: "パスワードを入力してください"
2fa: "二段階認証"
got-it: "わかった" got-it: "わかった"
customization-tips: customization-tips:
@ -855,7 +856,6 @@ desktop/views/components/settings.vue:
security: "セキュリティ" security: "セキュリティ"
signin: "サインイン履歴" signin: "サインイン履歴"
password: "パスワード" password: "パスワード"
2fa: "二段階認証"
other: "その他" other: "その他"
license: "ライセンス" license: "ライセンス"
theme: "テーマ" theme: "テーマ"

View File

@ -10,7 +10,10 @@
<span>{{ $t('password') }}</span> <span>{{ $t('password') }}</span>
<span slot="prefix"><fa icon="lock"/></span> <span slot="prefix"><fa icon="lock"/></span>
</ui-input> </ui-input>
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required styl="fill"/> <ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required styl="fill">
<span>{{ $t('@.2fa') }}</span>
<span slot="prefix"><fa icon="gavel"/></span>
</ui-input>
<ui-button type="submit" :disabled="signing">{{ signing ? $t('signing-in') : $t('signin') }}</ui-button> <ui-button type="submit" :disabled="signing">{{ signing ? $t('signing-in') : $t('signin') }}</ui-button>
<p v-if="meta && meta.enableTwitterIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/twitter`">{{ $t('signin-with-twitter') }}</a></p> <p v-if="meta && meta.enableTwitterIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/twitter`">{{ $t('signin-with-twitter') }}</a></p>
<p v-if="meta && meta.enableGithubIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/github`">{{ $t('signin-with-github') }}</a></p> <p v-if="meta && meta.enableGithubIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/github`">{{ $t('signin-with-github') }}</a></p>

View File

@ -203,7 +203,7 @@
</ui-card> </ui-card>
<ui-card class="2fa" v-show="page == 'security'"> <ui-card class="2fa" v-show="page == 'security'">
<div slot="title"><fa icon="mobile-alt"/> {{ $t('2fa') }}</div> <div slot="title"><fa icon="mobile-alt"/> {{ $t('@.2fa') }}</div>
<section> <section>
<x-2fa/> <x-2fa/>
</section> </section>

View File

@ -124,7 +124,8 @@ import {
faMapMarker, faMapMarker,
faRobot, faRobot,
faHourglassHalf, faHourglassHalf,
faAlignLeft faAlignLeft,
faGavel
} from '@fortawesome/free-solid-svg-icons'; } from '@fortawesome/free-solid-svg-icons';
import { import {
@ -257,6 +258,7 @@ library.add(
faRobot, faRobot,
faHourglassHalf, faHourglassHalf,
faAlignLeft, faAlignLeft,
faGavel,
farBell, farBell,
farEnvelope, farEnvelope,