pfp cropping #12

Merged
justtemmie merged 11 commits from pfp-cropping into main 2025-07-05 17:34:28 +00:00
2 changed files with 29 additions and 34 deletions
Showing only changes of commit d9c6faa6ab - Show all commits

View file

@ -1,8 +1,10 @@
<template>
<div class="crop-popup">
<div id="fullscreen-container">
<div id="crop-preview">
<img ref="image" :src="imageSrc" style="min-height: 500px;">

Don't use px for min-height

Don't use px for min-height
<Button text="Crop" :callback="cropImage"></Button>
<Button text="Cancel" :callback="closePopup"></Button>
<Button class="button" text="Crop" :callback="cropImage"></Button>

Button component already sets class to "button"

Button component already sets class to "button"
<Button class="button" text="Cancel" :callback="closePopup"></Button>

Button component already sets class to "button"

Button component already sets class to "button"
</div>
</div>
</template>
@ -60,12 +62,24 @@ function closePopup() {
</script>
<style scoped>
.crop-popup, #image-preview{
min-width: 20dvw;
min-height: 20dvh;
.button {
margin: 0.2em
}
cropper-canvas {
min-height: 500px;
#fullscreen-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
background: rgba(0,0,0,0.5);
}
#crop-preview {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>

View file

@ -24,14 +24,12 @@
</div>
</div>
<div v-if="isCropPopupVisible" id="crop-popup-container">
<CropPopup
v-if="isCropPopupVisible"
:imageSrc="cropImageSrc"
:onCrop="handleCrop"
:onClose="closeCropPopup"
id="crop-popup-preview"
/>
</div>
</template>
<script lang="ts" setup>
@ -168,21 +166,4 @@ 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%);
}
</style>