Commit Graph

53 Commits

Author SHA1 Message Date
BobbyWibowo
073bb0e710 dist: rebuilt client assets and bumped v1 version string 2022-10-05 21:17:37 +00:00
BobbyWibowo
b18b2ee312 dist: rebuilt client assets and bumped v1 version string 2022-08-19 00:42:07 +00:00
BobbyWibowo
493d2a8df3 dist: rebuilt client assets and bumped v1 version string 2022-08-07 23:09:47 +00:00
BobbyWibowo
bdf6557368 dist: rebuilt client assets and bumped v1 version string 2022-08-04 16:49:25 +00:00
BobbyWibowo
8f46925352 dist: rebuilt client assets and bumped v1 version string 2022-07-25 00:43:06 +00:00
BobbyWibowo
bd797f2c27 dist: rebuilt client assets and bumped v1 version string 2022-06-30 12:43:03 +00:00
BobbyWibowo
e79bb77a25 dist: rebuilt client assets and bumped v1 version string 2022-06-22 04:46:11 +00:00
BobbyWibowo
04d2dff0f6 dist: rebuilt client assets and bumped v1 version string 2022-05-06 19:18:39 +00:00
BobbyWibowo
b17ea6c8bd dist: rebuilt client assets and bumped v1 version string 2022-05-06 14:59:37 +00:00
BobbyWibowo
3f900a1ac5 dist: rebuilt client assets and bumped v1 version string 2022-05-06 13:49:36 +00:00
BobbyWibowo
12d49b1d40 dist: rebuilt client assets and bumped v1 version string 2021-01-31 23:15:50 +00:00
BobbyWibowo
afa09b0312 AUTO: Rebuilt client assets and bumped v1 version string 2021-01-08 04:00:40 +00:00
BobbyWibowo
1382afd8c8 AUTO: Rebuilt client assets and bumped v1 version string 2020-12-26 11:50:53 +00:00
BobbyWibowo
d796b31bd1 AUTO: Rebuilt client assets and bumped v1 version string 2020-11-05 16:11:53 +00:00
BobbyWibowo
0cfd3fe059 AUTO: Rebuilt client assets and bumped v1 version string 2020-11-04 04:27:31 +00:00
BobbyWibowo
1c7bff20d9 Rebuilt client assets and bumped v1 version string 2020-08-22 19:23:01 +00:00
BobbyWibowo
001e741a08 Rebuilt client assets and bumped v1 version string 2020-08-22 19:21:14 +00:00
Bobby Wibowo
6daa1e529e
Added src/js/misc/newsfeed.js
A small script to pull feed from blog.fiery.me as news thingy.
2020-07-28 03:46:15 +07:00
Bobby Wibowo
0caa669980
Fix homepage's Config tab not saving some options
Resolved #211

Bumped v1 version string and rebuilt client asset
2020-06-22 19:45:42 +07:00
Bobby Wibowo
b4ab04f55a
Async-load render.js
Also fixed undefined vars check, as var === undefined throws error
when truly not defined.
It's probably specific to browsers (don't recall seeing this in node).

Bumped v1 version string and rebuilt client assets.
2020-06-20 03:33:39 +07:00
Bobby Wibowo
d29621d5ff
Make render.js standalone
Despite that, it still expects the existence of a so-called main script
in "page" variable, and also expects to be loaded by it instead,
with an internal check to load itself if the main script fails to call
itself within the expected conditions.

Improved button colors in SweetAlert prompts.

Refactored window.onload() to DOMContentLoaded's event listener.
This should essentially allow pages to have multiple scripts that listen
to that event.

Bumped v1 version string and rebuilt client assets.
2020-06-20 02:30:57 +07:00
Bobby Wibowo
51c8df71bc
Added deletion URL for ShareX or derivatives
For registered users only!
This requires adding a basic GET API for file deletion, so that I did.
Configs which guests download will not include pattern for delete URL,
so they won't get notified of unusable delete URL or anything like that.

dev: Improved logger.debug() to support specifying options for node's
Util.inspect() if an object is set as its last param
(assuming >1 params).
Default options now also includes enabling colors.

