Login input css improved, this.user removed since it was unnecessary

This commit is contained in:
s-prechtl 2023-01-24 11:33:13 +01:00
parent 2ce3ed9cd7
commit 6a0e200905

View file

@ -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>