pfp cropping #12
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: gorb/frontend#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pfp-cropping"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
image cropping!!!!
this does use an npm module, cropperjs, but i think it's an alright import for what it does.
this does NOT support animated pngs, or gifs, due to a library limitation.
it also converts every image you upload into a png on the fly, so technically you can upload webp and svg files now.
@ -0,0 +2,4 @@
<div id="fullscreen-container">
<div id="crop-preview">
<img ref="image" :src="imageSrc" style="min-height: 500px;">
<Button class="button" text="Crop" :callback="cropImage"></Button>
Button component already sets class to "button"
@ -0,0 +3,4 @@
<div id="crop-preview">
<img ref="image" :src="imageSrc" style="min-height: 500px;">
<Button class="button" text="Crop" :callback="cropImage"></Button>
<Button class="button" text="Cancel" :callback="closePopup"></Button>
Button component already sets class to "button"
@ -27,3 +34,4 @@
<script lang="ts" setup>
import Button from '~/components/Button.vue';
import CropPopup from '~/components/CropPopup.vue';
Not needed
@ -38,2 +47,4 @@
let newPfpFile: File;
const isCropPopupVisible = ref(false);
const cropImageSrc = ref('');
Use double quotes
@ -0,0 +1,94 @@
<template>
<div id="fullscreen-container">
<div id="crop-preview">
<img ref="image" :src="imageSrc" style="min-height: 500px;">
Don't use px for min-height
Looks good. Approved for merge.