src/js/utils.js: Simplified dynamic ShareX config generator.
Among other things, it will now use JSON.stringify().
I don't even remember why we didn't use that in the first place..

Some logic improvements in src/js/home.js.

Bumped v1 version string and rebuilt client assets.
2020-06-20 01:28:23 +07:00
Bobby Wibowo
15f29f3fb9
Better error handlers in home uploader 2020-06-10 03:01:12 +07:00
Bobby Wibowo
62a977542e
Switched to BLAKE3 for file hashing [MORE]
UPDATE YOUR CONFIG FILE IF YOU USE CHUNKED UPLOADS!
Read more about this at the end.

Added new dependency: blake3

Hashes will be created as the uploads are being written to disk.
With exception for chunked uploads!
For them specifically, their hashes will be created as they're being
rebuilt into a single file.
Should still be a lot better than the previous case where it had to
re-read the already written files.

To support that feature, added a new file
controllers/multerStorageController.js.
It's just a custom storage engine for Multer.

chunkSize option now allows setting max chunk size from config file.
Previously it was hardcoded to 95MB, but assuming you have paid
Cloudflare plans, you can actually have up to 500MB.

Also moved the option to be after maxSize and before urlMaxSize.
Made a lot more sense to me this way, as chunked uploads only work on
regular uploads.

Updated v1 version string and rebuilt client assets.
2020-05-29 02:52:58 +07:00
Bobby Wibowo
58cbcdd1fe
Updated some Nunjucks files and home.js
Updated options in _globals.njk to NOT use camelCase.

Rephrased banned categories.

Added toggle option for banned categories into faq.njk.

Added FAQ message about Tor and/or VPNs being blocked.

Updated faq.njk and cookiepolicy.njk for updated option names.

Updated cookie settings for Cookie Consent in home.js.
Now it will only enable Secure cookie if on HTTPS protocol.
This should properly store the cookie in local installations.

Bumped v1 version string and rebuilt client assets.
2020-05-28 05:18:09 +07:00
Bobby Wibowo
64ab8e20b2
Updated auth page, amont other things
"Login or register" subtitle and Register button will no longer be shown
if enableUserAccounts are disabled in config.

Updated auth.js to continue working even when register and/or login
buttons cannot be found.

Added .is-wrappable support for .button elements.
This makes the text inside the buttons "wrappable" to next lines.
Do note that this will cause the buttons to get taller when they do need
to wrap their texts.

Updated "Log in to upload" button in homepage uploader use the new
.is-wrappable class.
Their texts will also now be split into two lines.
Anonymous upload warning specifically will now instead say
"Log in or register".

Bumped v1 version string and rebuilt client assets.
2020-05-26 03:04:26 +07:00
Bobby Wibowo
5e54c07f94
Change /auth link to /dashboard if logged in
Updated v1 version string and rebuilt client assets
2020-05-26 02:46:09 +07:00
Bobby Wibowo
d666e278ec
Refactored "location" -> "window.location"
In client JS files, for readibility and consistency.

They'd work the same either way, but I'd think they'd be easier to
read and understand this way.
2020-05-26 02:39:28 +07:00
Bobby Wibowo
86b51fe5f5
Added Cookie Consent, among other things
This adds Cookie Consent library at public/libs/cookieconsent.

Added views/cookiepolicy.njk.

Added a new config option cookiePolicy. Disabled by default.

Updated views/faq.njk to use variables wherever applicable.
The variables are initiated at views/_globals.njk.
The said file also contains variables used at views/cookiepolicy.njk.

Restored messages about Cloudflare to FAQ.
They will be shown only if config.cloudflare.purgeCache is enabled.

Statistics will now capitalize first letters of the keys instead.

Updated background color of SweetAlert modals.

Moved table styling from dashboard.css to style.css (global),
since table will also be used in Cookie Policy page.

Bumped v1 version string and rebuilt client assets.
2020-05-17 03:35:54 +07:00
Bobby Wibowo
ff54f088bd
Added client assets update detection
/api/check and /api/token/verify will now pass along v1 version string
if used (when config.cacheControl is used) for both home.js and
dashboard.js to use to compare version strings.
This should help notify users using browsers with a bit more overbearing
caching (generally mobile browsers).

