Commit Graph

52 Commits

Author SHA1 Message Date
Bobby
b2a11ae42c
feat: added loop button to video.js player 2022-05-27 13:44:46 +07:00
Bobby
7d2e2d97e0
feat: use fontello for video.js seek buttons 2022-05-27 13:44:22 +07:00
Bobby
3ec7e6c76c
fix: responsive video.js audio waveform 2022-05-27 11:32:35 +07:00
Bobby
39b7d96b8f
feat: static preview of album description markdown
in dashboard's edit album prompt
2022-05-05 13:17:32 +07:00
Bobby
556bb801f4
chore: removed unused css 2022-03-03 19:26:04 +07:00
Bobby
7ee3ec1ef0
style: adhere to keyframes-name-pattern 2022-03-03 18:54:05 +07:00
Bobby
7194f0c838
feat: transition to stylelint v14 environment
stylelint: 13 -> 14
postcss-preset-env: 6 -> 7
eslint-plugin-compat: 3 -> 4

replaced stylelint-config-standard with
stylelint-config-standard-scss

switched to @ronilaukkarinen/gulp-stylelint, a fork of gulp-stylelint,
due to the upstream's maintainer going missing

temporarily disabled some stylelint rules to ease transition
2022-03-03 18:44:43 +07:00
Bobby Wibowo
cf4a1af209
feat: list albums' total size and zip size 2021-02-12 15:48:40 +07:00
Bobby Wibowo
9b63eda26f
fix: bulma v0.9.2 breaking changes (proper fix) 2021-01-27 23:24:53 +07:00
Bobby Wibowo
c9d9d69204
fix: bulma v0.9.2 breaking changes 2021-01-27 23:19:39 +07:00
Bobby Wibowo
c5647cb8bf
albums sidebar in dashboard is now collapsible
they'll also be collapsed on initial page load

this uses a new client-side dependency, bulma-collapsible
https://github.com/creativebulma/bulma-collapsible

/api/albums to fetch albums list now support simple reply, where only
their ids and names will be returned.
this simple reply will also return all of the user's albums, instead of
being limited to only 9 or 25 entires like before.

fixed add to album in dashboard, and album selector in homepage uploader
being limited to only 25 albums.
2020-12-26 18:49:51 +07:00
Bobby Wibowo
d917bbdf32
apply offset to dashboard icon 2020-12-26 15:10:26 +07:00
Bobby Wibowo
346d9864f3
improved codes for statistics
much more expandable, and should be easier to understand overall.

make more statistics operations run concurrently to speed them up.

make linuxDiskStats config key obsolete by using systeminformation
package to also query for any mounted file systems.
2020-12-25 21:06:21 +07:00
Bobby Wibowo
519d4154e7
Updated 2020-11-03 21:25:07 +07:00
Bobby Wibowo
3da75cd602
linted src/css/player.scss 2020-11-03 20:58:45 +07:00
Bobby Wibowo
f5e70b2d96
Added experimental embedded video.js player thingy 2020-11-03 20:56:32 +07:00
Bobby Wibowo
22e6c2c3c6
Updated
Replaced all Array.concat() with spread operator and/or push().
Fixed some faulty search logics when using exclusion filters.
Fixed capitalization of mac font in _variables.scss. Stylelint somehow
fricked up again in my previous commit.
2020-10-11 17:32:22 +07:00
Bobby Wibowo
59fa4824d2
Updated _variables.scss
File extension change since bulma v0.9.1
2020-10-02 23:54:41 +07:00
Bobby Wibowo
425a32a501
Updated _variables.scss 2020-07-30 05:10:43 +07:00
Bobby Wibowo
34d3601c30
Transitioned styling to Sass
Added new dev dependencies:
bulma, gulp-sass, node-sass

Updated some dependencies

Various other things related to styling

Bumped v1 version string and rebuilt client assets
2020-07-28 21:47:48 +07:00
Bobby Wibowo
3c2abcfadd
Improvements to newsfeed.js
Cleaned up some CSS

Bumped v1 version string and rebuilt client assets
2020-07-28 16:44:04 +07: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
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
8bcee712ac
A toggle button to show original file names
For admins, preference for your personal uploads list and Manage uploads
aren't shared, just like thumbs/lists toggle.

Non-keyed keywords for filtering will now apply to original names too.

Added a new fontello icon for this button.

Various other things I'm too lazy to write.
2020-06-07 12:29:17 +07:00
Bobby Wibowo
5e5d5c5647
Manage albums admin page, and more!
Resolves #194.

Added pagination for Manage your albums page.

Albums sidebar will now only list 9 albums at most.
Use Manage your albums page to view the rest.
Albums in the list will now have View uploads button after all.

Delete album button for albums renamed to Disable album.
Since techincally the server would've always been disabling the albums
instead of deleting them.
It was something upstream dev's decided, and I haven't bothered changing
its behavior.

I'll work on actual Delete album feature some other days.

As the title says, added Manage albums admin page.

Viewing uploads of an album will hook into albumid: filter key.

I'll work on filter and bulk operations some other days.

Updated styling for disabled albums and users.
Instead of havine a line through them, they will be greyed out.
Disable public page of albums will still use line through however.

Links to album's disabled public page are now clickable.

