Login input css improved, this.user removed since it was unnecessary
This commit is contained in:
parent
2ce3ed9cd7
commit
6a0e200905
1 changed files with 15 additions and 3 deletions
|
|
@ -19,12 +19,13 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
username: '',
|
username: '',
|
||||||
user: null,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ['userChange'],
|
emits: ['userChange'],
|
||||||
methods: {
|
methods: {
|
||||||
async setUser() {
|
async setUser() {
|
||||||
|
if (this.username === '') return;
|
||||||
|
|
||||||
let user;
|
let user;
|
||||||
user = await User.getByName(this.username);
|
user = await User.getByName(this.username);
|
||||||
if (user.errors) {
|
if (user.errors) {
|
||||||
|
|
@ -37,8 +38,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
this.user = user;
|
this.$emit('userChange', user);
|
||||||
this.$emit('userChange', this.user);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -48,6 +48,18 @@ export default {
|
||||||
<style scoped>
|
<style scoped>
|
||||||
input {
|
input {
|
||||||
border: 3px solid black;
|
border: 3px solid black;
|
||||||
|
border-radius: 0;
|
||||||
background-color: beige;
|
background-color: beige;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus {
|
||||||
|
background: beige;
|
||||||
|
border-color: rgba(184,134,11, 0.8);
|
||||||
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(184,134,11, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue