diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0717b104ba..814b08827b 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -132,6 +132,8 @@ common: line-width-thin: "細い" line-width-normal: "普通" line-width-thick: "太い" + hide-password: "パスワードを隠す" + show-password: "パスワードを表示する" do-not-use-in-production: "これは開発ビルドです。本番環境で使用しないでください。" user-suspended: "このユーザーは凍結されています。" diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue index 5deb3851b5..7efbde38b2 100644 --- a/src/client/app/common/views/components/signin.vue +++ b/src/client/app/common/views/components/signin.vue @@ -6,7 +6,7 @@ @ @{{ host }} - + {{ $t('password') }} diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue index d9683e2b90..2198b5bacb 100644 --- a/src/client/app/common/views/components/ui/input.vue +++ b/src/client/app/common/views/components/ui/input.vue @@ -39,6 +39,12 @@
+
+ + {{ $t('@.show-password') }} + {{ $t('@.hide-password') }} + +
@@ -97,6 +103,11 @@ export default Vue.extend({ required: false, default: false }, + withPasswordToggle: { + type: Boolean, + required: false, + default: false + }, inline: { type: Boolean, required: false, @@ -178,6 +189,13 @@ export default Vue.extend({ focus() { this.$refs.input.focus(); }, + togglePassword() { + if(this.type == 'password') { + this.type = 'text' + } else { + this.type = 'password' + } + }, chooseFile() { this.$refs.file.click(); }, @@ -356,6 +374,17 @@ root(fill) if fill padding-right 12px + > .toggle + cursor pointer + padding-left 0.5em + font-size 0.7em + opacity 0.7 + text-align left + + > a + color var(--inputLabel) + text-decoration none + > .desc margin 6px 0 font-size 13px