LycheeOrg / Lychee-front

JS implementation of Lychee frontend
https://lycheeorg.github.io/
MIT License
48 stars 53 forks source link

Add drag / drop #291

Closed qwerty287 closed 2 years ago

qwerty287 commented 2 years ago

Adds support to drag and drop albums and photos.

The only issue I found and can't fix: if you drop an album on the border of a smart album, the album is not recognized as smart album. I don't know any way to fix it.

Requested in https://github.com/LycheeOrg/Lychee/issues/922

ildyria commented 2 years ago

I like that.

nagmat84 commented 2 years ago

I have merged consistent_json_api into master and rebased your branch querty287/drag-drop as drag_drop_rebased onto the new master. To update your PR, I believe the following commands should be the the right ones.

Attention:

Commands:

git checkout master                                                  # Checkout the current master of Lychee-front, the only important thing is that your are not on the branch `drag-drop`
git remote add lychee-org git@github.com:LycheeOrg/Lychee-front.git  # Add the LycheeOrg-Repo as a remote unless you haven't yet
git branch -D drag-drop                                              # Delete your local branch `sass`
git checkout -b drag-drop --track lychee-org/drag-drop_rebased       # Checkout a new local branch `sass` from `sass_rebased`
git pull                                                             # Pull it
git branch -u origin/drag-drop                                       # Change to upstream to your repository, this assumes `origin` points to `qwerty287`
git push                                                             # Try to push it, this is expected to fail, but make sure that GIT tries to push to the correct remote
git push --force                                                     # Now push forcefully
qwerty287 commented 2 years ago

Sorry, reset to wrong branch here first.

kamil4 commented 2 years ago

I added visual feedback during drag over destination albums.

I also flipped the order of arguments to contextMenu.albumDrop (to make it consistent with the rest).

I'm satisfied with this PR at this point, but @nagmat84 should check it with his fancy IDE :smiley:.

nagmat84 commented 2 years ago

I'm satisfied with this PR at this point, but @nagmat84 should check it with his fancy IDE :smiley:.

The way you put it, it sounds ridiculous. :cry: I am not such a man who is able to work with ed. I love my graphical IDE. :yum:

qwerty287 commented 2 years ago

Me too :wink:, I also have and use these Jetbrains IDEs, they're really great. I can check this myself and fix the lints if it finds some.

kamil4 commented 2 years ago

The way you put it, it sounds ridiculous. :cry:

I'm sorry; that was not my intention. I do appreciate the value brought in by these tests, in addition to an extra pair of eyes looking over the PR.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication