From 168f0f7b128f595fd83bb0ab39ea45b432bee978 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Fri, 4 Jul 2025 09:24:28 +0200 Subject: [PATCH] feat: make pfp cropper into a popup not sure why i can't resize it though, will probably just "click" later --- components/CropPopup.vue | 30 +++++++++++------ components/Settings/UserSettings/Profile.vue | 34 ++++++++++++++------ 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/components/CropPopup.vue b/components/CropPopup.vue index 2e1a6b1..7671e4d 100644 --- a/components/CropPopup.vue +++ b/components/CropPopup.vue @@ -1,9 +1,6 @@ @@ -101,8 +100,6 @@ async function changeAvatar() { const file = input.files[0]; if (!file) return; - newPfpFile = file - const reader = new FileReader(); reader.addEventListener("load", () => { if (reader.result && typeof reader.result === 'string') { @@ -171,4 +168,21 @@ function closeCropPopup() { #profile-popup { margin-left: 2dvw; } + +#crop-popup-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 10; + background: rgba(0,0,0,0.5); +} + +#crop-popup-preview { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} \ No newline at end of file