diff --git a/resources/assets/js/dashboard.js b/resources/assets/js/dashboard.js index 9b9d2d0..c2c99aa 100644 --- a/resources/assets/js/dashboard.js +++ b/resources/assets/js/dashboard.js @@ -630,7 +630,8 @@ function userProfileImageInit() { $upload = $("#profile-image-upload"), $delete = $("#profile-image-delete"), $token = $("#token"), - $displayInner = $form.find(".image-display-inner").first(); + $display = $form.find(".image-display").first(), + defaultImage = $display.data("default"); let file, submitting = false; @@ -660,7 +661,7 @@ function userProfileImageInit() { submitting = false; if (/\.png\?version=/.test(response)) { - $displayInner.css({ backgroundImage: `url(${response})` }); + $display.css({ backgroundImage: `url(${response})` }); $delete.removeClass("inactive"); } else { showAlert("Failed to upload image"); @@ -687,7 +688,7 @@ function userProfileImageInit() { } }).always(function(response) { if (response === "success") { - $displayInner.css({ backgroundImage: "none" }); + $display.css({ backgroundImage: `url(${defaultImage})` }); $delete.addClass("inactive"); } else { showAlert("Failed to delete profile image"); diff --git a/resources/assets/sass/dashboard.scss b/resources/assets/sass/dashboard.scss index 7823e55..faefdb7 100644 --- a/resources/assets/sass/dashboard.scss +++ b/resources/assets/sass/dashboard.scss @@ -820,17 +820,6 @@ body { background-position: center center; background-size: cover; background-repeat: no-repeat; - - &-inner { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - background-position: center center; - background-size: cover; - background-repeat: no-repeat; - } } .image-buttons { diff --git a/resources/views/dashboard/pages/settings.blade.php b/resources/views/dashboard/pages/settings.blade.php index 2695b92..4d0719c 100644 --- a/resources/views/dashboard/pages/settings.blade.php +++ b/resources/views/dashboard/pages/settings.blade.php @@ -10,9 +10,12 @@