Commit Graph

910 Commits

Author SHA1 Message Date
Bobby Wibowo
f189d86abc
Updated uploadController.js
Fixed filtering null albumid
2020-05-03 04:40:04 +07:00
Bobby Wibowo
3d11e6a0ba
Updated dashboard.js
Bumped v1 version string and rebuilt client assets
2020-05-03 04:37:12 +07:00
Bobby Wibowo
126cfe0e15
Added type-is filter keys (is:image and is:video)
Fixed text queries threshold being applied to moderators

Bumped v1 version string and rebuilt client assets
2020-05-03 04:32:45 +07:00
Bobby Wibowo
d201b03f59
Added filtering uploads by albumid
This works when listing all uploads as well, but Album column will only
be shown when albumid key is used in the filters.
I plan to someday add Manage Albums menu, which will use "View uploads"
buttons, just like the ones in Manage Users.
2020-05-03 03:30:50 +07:00
Bobby Wibowo
1980d536db
Initialize upload filters for regular users (WIP)
Updated ESLint's ECMA version to 9 (2018).
I'll need to use some lookbehind regex directives from now on.
It's supported since Node 10, which is the oldest version I'll support.

Refactored "can not" -> "cannot".

Filtering for regular users is still work in progress.
Some features aren't working as expected yet.
2020-05-03 02:39:24 +07:00
Bobby Wibowo
0eb425e216
Fixed next page btn clickable w/ no uploads/users 2020-05-02 22:47:04 +07:00
Bobby Wibowo
41d52d947b
Added support for negative page num
e.g. -1 means last page, -2 means the 2nd from last, and so on
will only accept up to -N where N is the amount of pages
anything lower will alwasy return the first page
this works for both list uploads and list users APIs

fixed some Object.assign in dashboard.js

added bottom control buttons in manage users
2020-05-02 22:42:23 +07:00
Bobby Wibowo
89e5f775ec
Add bottom controls buttons for uploads list 2020-05-02 22:09:51 +07:00
Bobby Wibowo
19b4a5e217
Updated Linux-only disk stats
Restore disk usage stats even when config.linuxDiskStats is off

The said config will now only toggle the 'extended' stats which are
disk usage of each directories within the uploads directory
2020-05-02 19:28:13 +07:00
Bobby Wibowo
ee443b5108
Updated dependencies
express-rate-limit: 5.1.1 -> 5.1.3
systeminformation: 4.23.8 -> 4.23.9
2020-04-30 05:58:47 +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
4759995ff3
Updated README.md
Updated screenshot.

Edited claim about node 12 not being tested, as I've tested it.
Couldn't find any issues.

Added a new section about updating when you have modified some files.

Rephrased ClamAV support section a bit.

Updated dependencies:
knex: 0.21.0 -> 0.21.1

Rebuilt yarn.lock file with node 12.
Nothing significant really changed.
Things seem to be backward compatible to node 10.
2020-04-29 13:31:13 +07:00
Bobby Wibowo
e73514b62e
Updated dependencies
sqlite3: 4.1.1 -> 4.2.0
systeminformation: 4.23.5 -> 4.23.8
stylelint: 13.3.1 -> 13.3.1
2020-04-28 06:10:25 +07:00
Bobby Wibowo
12516032e1
Updated disabled JS warning
Moved <style> tag from <noscript> tag into <head> tag.

Auto-redirect visitors with JS disabled to either No-JS uploader or
No-JS version of album pages after 3 seconds.

Those changes can be found in a new NJK file at the location below:
views/_partial/noscript-refresh.njk

Made the warning a lot more concise.
2020-04-24 01:18:25 +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
8932615fbb
Updated dependencies
Updated README.md to emphasize Node 10.x is the oldest supported version
and that Node 12.x have NOT been tested.

I'll work on testing Node 12.x in the near future though!
2020-04-21 17:12:00 +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
3b1779e492
Updated src/README.md 2020-04-20 01:54:54 +07:00
Bobby Wibowo
99cdcb9bdb
Updated dashboard
Disable all pagination buttons when any pagination button is still
loading (this includes jump to page input).

Rebuilt client assets and bumped v1 version string.
2020-04-20 01:52:41 +07:00
Bobby Wibowo
922269181c
More improvements to uploads filtering!
Renamed "orderby" key to "sort" (for sorting uploads).

Fixed non-keyed keyword exclusions not working as expected when
more than one are used at the same time.

Support not specifying "from" date when filtering with range keys
(date and expiry).

Proper logic for NULL values inclusion/exclusion when filtering with
user and/or ip keys.

Improved Help? prompt again!!
Also clarify about timezone differences.

Added logger.debug() function.
Basically a shorthand for console.log(require('util').inspect()).

Rebuilt client asssets and bumped v1 version string.
2020-04-20 01:19:20 +07:00
Bobby Wibowo
dc59476592
Updated utilsController.js
Suppress more ffmpeg/ffprobe error messages
2020-04-19 21:52:34 +07:00
Bobby Wibowo
48172b0805
Updated scripts/thumbs.js
Warn users when verbose logging is disabled
2020-04-19 21:48:56 +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
3e3878b93c
Massively overhauled uploads filtering endpoint
Please consult the Help? button again to learn all the syntax changes!
The prompt will now also have its width expanded!

Updated dependency, knex: 0.20.13 -> 0.20.15.

Added new dependency: search-query-parser.

Updated all sub-dependencies.

