Some bug fixes

This commit is contained in:
syuilo
2018-04-08 03:58:11 +09:00
parent a1b490afa7
commit a02ee3a08b
81 changed files with 337 additions and 1318 deletions

View File

@ -6,7 +6,7 @@
<label class="password">
<input v-model="password" type="password" placeholder="%i18n:common.tags.mk-signin.password%" required/>%fa:lock%
</label>
<label class="token" v-if="user && user.account.twoFactorEnabled">
<label class="token" v-if="user && user.twoFactorEnabled">
<input v-model="token" type="number" placeholder="%i18n:common.tags.mk-signin.token%" required/>%fa:lock%
</label>
<button type="submit" :disabled="signing">{{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }}</button>
@ -43,7 +43,7 @@ export default Vue.extend({
(this as any).api('signin', {
username: this.username,
password: this.password,
token: this.user && this.user.account.twoFactorEnabled ? this.token : undefined
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
}).then(() => {
location.reload();
}).catch(() => {