svsticky / chroma

Manage photo albums on S3 buckets. Successor to Pxl and Rstr
1 stars 1 forks source link

Allow viewing original quality image #7

Closed TobiasDeBruijn closed 8 months ago

TobiasDeBruijn commented 10 months ago

Currently, there is no way to view the original picture (or enlarge cropped images). This should be added, and I think should be considered an essential feature.

This needs to be possible when viewing an album, click on an individual photo should probably open a popup with the original quality photo.

@SilasPeters Would you have an interest in implementing this? Probably needs to be implemented in ./frontend/src/components/PhotoCover.vue.

SilasPeters commented 10 months ago

I might take a look at this, as I have (very) basic knowledge of Vue. I will come back to this tomorrow through DMs.

SilasPeters commented 10 months ago

To my understanding, the API already supports fetching a picture in it's original quality, as server/chroma/src/routes/v1/mod.rs contains a PhotoQuality::Original enum value, and the endpoint defined in server/chroma/src/routes/v1/photo/get.rs accepts a Query which owns a PhotoQuality field, which means you can specify what kind of quality the requested photo should be - where original quality is thus possible.

That leaves us with creating a new view in Vue to display that picture, which calls that said endpoint. I found the following file: frontend/src/views/photo/PhotoDetailView.vue. Is it correct that this view was intended to display a picture in its full orignal-quality glory? If not, could you explan to me what file-location is best for such a view?

TobiasDeBruijn commented 10 months ago

Yep that is correct, on both counts!

Edit: Note that the function getPhoto in photo.ts has an optional parameter low_res, setting this to false or leaving it empty will fetch the original image too :D It's just a matter of displaying it in the PhotoDetailView.vue and opening that view as a popup when the user clicks on a photo (in PhotoGrid.vue I think)

SilasPeters commented 10 months ago

Then I believe I can handle this issue. First step: fix my koala setup again :(

SilasPeters commented 10 months ago

With some luck I might finish a great deal this evening, but preparations for the introduction (and the introduction itself) might require attention first.

TobiasDeBruijn commented 9 months ago

@SilasPeters Have you been able to make any progress on this feature?

SilasPeters commented 9 months ago

Sadly I have been too occupied. Feel free to do this yourself, as I do not know anymore when I will have time for this :(. This weekend at its earliest

TobiasDeBruijn commented 9 months ago

I'll await the weekend, give you a chance to try yourself! There's not a lot of hurry with this issue anyways.

Thanks for the update.