Rebuilt client assets and bumped v1 version string

Slight update to yarn.lock (a small syntax change for node-gyp, idk why)
2020-04-30 05:56:28 +07:00
Bobby Wibowo
f1cceca563
Updated home.js again: Live upload speed...
Hmm...

This should theoretically be more accurate.
This will keep uploadprogress data of the past >1s to calculate
total bytes sent in 1s, in real time.
As opposed to only calculating per second.

But hmm...

I'm starting to feel like I'm spending too much time on this feature.
2020-04-22 03:28:51 +07:00
Bobby Wibowo
9c7b0e22d7
Updated home.js again: Fixed live upload speed
My silly bad habit of not debugging things properly before committing
2020-04-21 17:27:10 +07:00
Bobby Wibowo
f27db6f252
Updated home.js: Improved live upload speed
Forcefully wait for at least 1 second before calculating speed
Calculating faster tends to have 'jumpy' results
2020-04-21 17:17:19 +07:00
Bobby Wibowo
7cd9e5b40b
Updated home.js: Live upload speed
Previously it calculated average upload speed instead
This should be more accurate/reliable
2020-04-21 17:05:20 +07:00
Bobby Wibowo
a6156da798
Added .m4v and .m2ts video extensions
Their thumbs can be made with ffmpeg
Run "yarn thumbs 2" to create thumbs for existing uploads with those
extensions

Rebuilt client assets and bumped v1 version string
2020-04-19 21:41:17 +07:00
Bobby Wibowo
456f63d0d8
Updated home.js
Make sure album newly created on the homepage is properly selected
2020-04-08 00:54:00 +07:00
Bobby Wibowo
d9ddfe8e9a
Implemented stripping tags from images
... and optionally videos using ffmpeg (still experimental).

Users can choose whether to strip tags of their uploads or not from
the home uploader's Config tab (safe.fiery.me will have it disabled
by default).

The behavior will also be applied to the downloadable ShareX config.

Server owners can choose to force either behavior.

Make sure to add the new config from config.sample.js.

---

Fixed all instances of "e.i." to "e.g.".
My English sucks okay.

Bumped v1 version string.
2019-11-29 20:42:53 +07:00
Bobby Wibowo
337a0a61ff
Implemented parallel URL uploads
This doesn't use the server's built-in ability to accept multiple URLs
per API request.
It behaves the same as regular uploads, in that it executes one API call
per file, simultaneously.

I figured this is a better implementation to shift queues faster.

---

Fetch error from URL uploads due to exceeding size limit will no longer
be logged in server's console.

Clients will also see better formatted error message for URL uploads'
file size limit errors.

---

Bumped dependencies:
knex: 0.20.2 -> 0.20.3
systeminformation: 4.15.3 -> 4.16.0

Bumped v1 version string
2019-11-29 17:42:29 +07:00
Bobby Wibowo
df1e835272
Improved descriptive upload progress again
Bumped v1 version string
2019-11-27 00:57:55 +07:00
Bobby Wibowo
c4c45a5857
Slightly improved descriptive upload progress
Bumped v1 version string
2019-11-27 00:12:58 +07:00
Bobby Wibowo
a8c702065f
Implemented descriptive upload progress
Say goodbye to upload progress bar 👋

Bumped v1 version string
2019-11-26 21:58:10 +07:00
Bobby Wibowo
603b6b4b83
Clean up 2019-11-26 19:47:15 +07:00
Bobby Wibowo
ec7c160f31
Fixed uploads timing out without error after 30 s
As it turns out, Dropzone had a built-in timeout of 30 seconds.
There'll be no timeout now (thus respecting timeout settings of the
server and/or CDN).

While I was at it, I also refactored the bits for initializing Dropzone.

Also added a hacky method to handle Dropzone timeout,
in case someone wants to re-enable that.
"Hacky" due to lack of Dropzone's built-in timeout event handler.

Updated dev dependency:
eslint: 6.6.0 -> 6.7.1
2019-11-25 15:18:14 +07:00
Bobby Wibowo
e10ce7807f
Updated
Auto-close some Sweetalert success dialogs after 1.5s.

