fix user images, many thanks to Wopiie!

This commit is contained in:
HorizonCode 2022-10-23 01:31:17 +02:00
parent 67de9b7c16
commit c3c5390830
2 changed files with 8 additions and 10 deletions

View File

@ -122,13 +122,11 @@
border: 5px solid white; border: 5px solid white;
border-radius: 0.4rem; border-radius: 0.4rem;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.349); box-shadow: 0 0 10px rgba(0, 0, 0, 0.349);
} background-image: url(https://a.ez-pp.farm/0);
width: 100px;
#user-img { height: 100px;
border-radius: .2rem; background-size: cover;
width: 80px; background-position: center;
/* somehow its misplaced without that */
transform: translate(-0.25px, 0.25px) scale(1.05);
} }
.form-outline .form-control:focus~.form-notch .form-notch-leading { .form-outline .form-control:focus~.form-notch .form-notch-leading {

View File

@ -25,7 +25,7 @@ window.addEventListener('DOMContentLoaded', () => {
} else { } else {
$('#welcome-text').text(`Nice to see you!`); $('#welcome-text').text(`Nice to see you!`);
$('#account-action').text('Click to login'); $('#account-action').text('Click to login');
$('#user-img').prop('src', `https://a.ez-pp.farm/0`) $('.user-image').css('background-image', `url(https://a.ez-pp.farm/0)`)
loggedIn = false; loggedIn = false;
ipcRenderer.send("perform-logout"); ipcRenderer.send("perform-logout");
Swal.fire({ Swal.fire({
@ -95,7 +95,7 @@ window.addEventListener('DOMContentLoaded', () => {
$('#login-password').val(""); $('#login-password').val("");
$('#welcome-text').text(`Welcome back, ${responseData.user.name}!`); $('#welcome-text').text(`Welcome back, ${responseData.user.name}!`);
$('#account-action').text('Not you?'); $('#account-action').text('Not you?');
$('#user-img').prop('src', `https://a.ez-pp.farm/${responseData.user.id}`); $('.user-image').css('background-image', `url(https://a.ez-pp.farm/${responseData.user.id})`);
loggedIn = true; loggedIn = true;
changePage('launch'); changePage('launch');
}) })
@ -138,7 +138,7 @@ window.addEventListener('DOMContentLoaded', () => {
changePage("launch"); changePage("launch");
$('#welcome-text').text(`Welcome back, ${data.user.name}!`); $('#welcome-text').text(`Welcome back, ${data.user.name}!`);
$('#account-action').text('Not you?'); $('#account-action').text('Not you?');
$('#user-img').prop('src', `https://a.ez-pp.farm/${data.user.id}`) $('.user-image').css('background-image', `url(https://a.ez-pp.farm/${data.user.id})`);
loggedIn = true; loggedIn = true;
break; break;
} }