Added a new button styling is-dangerish.
It'll be orange.

Renamed /api/albums/delete to /api/albums/disable.
For backwards compatibility, /api/albums/delete will still work
but automatically re-routed to /api/albums/disable.

/api/uploads/list will no longer print SQLite errors for moderators
or higher when encountering them.
It was originally used to inform moderators of non-existing colum names
when used for sorting.
But on one of the recent commits, I had added a check for allowed colum
names.

Improved some caching in dashboard page.

Added new entries to cookie policy.

Some other small things.

Bumped v1 version string and rebuilt client assets.
2020-06-01 11:44:16 +07:00
Bobby Wibowo
4c2157e7d2
Updated style.css
Fixed .is-wrappable having "wrong" height when empty.
2020-05-26 03:07:52 +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
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
9c56dd327a
Updated dependencies
systeminformation: 4.23.9 -> 4.26.1
eslint-plugin-compat: 3.5.1 -> 3.6.0

Renamed all .eslintrc.json to .eslintrc.js.

Removed unnecessary init for missing params in favor of default params.
Buble will take care of compiling that for old browsers.

Bumped ecmaVersion for client JS from 6 (2015) to 7 (2016).
Buble should support compiling ES2016 features as well.

Properly deny some actions when an online section is still loading.

Properly apply progress cursor on items/buttons that shouldn't be used
while an online section is still loading.

Bumped v1 version string and rebuilt client assets.
2020-05-17 00:11:10 +07:00
Bobby Wibowo
51c5a81b18
!!! RUN "yarn migrate" !!!
Added "yarn migrate" as alias for "node ./database/migration.js".
Updated README.md about it.

Added a new column to users database: registration.
It will be used to store user's registration timestamp.
Registration date will be displayed in Dashboard's Manage Users.
Since this is a new column,
existing users will not have registration dates.

Last token change date will now be displayed in Dashboard as well.

<code> elements will now properly have relative font size.

User ID will now be displayed in Edit user dialog for reference purpose.

Bumped v1 version string and rebuilt client assets.
2020-05-16 22:32:32 +07:00
Bobby Wibowo
7b676bb9fd
Added retina/2x home logo
Rebuilt client assets and bumped v1 version string
2020-05-09 14:40:44 +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
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
e3281a3300
Updated style.css: Color of bolded text in FAQ 2020-04-12 15:25:45 +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
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
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
78cea4a4b9
Fixed margins of upload entries
Previously, margins in "Newer files on top" were bigger due to
difference in handling margins when in flex mode.

I noticed margins are still different in IE on my tests, but bleh.

Bumped v1 version string
2019-11-26 22:15:18 +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
37266fb05b
Fixed chunk size message in FAQ
Updated background color of code HTML tag.

Bumped v1 version string.
2019-10-11 12:53:11 +07:00
Bobby Wibowo
0d51833bbc
Updated
Disable jump to page input when there is only 1 page.

Disable prev/next pagination buttons if applicable.

Updated styling of disabled inputs.

Bumped v1 version string.
2019-10-07 10:34:10 +07:00
Bobby Wibowo
e581edd5d7
Updated progress bar background color 2019-10-07 10:14:27 +07:00
Bobby Wibowo
4f04225ba0
Updated
Added delete user feature.
API: /api/users/delete
json: id<number>, purge[boolean]
By default will not purge out files, but will still clear userid
attribute from the files.
All associated albums will also be marked, and have their ZIP archives
be unliked, if applicable.

Fixed purging albums not properly reporting amount of associated files
that could not be removed, if any.

Fixed moderators being able to disable users by manually sending API
requests, if they at least know of the user IDs.
They could only disable regular users however.
2019-10-07 06:11:07 +07:00
Bobby Wibowo
5e60b01fe6
Updated dashboard.css
I PROMISE THIS IS THE LAST COMMIT FOR TODAY
2019-10-06 05:37:22 +07:00
Bobby Wibowo
9d77a9b9b1
Updated dashboard.css 2019-10-06 05:35:29 +07:00
Bobby Wibowo
510f686250
Updated styling 2019-10-06 05:33:38 +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
84a3de0d8d
Updated
Fixed statistics columns width in browsers except Firefox.

And a few other things.
2019-09-28 16:42:49 +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
Bobby Wibowo
21f39dff9d
Updated
Updated axios to v0.18.1.
Also added its source map.

Updated lazyload to v12.0.0.
Also added its source map.

Added bulma's source map.

---

Moved fontello.css from public/libs/fontello to src/libs/fontello,
to make use of CSS builder.

Updated thumbnails styling to properly make sure the thumbnails are
displayed as 200x200 (their actual configured dimension).

Added fixes to some flexbox's bugs that affect IE 10/11.
The safe should display much better in those browsers now.

Show files' expiry dates in thumbs view.

Updated global error handlers in home.js.
I will do similar setup with dashboard.js in the future.
Just not now, I'm tired.

Only load renders after API request to /api/check has been initiated.

Used native lazyloading on album pages' nojs version.

Removed unnecessary is-expanded class.

Rephrased max upload size disclaimer in nojs uploader page.

Bumped v1 and v3 version strings.
2019-09-16 01:18:22 +07:00