mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-26 15:34:56 +01:00
refs #81 Guard submitting with enter in login and authorize
This commit is contained in:
parent
066dc809fa
commit
6ee51c94c5
@ -9,8 +9,12 @@
|
||||
<el-form-item label="Please paste authorization code from your browser:">
|
||||
<el-input v-model="authorizeForm.code"></el-input>
|
||||
</el-form-item>
|
||||
<!-- Dummy form to guard submitting with enter -->
|
||||
<el-form-item class="hidden">
|
||||
<el-input></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="submit">
|
||||
<el-button type="primary" @click="authorizeSubmit" native-type="submit">Submit</el-button>
|
||||
<el-button type="primary" @click="authorizeSubmit">Submit</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -77,5 +81,9 @@ html, body, #app, #authorize {
|
||||
color: #ffffff;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,12 +1,16 @@
|
||||
<template>
|
||||
<div id="login_form">
|
||||
<el-form ref="loginForm" label-width="120px" label-position="top" v-on:submit.prevent="login" class="login-form">
|
||||
<el-form ref="loginForm" label-width="120px" label-position="top" v-on:submit.prevent="confirm" class="login-form">
|
||||
<el-form-item label="Please write host name">
|
||||
<el-input v-model="loginForm.domainName"></el-input>
|
||||
</el-form-item>
|
||||
<!-- Dummy form to guard submitting with enter -->
|
||||
<el-form-item class="hidden">
|
||||
<el-input></el-input>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="confirm" v-if="selectedInstance === null">Search</el-button>
|
||||
<el-form-item class="submit">
|
||||
<el-button type="primary" class="login" @click="login" native-type="submit" v-if="selectedInstance !== null">Login</el-button>
|
||||
<el-button type="primary" class="login" @click="login" v-if="selectedInstance !== null">Login</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -95,5 +99,9 @@ export default {
|
||||
.back {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user