DirectDownload now uses the new Fling API, including one-time tokens for
download.
When accessing a fling, while loading the fling, instead of showing the
ArtifactList an empty page is shown. This way the redirection does not
leak through so visibly when using direct download and the loading of
the fling takes a bit longer.
When dragging over a child element of the dropzone, a drag leave event from the
dropzone is fired. This caused the handleDragLeave function to be called.
Before the dragLeave event on the dropzone is fired, first a dragEnter event on
the child is fired. By keeping a counter in the state, a premature dragLeave
effect in the dropzone is prevented.
The dragCount is kept in a local variable in handleOnDragLeave because only the
render method gets the most recent state. Reading from state in a regular
function will see an old value (and hence think it is still dragged over even
though the counter dropped to 0).
AuthCode to protect a fling can now be set in settings. AuthCode was moved to
the Fling table. Only one auth code per fling is possible now. AuthCode is
stored hashed in the database.
Additionally, implement reset of settings (Cancel button) by reloading the fling
from the database.
- Front end for expiration time/date
- Setting expiration via `PUT /fling/{flingId}`
- Settings for protection code enabled in front-end (no backend)
- Upload drop container used to loose focus when hovering over child elements.
This is fixed now.
Download first gets an unprotected, temporary download URL. It then loads an
iframe with the retrieved URL, which causes to browser to download the file.
This is done to prevent a reload of the page while at the same time use the
standard browser file download functionality. Other solutions found cause
problems with bigger files since they download the file first and then generate
a binary blob in the DOM.
Delete just deletes an artifact and reloads the artifact list. A potential
problem could occur if the removal in the archive fails while the file is
already deleted from the database.
Signed-off-by: Armin Friedl <dev@friedl.net>
Instead of a mix between URL matching and manually setting the active fling, set
the active fling from the URL.
This fixes some strange edge cases where current URL and selected fling do not
add up.
Fling administration was directly beneth root path. For convenience the root
path should be reserved for retrieving flings.
Also adds fling content sections to real urls instead of hash urls,
parameterized by the active fling. A content section for a fling can hence now
be bookmarked or directly navigated to.
Sass and webpack don't interact well together. A (non-partial) SCSS file
compiled in Sass context and imported from a component will duplicate all its
internal imports.
Create a single SCSS/CSS stylesheet which is not duplicated multiple times due
to per-component import. The fling.scss master style sheet is now imported once
in index.js and contains styles for all components.
Signed-off-by: Armin Friedl <dev@friedl.net>
Basic Fling backend with admin interface.
Features:
- Basic admin site structure
- Token authorization
- Upload artifacts
- Change basic fling settings
Many things missing still or not fully functional.
Signed-off-by: Armin Friedl <dev@friedl.net>