Critical? Admins-only API /users/edit will no longer return NEW password
salt of the user when randomizing their password.

Added page.escape() function to js/misc/utils.js.
This will be used to escape input in upload filters input box.
The same function used in utilsController.js.

Pretty dates will now use / instead of - for date separator.
This is due to the fact that date range key for filtering uploads
can not accepts dates with - separator.
To avoid inconsistency, we will now use / separator.

Caching system of album public pages will now be disabled during
development (yarn develop).

Cleaned up domClick() function in js/dashboard.js.

If using date or expiry range keys when filtering uploads, attach
client's timezone offset to the API requets.
This will be used by the server to calculate timezone differences.

Success prompt when changing token will now auto-close.

Removed ID column from Manage Users.

Improved success prompt when editing users.
This will properly list all of the edited fields at once,
excluding user group change.
Success message for user group change will require a bit more changes
on the API endpoint, which is a bit annoying.

Rebuilt client-side assets and bumped v1 version string.
2020-04-19 02:52:11 +07:00
Bobby Wibowo
1c260c87b0
Added feature to create new user from Manage Users
New admins-only API route: /api/users/create

Restored checkboxes and bulk buttons in Manage Users
Currently useless, as bulk operators are still WIP

Added filter input in Manage Users, currently WIP

Rebuilt client-side assets and bumped v1 version string
2020-04-17 14:25:18 +07:00
Bobby Wibowo
7389ac6c07
Init support for filtering with keywords (WIP) 2020-04-17 13:36:57 +07:00
Bobby Wibowo
940be1ad99
Updated uploadController.js
Filters input in Manage Uploads will now display error if it's filled
with invalid filter/sort keys.
SQLITE_ERROR will also now be forwarded to users if they're moderators.
The expectation is to only display it when used through Manage Uploads.
2020-04-12 16:30:33 +07:00
Bobby Wibowo
e5041a6d0b
Updated dependencies
systeminformation: 4.23.1 -> 4.23.3
stylelint: 13.3.0 -> 13.3.1

Rebuilt client assets. Affected file:
dist/js/dashboard.js.map

Bumped v1 version string.
2020-04-12 15:29:14 +07:00
Bobby Wibowo
e3281a3300
Updated style.css: Color of bolded text in FAQ 2020-04-12 15:25:45 +07:00
Bobby Wibowo
69af0549d5
Updated FAQ: Albums 2020-04-12 15:24:22 +07:00
Bobby Wibowo
2f0560ee1e
Updated FAQ
Removed extra margin from whitelist/blacklist extensions list
2020-04-12 15:22:07 +07:00
Bobby Wibowo
584b29d1cf
Added FUNDING.yml 2020-04-09 03:12:42 +07:00
Bobby Wibowo
049b41f7ea
Improved FAQ page by a lot
Added categories
Added more questions (including link to my brand new Patreon)
Added a floating button to return to the homepage uploader
A bit of CSS prettifying (style.css)
2020-04-09 02:59:58 +07:00
Bobby Wibowo
325ccfac81
Added config option to enable linux disk stats
The option is disabled by default.
Meaning you need to explicitly set it to true to restore
the old behavior.

The one that uses both "df" and "du" binaries.
I found them to be very slow with 100k+ uploads
on my ancient potato server.
2020-04-08 07:08:18 +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
2d1db2bd01
Updated log message for expired uploads deletion 2020-04-07 02:46:04 +07:00
Bobby Wibowo
589bf00dd9
Removed rel="noopener" attrib from local links 2020-04-07 01:50:15 +07:00
Bobby Wibowo
091f386a3b
Forgot to rebuild client-side JS files 2020-04-04 23:49:41 +07:00
Bobby Wibowo
8f50ba49c0
Added sorting feature for Manage Uploads
This adds support for a new key named 'orderby'.
The key needs to be used with internal column names used in the db.
The key can be used more than once.
Help message in Dashboard's Manage Uploads have been updated to include
examples using the said key.
2020-04-04 23:36:43 +07:00
Bobby Wibowo
f534ac2e4d
Updated all dependencies
Updated lolisafe.js
2020-04-04 22:08:37 +07:00
Bobby Wibowo
24b9a8ac78
Updated pathsController.js 2020-04-04 21:20:17 +07:00
Bobby Wibowo
46fa9677ff
Extended configuration for virus scanning
Added whitelist extensions
Added max size limit
2020-04-04 21:20:01 +07:00
Bobby Wibowo
6741798085
Updated all dependencies 2020-03-24 15:06:54 +07:00
Bobby Wibowo
3a787ade65
Dropped support for Node 8, and more
Updated all dependencies.

Some latest version of dependencies such as bcrypt and sharp
requires Node 10+.

Updated fontello.css to uses latest version string from versions.js.
When updating version strings in commit
2670db269d, I forgot to rebuild this css.
2020-03-10 00:10:36 +07:00
Bobby Wibowo
609753f1e9
Make Helmet's HSTS configurable from config file
Closed #115
2020-02-13 15:03:31 +07:00
Bobby Wibowo
783ac81bf7
Updated
lolisafe.js: fixed a logic

faq.njk: fixed typo
2020-02-13 14:37:19 +07:00
Bobby Wibowo
5adbe84896
Updated FAQ to remove bits about Cloudflare 2020-02-11 17:30:03 +07:00
Bobby Wibowo
d6d085d161
Removed git stash from yarn pull 2020-02-11 17:22:59 +07:00