Skip to content

Commit

Permalink
Revert "Clean; signin - reduce unnecessary"
Browse files Browse the repository at this point in the history
This reverts commit a2c2e98.
  • Loading branch information
fs5m8 committed Aug 9, 2023
1 parent 049c8a1 commit c33b233
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/client/app/common/views/components/signin.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<form class="mk-signin" :class="{ signing, totpLogin }" @submit.prevent="onSubmit">
<div class="normal-signin" v-if="!totpLogin">
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" spellcheck="false" autofocus required>
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" spellcheck="false" autofocus required @input="onUsernameChange">
<span>{{ $t('username') }}</span>
<template #prefix>@</template>
<template #suffix>@{{ host }}</template>
Expand Down Expand Up @@ -77,6 +77,16 @@ export default Vue.extend({
},
methods: {
onUsernameChange() {
this.$root.api('users/show', {
username: this.username
}).then(user => {
this.user = user;
}, () => {
this.user = null;
});
},
queryKey() {
this.queryingKey = true;
return navigator.credentials.get({
Expand Down

0 comments on commit c33b233

Please sign in to comment.