Commit graph

69 commits

Author SHA1 Message Date
226d2802ef
Fix tests and add build pipeline
Some checks failed
continuous-integration/drone/push Build is failing
2020-06-07 12:50:49 +02:00
18f035b7c2
User upload and Dropzone
Let users with rights to open fling also upload files if allowUpload set to true
for the fling
2020-06-05 21:45:07 +02:00
4d9b3d0d87
Fling User Download
File listing and dynamic download button
2020-06-04 22:28:30 +02:00
c1171e8376
Direct download
Implement direct download with online packaging
2020-05-31 14:41:04 +02:00
4618cc9bff
Landing page and user authorization for retrieving one fling 2020-05-29 18:08:18 +02:00
f502402cb6
Fling packaging and authorization
Allow users with a claim to the fling to download a fling as zip archive.
Package all artifacts belonging to a fling as zip file.
2020-05-24 19:52:14 +02:00
0fe28d3db8
Fling user access
Authentication for protected flings:
- Unlock screen
- Authentication backend
- Routes

Direct redirect for unprotected flings.
2020-05-24 17:06:59 +02:00
2fd30c6058
Remove uploaded files
If a file finished uploading, remove it from the file list.
2020-05-23 22:15:44 +02:00
bc6c2eabba
Artifacts table columns: Name, Upload Date, Size
Fix the artifacts table columns. Serialize upload date instant as milliseconds
from epoch.
2020-05-23 19:22:41 +02:00
12729a51a9
Implement new fling modal
When clicking New in the navbar a modal pops up for creating a new fling.
2020-05-23 13:51:18 +02:00
aad91c21f6
Fix drag leave event over child elements
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).
2020-05-22 22:31:19 +02:00
7f4bc536b9
Implement auth code setting and reset of settings
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.
2020-05-22 21:44:28 +02:00
4ca4fe5ffe
Fix mobile layout for upload
Upload and file-list tiles appeared side-by-side even on small viewports.

Upload and file-list tiles are now full width on small viewports.
2020-05-22 08:30:06 +02:00
b0a7e8b443
Expiration settings, protection settings, fix drop area hover
- 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.
2020-05-21 16:54:42 +02:00
4ab3bf705e
Add delete and download to ArtifactControl
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>
2020-05-17 23:18:26 +02:00
b8471deecc Set active Fling from URL match
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.
2020-05-17 20:13:37 +02:00
857535bb93 Move fling administration to /admin subpath
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.
2020-05-17 19:01:33 +02:00
70cd9c29be
Deduplicate CSS
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>
2020-05-17 16:55:26 +02:00
eb407f90b6
Fling Genesis
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>
2020-05-16 19:19:16 +02:00