[Paid Feature Request] Drag-n-drop to Path Link

Hello everyone,

We are a tax office that recently migrated over to Seafile as the primary replacement for Dropbox. Since the Seafile Web UI is fairly light and fast, we’ve been integrating into our main SaaS app, but it’s come with a few hiccups.

The main issue is that we would like to move files from a child folder to a parent folder using the drag-n-drop functionality in the List/Grid UIs. Currently this is only available through the directory UI.

The Move right click option is somewhat broken at a large number of folders (1000+), so using the Move option is inpractical for us.

Additionally, we’re looking to add the ability to remove the header and sidebar using a custom query parameter. This is because the UI will occasionally go into an iframe.

For the drag-n-drop functionality change, we’re willing to pay money in order to get this feature change with some support over the next two weeks. (How to patch the feature into an existing running docker container.) Are there any frontend devs around who would be interested?

Hey all,

We just wanted to give an update to this. We’ve gotten the updated React components working correctly to drag-and-drop on a dev environment, now we just need to build and publish the asset files into production.

Is there a guide anywhere on use “make dist” in haiwen/seahub just for the purposes of building assets?

Nevermind, we figured it out, here’s a partial guide of what we did.

Updating the Frontend of Seahub is a fairly involved process that requires some work to fully contemplate.

A separate dev environment is highly recommended in order to understand what’s going on.

Publishing Changes

This guide assumes that you are deploying from a folder with an active git repo.

Take the directory /opt/seafile/seafile-pro-server-10.0.9/seahub from the dev-container and copy it to your deployment folder.

mkdir opt/seafile/seafile-pro-server-10.0.9

docker compose seafile:/opt/seafile/seafile-pro-server-10.0.9/seahub opt/seafile/seafile-pro-server-10.0.9

Clean out unecessary files from your local repository.

This can be done by removing all of the untracked files.

# Get a list of all of the untracked files and ignored files.

git clean -dfXn

# Once you are comfortable, clean out all of the files. Note that this also

# removes directories node_modules and frontend/build which are used for later builds.

# Don't remove these files if you want a quick deployment cycle.

git clean -dfX

# Remove media/assets. This is copied over from opt/seafile/seafile-pro-server-10.0.9/seahub/Makefile

cd opt/seafile/seafile-pro-server-10.0.9/seahub

rm -rf media/assets

I recommend commit your changes to your git repo at this point, in order to have a clean commit of exactly what has changed.

Now, it’s time to build the assets locally before they can be uploaded to the production container. Install nodejs v16 or use nvm in order to install it.

# Installs nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# Installs node16 and switches to it

nvm use 16

cd frontend

# Build the assets at frontend/static/assets

npm install

npm run build

Upload your changes to your production container by using a custom docker image. Note that this will freeze your environment from future updates.

# seafile.Dockerfile

FROM docker.seadrive.org/seafileltd/seafile-pro-mc@sha256:049ac35d32e5d8892e9cf76ea86603d31f06b9fd31bf1f97a7adfbbeecec1121

COPY opt/seafile /opt/seafile

# seafile.Dockerfile.dockerignore



docker compose up seafile -d --build

Once the seafile container is up and ready, then run the following commands within the container.

docker compose exec --user root seafile /bin/sh

cd /opt/seafile/seafile-pro-server-10.0.9

# This is copied over from opt/seafile/seafile-pro-server-10.0.9/seahub/Makefile

./seahub.sh python-env seahub/manage.py collectstatic --noinput -i admin -i termsandconditions

./seahub.sh restart