Fixed edit user not displaying user's new username properly.

Disabled eslint-plugin-compat on some lines that won't work in
Safari 5.1.
Optionally look into not supporting the browser altogether.

Bumped v1 version string.
2019-10-29 19:39:44 +07:00
Bobby Wibowo
7855801d62
Updated
Rewritten codes for home uploader config.
All options are now defined in a single config object in home.js.
Config tab content will be dynamically generated through that config.
This should eliminate the need of modifying home.njk whenever a new
option needs to be added,
make the codes more readable, and easier to extend.

Upgrade stylelint dev dependency.

Bumped v1 version string.
2019-10-11 12:36:59 +07:00
Bobby Wibowo
411d17e1fb
Updated
* Changed colorscheme to black (experimental).

* Fixed ClamAV failing to report names of dirty files.

* Removed built-in support for Google site verification (globals.njk).
Just use HTML verification with public directory,
or manually edit home.njk.

* Bumped v1 version string.
2019-10-06 05:20:59 +07:00
Bobby Wibowo
a79803cbd6
Updated
Added gulp-replace dev dependency.

Removed version strings of Fontello fonts from fontello.css

Added "build:fontello" Gulp task which will append version string to
Fontello fonts, then do the usual processing for CSS file.
It will use type 5 from versions.json, if available.
Also updated src/README.md about it.
2019-09-19 20:39:23 +07:00
Bobby Wibowo
c3d61733af
Updated
Added iamdustan/smoothscroll polyfill in dashboard pages.
This will polyfill smooth scroll (when executed programmatically)
for older browers.

No-JS uploader's notice button when on private mode will now also say
"Log in to upload", although auth page will still require JS.

All front-end buttons will now use outlined version. I'm lovin' it.

Auth page will now show a loading spinner if the user has a saved token.
Afterwards, they will still be redirected to dashboard.

Better error handlers in home, dashboard, and auth pages.

Removed <hr> from uploads & users lists in dashboard.

"Manage your token" menu will no longer try to make an API request prior
to displaying its page.
Reloading the page will already trigger token verification anyway.

Updated public/images/fb_share.png.

Updated README.md.

A few other tweaks.
2019-09-19 14:19:11 +07:00
Bobby Wibowo
ea37e0b7d3
Updated
Reduced album title max length from 280 to 70.
Existing albums with longer titles will have their titles truncated in
their public pages, but the original titles will still remain in db.

"Load images for preview" will now properly display its saved value.

Increased max parallel uploads to 10.

"yarn develop" will now also restart safe if some Nunjuck templates are
edited (_globals.njk, _layout.njk, and album.njk).

Better meta tags generation.

Bumped v1 version string.
2019-09-19 08:27:19 +07:00
Bobby Wibowo
9e9b0d4439
Updated
Updated some dev dependencies.

---

Gulp will now build CSS/JS files during development into dist-dev
directory, to prevent IDE's Git from unnecessarily building diff's.

Added dist-dev to ignore files.

---

The entire config fille will now be passed to Nunjuck templates for ease
of access of config values.

Root domain for use in Nunjuck templates will now be parsed from config.

Better page titles.

Updated help message for "Uploads history order" option in
homepage's config tab.

Added "Load images for preview" option to homepage's config tab.
Setting this to false will now prevent image uploads from loading
themselves for previews.

Uploads' original names in homepage's uploads history are now
selectable.

Min/max length for user/pass are now enforced in auth's front-end.

Improved performance of album public pages.
Their generated HTML pages will now be cached into memory.
Unfortunately, No-JS version of their pages will be cached separately,
so each album may take up to double the memory space.

File names in thumbnails no longer have their full URLs as tooltips.
I saw no point in that behavior.

Added video icons.
Homepage's uploads history will now display video icons for videos.

"View thumbnail" button in Dashboard is now renamed to "Show preview".
Their icons will also be changed depending on their file types.

Added max length for albums' title & description.
These will be enforced both in front-end and back-end.
Existing albums that have surpassed the limits will not be enforced.

A few other small improvements.
2019-09-17 11:13:41 +07:00