Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # frontend/src/components/Login.vue
This commit is contained in:
commit
f4eeb11c68
3 changed files with 52 additions and 26 deletions
|
|
@ -16,15 +16,16 @@ export default {
|
|||
components: {
|
||||
RRButton
|
||||
},
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
username: '',
|
||||
_user: null,
|
||||
}
|
||||
},
|
||||
emits: ['userChange'],
|
||||
methods: {
|
||||
async setUser(){
|
||||
async setUser() {
|
||||
if (this.username === '') return;
|
||||
|
||||
let user;
|
||||
user = await User.getByName(this.username);
|
||||
if(user.errors){
|
||||
|
|
@ -33,17 +34,13 @@ export default {
|
|||
|
||||
if(user.errors){
|
||||
console.error("Something when wrong when logging in, please contact admin!")
|
||||
return;
|
||||
}
|
||||
|
||||
if(user){
|
||||
this.user(user);
|
||||
if (user) {
|
||||
this.$emit('userChange', user);
|
||||
}
|
||||
},
|
||||
user(user){
|
||||
this._user = user;
|
||||
localStorage.setItem("frontend-ready", "true");
|
||||
this.$emit('userChange', this._user);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -51,6 +48,18 @@ export default {
|
|||
<style scoped>
|
||||
input {
|
||||
border: 3px solid black;
|
||||
border-radius: 0;
|
||||
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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue