Commit Graph

237 Commits

Author SHA1 Message Date
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
589bf00dd9
Removed rel="noopener" attrib from local links 2020-04-07 01:50:15 +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
5ff512bc7f
Updated FAQ 2019-12-05 03:19:23 +07:00
Bobby Wibowo
9d12fc7701
Added a new TODO entry and updated FAQ 2019-12-02 03:10:23 +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
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
6a934627a2
Added loader icon on dashboard
It will be shown when token is still being verified.

Moved loader icon section from auth.njk to _partial/loader.njk,
which will also be included into dashboard.njk.

Bumped v1 version string.
2019-09-21 11:50:49 +07:00
Bobby Wibowo
6803eb0812
Updated todo.md and nojs.njk
Added another todo entry.

Added required attribute to input file in No-JS uploader. This should
prevent submission when clicking Upload button before selecting any
files.

Removed built-in "safe" filter from some fields in nojs.njk, cause they
were unnecessary.
2019-09-20 01:25:01 +07:00
Bobby Wibowo
8f809e6cd5
Updated _layout.njk
Use "summary_large_image" type for Twitter Cards.
2019-09-19 20:54:27 +07:00
Bobby Wibowo
8ab77a6464
Updated
Removed version strings from _globals.njk,
in favor of src/versions.json.
That versions in that file can be bumped with "yarn bump-versions".
v1 is automatically bumped when doing "yarn build" as well.

Added README file in src directory, explaining versions.json file.

Added README file in scripts directory, detailing usage of each scripts.

Version strings will no longer be appended when cacheControl is disabled
in config file.
After all, version strings are only needed when the static assets are
cached indefinitely in users' browsers.

Initial Cloudflare's cache purging will no longer be executed when
cloudflare -> purgeCache is disabled, even if cacheControl is enabled.
Just in case someone wants to use version strings for other use cases.

Actually use custom metaDesc variable on meta description tag.
2019-09-19 19:10:37 +07:00
Bobby Wibowo
386787c6ce
Updated
Description in album public pages will no longer use h2 tag.
Descriptions that can go up to 4000 chars kinda made no sense to use
that tag.

Use Nunjucks' built-in nl2br tag to replace newlines with <br> tag.

Removed unused macro from faq.njk.

Better extensions filter list in URL uploads tab.

Updated config.sample.js with sample usage of the URL uploads extensions
filter.
2019-09-19 15:30:00 +07:00
Bobby Wibowo
1ff1a4463c
Make original names selectable in nojs uploader 2019-09-19 14:33:50 +07:00
Bobby Wibowo
6c4a99f2e9
Bumped v2 version string
Forgot this was necessary when updating fb_share.png
2019-09-19 14:27:13 +07:00
Bobby Wibowo
6e27115f38
Enforce pass min/max lengths in dashboard 2019-09-19 14:23:48 +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
c3d4bc766e
Updated album.njk 2019-09-19 08:30:02 +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
e6d4d96693
Fixed URLs uploader being disabled & updated todo
etc.
2019-09-17 12:14:25 +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
Bobby Wibowo
4d308206c7
Updated
Added new option "Uploads history order" into homepage's config tab.
When set to "Newer files on top", this will use flex-direction CSS
property to reverse sort the uploads history.

Added new entires to todo.md.

Bumped v1 version string.
2019-09-15 14:20:55 +07:00
Bobby Wibowo
a362d63e25
Updated dashboard.js
Fixed table row when file is not in an album.

Sigh, I always miss something..
2019-09-15 13:39:03 +07:00
Bobby Wibowo
c9ba16e1d6
Updates (very important to read)
Client-side CSS & JS files will now be processed with Gulp.
Gulp tasks are configured in gulpfile.js file.

CSS files will be optimized with postcss-preset-env, which will
auto-add vendor prefixes and convert any parts necessary for browsers
compatibility.
Afterwards they will be minified with cssnano.

JS files will be optimized with bublé,
likewise for browsers compatibility.
Afterwards they will be minified with terser.

Unprocessed CSS & JS files will now be located at src directory, while
the processed results will be located at dist directory.

Due to bublé, the JS files should now be compatible up to IE 11
at the minimum.
Previously the safe would not work in IE 11 due to extensive usage of
template literals.
Due to that as well, JS files in src directory will now extensively use
arrow functions for my personal comfort (as they will be converted too).

The server will use the processed files at dist directory by default.
If you want to rebuild the files by your own, you can run "yarn build".
Gulp is a development dependency, so make sure you have installed all
development dependencies (e.i. NOT using "yarn install --production").

---

yarn lint -> gulp lint

yarn build -> gulp default

yarn watch -> gulp watch

yarn develop -> env NODE_ENV=development yarn watch

---

Fixed not being able to demote staff into normal users.

/api/token/verify will no longer respond with 401 HTTP error code,
unless an error occurred (which will be 500 HTTP error code).

Fixed /nojs route not displaying file's original name when a duplicate
is found on the server.

Removed is-breeze CSS class name, in favor of Bulma's is-info.

Removed custom styling from auth page, in favor of global styling.

Removed all usage of style HTML attribute in favor of CSS classes.

Renamed js/s/ to js/misc/.

Use loading spinners on dashboard's sidebar menus.

Disable all other sidebar menus when something is loading.

Changed title HTML attribute of disabled control buttons in
uploads & users list.

Hid checkboxes and WIP controls from users list.

Better error messages handling.
Especially homepage will now support CF's HTTP error codes.

Updated various icons.
Also, added fontello config file at public/libs/fontello/config.json.
This should let you edit them more easily with fontello.

Use Gatsby icon for my blog's link in homepage's footer.

A bunch of other improvements here & there.
2019-09-15 13:20:11 +07:00
Bobby Wibowo
10a464bc73
Updated
Moved authors info to AUTHORS file.

Updated Git urls in package.json file.

Added .stylelintrc.

Updated all CSS files to respect current Stylelint guidelines.

Updated dependency: knex.js.

Fixed notice message in no-js version of album public pages.

Bumped v1 version string.
2019-09-12 14:44:31 +07:00
Bobby Wibowo
3fcf5a9d6a
Fixed view uploads button in manage users 2019-09-10 23:39:30 +07:00
Bobby Wibowo
264bd88e88
Updated
Improved performance of /api/users/:id (admin's manage users).

Promisify fs.writeFile.

Improved performance of /api/stats.
By a lot in Linux, cause uploads size will be deferred to "du" binary.
In addition, total usage of whichever disk uploads path resides on will
also be queried using "df" binary.
Non-Linux will have to rely on manual calculation by querying DB
for each upload's size.
But logics related to uploads stats were also improved to be almost
twice as fast as before.

Improved parsing of /api/stats results on dashboard.js.
This allows ease of extending server's response by not having to update
dashboard.js by much, if at all.

Improved codes relating to item menus in dashboard's sidebar.
Finally much cleaner now 👍

No longer use /api/upload/delete API route from dashboard.
Single file deletion and bulk files deletion, both from uploads list or
by names, will now properly use a single function that will use
/api/upload/bulkdelete API route.

/api/upload/delete will still be kept indefinitely for backward support.

Fixed oddities with Select all checkbox.

Replaced all instances of modifying HTML element's style attribute with
adding/removing is-hidden CSS helper class.

Rephrased all instances of "files" to "uploads" in any display strings.

Fixed notice message when server is on private mode.

A few other improvements.
2019-09-10 23:31:27 +07:00
Bobby Wibowo
1a0d85cc6c
Updated 2019-09-09 01:21:01 +07:00
Bobby Wibowo
76c543009a
Updated _globals.njk
I need to sleep.
2019-09-08 10:00:14 +07:00
Bobby Wibowo
06ac266bbf
Updated ShareX config 2019-09-08 09:55:25 +07:00
Bobby Wibowo
02e2e402c3
!!! MASSIVE OVERHAUL !!!
As the title says, this commit is a massive overhaul.
I've rewritten/restrucuted almost everything in the controller scripts.
Because of that, there's a considerable possibility that I've broken
something somewhere.

Notable changes:

Added temporary uploads.

Removed file name length changer from dashboard,
in favor of an equivalent in homepage config tab.
This allows non-registered users to also set file name length.

A bunch of other undocmented stuff.
I don't know, I'm too tired to remember them all.
2019-09-08 08:56:29 +07:00
Bobby Wibowo
c33affa68f
Updated
Removed browser settings from dashboard,
in favor of config tab in homepage.
With this even non-registered users can configure the uploader.

Fixed homepage breaking when URL uploader is disabled.

Updated fontello.
Added link, cog-alt, and floppy icons.

Better tabs design in homepage.

Bumped v1 & v3 version strings.
2019-09-02 17:24:04 +07:00
Bobby Wibowo
a9c6ed3915
Updated nojs.njk 2019-09-02 02:35:10 +07:00
Bobby Wibowo
05b905bc9b
Updated
Upgraded dependencies.

Stop adding cache-control header to album zip files unless
config.cacheControl is enabled.

Updated CSS files.
Moved thumbnail-related styling to thumbs.css.
Various other fixes & improvements.

Moved render.js from public/js to public/js/s.

Removed sharex.js in favor of public/js/s/utils.js.
Moved getPrettyDate() & getPrettyBytes() to that JS file as well.

Added lsKeys global variable wherever applicable.
Previously the idea was only used in dashboard.js.

Added No-JS version of album public pages.
You'll only have to add ?nojs to the URL.
Viewing the regular version with JS disabled will show a notice with
a link to the No-JS version of the particular album.
Overall page size of the regular version will now be lower as well,
since there'll be no need to add noscript tag for each thumbs.

No longer show Administrator section to non-admin in the dashboard.
Moderators will ONLY be able to see manage users menu as well.

Simplified FAQ wherever applicable.
Added a new FAQ about bug report or feature request.

Updated link for Firefox extension.
Also pushed Firefox link before Chrome, cause I like it more.

Added browser settings menu to dashboard.
This allows you to choose file size unit (kilobyte vs kibibyte) for that
specific browser.
The preference will be used on homepage, dashboard and album pages.
This also allows you to set chunk size and maximum parallel uploads
for the homepage uploader.

All menu links in the dashboard will now scroll to the content once
loaded.
Previously it would only do so with manage uploads/users when
switching pages.

Refactored all instances of for-in & for-of loop from browser JS files.
For the sake of uniformity, for now.
2019-09-02 02:23:16 +07:00
Bobby Wibowo
b77d4b7c65
Updated
Make ellipsis in pagination clickable.
It will set focus to the jump to page input, and "select" its value.
Allowing user to simply type in any numbers and press Enter to navigate.

Bumped v1 version string.
2019-08-27 05:23:54 +07:00
Bobby Wibowo
dcc393e7e0
Updated
Trim user & pass upon login / registration, on both client & server.
Users that might have already had whitespace prefix/suffix will need to
have their usernames manually updated in the database.

Warp various text inputs in the dashboard into HTML form.
This will make them be submittable when pressing Enter on the keyboard.

Switching page using the prev/next buttons, pagination, and jump to page
input, will now scroll the view to the top of the page element.

Bumped v1 version string.
2019-08-27 05:00:57 +07:00
Bobby Wibowo
3a398721b5
Updated
* Replaced all instances of getElementById and getElementsByClassName
with querySelector or querySelectorAll.

* Updated utilsController.js to stop disabling
no-async-promise-executor eslint rule.

* Removed unused lines in dashboard.njk.

* Refactored maxFileSize to maxSize in home.{css,js,njk}.

* Updated ClamAV codes in lolisafe.js. No more pinging.
Since querying version will also check connection anyway.

* Option "Upload to album" in homepage is now selectable.
Selecting this option will restore the uploader to not associate files
with an album.

* Fixed uploader to properly respect server's max file size.
Also updated error message of file size to use MB instead of MiB.

* Creating an album from homepage will automatically select the album.

* Updated Dropzone.js to v5.5.0.

* Bumped v1 & v3 version strings.

* Various other small fixes.
2019-08-20 09:16:34 +07:00
Bobby Wibowo
72f58e6eec
Updated
Updated random render script.

Added a new render category (miku). Choice is currently hard-coded.

Added 50 renders for miku category.

Bumped v1 & v4 version strings.
2019-08-18 21:52:19 +07:00
Bobby Wibowo
63e26462ea
Updated
Pressing Enter on the auth form will now properly make it try to login.

Slightly better error messages on auth page.

Bumped v1 version string.

Updated dependencies (knex & sqlite).
2019-08-18 16:57:56 +07:00
Bobby Wibowo
6496b03b71
Updates
Updated deps.

Re-enabled eslint rule no-async-promise-executor.
Updated some codes to follow the said rule.
Though I had to disable the rule in a line at utilsController.js
due to complexity.
I'll give it more thoughts in the future.

Bumped v1 version string.
2019-08-04 06:37:55 +07:00
Bobby Wibowo
e275ab16ae
Updated
yarn.lock:
+ Rebuild dependencies. I'm starting to think dependabot isn't quite reliable.

auth.js + home.js + _globals.njk:
+ Updated a few error handlings to handle error messages better.
2019-07-03 22:56:45 +07:00
Bobby Wibowo
add2970ae6
Updated
uploadController.js:
+ Close connection earlier when there are no upload when querying them.

dashboard.css + style.css:
+ Updated styling involving pagination and progress bar.

dashboard.js:
+ Fixed dashboard failing to handle cases where a user attemp to load
a next page when there are not enough uploads available.
+ Added a simple loading message as a placeholder when trying to view
Stastistics menu, since it may take a while in big servers.

bulma.min.css + LICENSE:
+ Updated bulma from 0.7.2 to 0.7.5.

_globals.njk:
+ Bumped v1 and v3 version strings.
2019-06-19 01:48:30 +07:00
Bobby Wibowo
06ac31d02e
Updates (dashboard)
+ Better pagination.
+ Added more advanced filtering system in Manage Uploads.
It now supports filtering with multiple usernames and/or IPs.
It also supports refining the matches with wildcards.

Todo?
Perhaps add simple file name filtering for regular users in the future?
2019-06-18 02:34:15 +07:00
Bobby Wibowo
f48cbd1960
Updates
config.sample.js + uploadController.js:
+ Added option uploads > storeIP to toggle whether to store uploader's
IPs into the database.

uploadController.js + dashboard.js:
+ Added IP column when listing all uploads.
+ Improved album query when listing uploads. In addition, no longer
query album when listing all uploads.
+ Delegate some tasks to client when listing uploads to save server's
processing power, kek.
Such as building the file's full URLs, and assigning album/user names.

_globals.njk:
+ Bumped v1 version string.
2019-06-04 07:57:37 +07:00
Bobby Wibowo
4bee2ef376
Updated _globals.njk
I forgot I need to bump this version after updating dashboard.js
in a previous commit.
2019-06-04 02:47:05 +07:00
Bobby Wibowo
cbbebcf829
Updated unicorn_6.png
Forgot to remove render watermark, lmao
2019-04-20 17:08:40 +07:00
Bobby Wibowo
b754470630
Updated albums public page
File size when JavaScript is disabled will now properly use B suffix.
It's referring to the fact that their unit is bytes.

Disclaimer about this. Back-end will only return the file size in bytes,
front-end is supposed to convert them into prettier units (KB, MB, ...).

Nothing much can be done if front-end have JavaScript disabled.
I don't want to defer the task, prettying the units, to back-end.
2019-04-19 11:56:57 +07:00
Bobby Wibowo
ecb8afbe40
Updates
Updated fontello (added block and doc-inv icons).

Upload results will now show either doc or block icon on top of the
file name depending on the status of the upload
(unless the uploads are images, in which case they will still show
thumbnails instead).

Added support for customizable timeout and chunkSize options for ClamAV
scanning to the config file.

Bumped v1 and v3 version strings.
2019-04-18 16:06:14 +07:00
Bobby Wibowo
9b1cb06825
Updated dashboard.js
Oversight.
2019-04-12 07:53:44 +07:00
Bobby Wibowo
13081ef38a
Re-worked caching for statistics
I guess I'll work on adding charts someday.
2019-04-12 07:45:33 +07:00
Bobby Wibowo
8c3fb78135
Upates
* Added Statistics menu to Administration items in dashboard.

* Added /api/stats route.

Imo, my implementation of this whole thing is rather dirty-ish, but hey
as long as it works.

I'll be using lolisafe2 for future devs tbh.
2019-04-06 00:32:52 +07:00
Bobby Wibowo
5180005625
Updated faq.njk 2019-04-05 09:27:10 +07:00
Bobby Wibowo
458584d681
Updated _globals.njk
Forgot to bump v1 version string.
2019-03-28 03:49:03 +07:00
Bobby Wibowo
28f1e691bc
Updated renders 2019-03-28 03:33:38 +07:00
Bobby Wibowo
8140ff4d71
Updates
Rewritten function to generate video thumbnails with ffmpeg.
This should be much faster than ever.
This should also solve an issue where potrait videos could have their
thumbnails be taller than 200px, since it was only forcing width to be
no larger than 200px.

Updated dashboard's styling to make sure potrait thumbnails (only matter
for video thumbnails) not going out of its container.

Updated thumbs.js (yarn thumbs) script to display elapsed time for each
operation in seconds.

Bumped v1 version string (for dashboard.css).
2019-01-30 02:50:45 +07:00
Bobby Wibowo
209f5429cd
Updates
Added .tiff, .tif, and .svg to allowed image extensions for thumbs gen

Added .svg to allowed image extensions for preview in uploads result
2019-01-18 08:15:53 +07:00
Bobby Wibowo
f2a6daea46
Updated album.js and dashboard.js
Updated getPrettyBytes() function.
Previously it was doing something wrong with size under 1024 bytes.
2019-01-14 20:06:57 +07:00
Bobby Wibowo
fe24198517
Updated dashboard.css
Break-all extension name in thumbs view.
2019-01-14 20:00:08 +07:00
Bobby Wibowo
907ba3960a
Updated render.js
Version string for random renders will now use globals.v4 (new variable)
instead of globals.v1, since globals.v1 changes a lot more often.
Hence to allow this to happen, data-version attribute will now be added
to <script> tag of render.js in home.njk.
2019-01-14 19:44:09 +07:00
Bobby Wibowo
a71b06df2b
Updated dashboard.css
Better styling for thumbs view.
This ensures that extension names won't be cropped with certain fonts.

Increased non-hover opacity of checkboxes in thumbs view.
2019-01-14 19:33:53 +07:00
Bobby Wibowo
8780d6429b
Updates
NoJS uploader will now display the original file names in the results.

lolisafe.js will now automaticaly purge Cloudflare's cache of frontend
pages everytime it launches.
Of course this only applies when cacheControl is on in config file.
This sorta makes scripts/cfpurge.js script obsolete.
2019-01-09 17:11:45 +07:00
Bobby Wibowo
20912a6dff
Updated dashboard
Display thumbnail feature in dashboard will now contain images smaller
than 200x200 in a 200x200 container and align them in the center.
2019-01-09 12:04:21 +07:00
Bobby Wibowo
244b327e19
Updated dashboard.js
Added loading animation to pagination buttons.
2019-01-08 05:54:12 +07:00
Bobby Wibowo
3c49d81b3a
Updated dashboard.js
Fix checkboxes
2019-01-06 05:53:08 +07:00
Bobby Wibowo
72f32988ea
Invalidate existing cache of public assets 2019-01-06 04:38:29 +07:00
Bobby Wibowo
69a7334aa4
Updated faq.njk 2019-01-05 11:58:38 +07:00
Bobby Wibowo
543f92591b
Updated faq.njk
Add newlines.
2019-01-05 11:56:46 +07:00
Bobby Wibowo
e81776c482
Updated faq.njk
Clarify server location and uploads caching by CDN.
2019-01-05 11:54:29 +07:00
Bobby Wibowo
8072f2fdf7
Updates
Updated page.getPrettyBytes() in dashboard.js and album.js to support
non-SI units (which is by 1024 instead of 1000).
With that said, all "pretty bytes" display in dashboard and
album's public pages will now use non-SI units.

Bumped v1 version string.
2019-01-05 04:34:54 +07:00
Bobby Wibowo
36b204da64
Updates
Updated icon of View uploads button in Manage users page.

Updated fontello to include the icon.

Bumped v1 and v3 version strings.
2019-01-03 11:54:20 +07:00
Bobby Wibowo
2b0969dc77
Updates
Updated keys for local storage. They're now using camel case.
Not sure why I didn't use camel case in the first place.

View type and selected files of Uploads and Manage uploads (your own
uploads and all uploads, respectively) are now stored separately.

Added "filter by username" in Manage uploads.

Added "jump to page" in all uploads/users view.

Updated fontello (added filter icon).

Bumped v1 and v3 version string, due to dashboard.js and fontello
respectively.

Curly rule fix for routes/nojs.js.
2019-01-03 11:49:56 +07:00
Bobby Wibowo
765f8c9880
Better image thumbnailer
Images smaller than 200x200 will no longer be resized upwards, instead
they will be padded with transparent pixels.
This was the old behavior before we switched from GM to sharp.

With GM, its resize() function would do exactly that, but I couldn't
figure out how to do the same with only sharp's resize() function, so I
had to make do with a combination of resize() and extend().

Also updated error messages in dashboard when trying to load
out-of-index page in uploads/users lists.

Updated v1 version string due to dashboard.js being modified.
2019-01-03 08:54:46 +07:00
Bobby Wibowo
31a6940ab4
Updates
Added pagination to uploads and users list.
With that, /api/uploads and /api/users API routes will now add "count"
property to their response object.

Enabled Delete user button in users list.
With that also added /api/users/disable API route.
As usual, you can only disable users whose usergroup is lower than
your own.

Click event will no longer trigger on "disabled" elements (basically any
elements with "disabled" attribute).

Changed all arrow functions into regular functions in public JS files
(there were only a few that I somehow missed).

Bumped v1 version string.
2019-01-02 02:39:08 +07:00
Bobby Wibowo
d723c0f562
Updates [!! update config.js !!]
Added extended support for URL uploads.
Namely URL proxy support and separate extensions filter (as in separate
from the primary extensions filter).
There's also a new option to set a disclaimer message that will be
printed underneath the URL uploads form.

Trust proxy is now toggleable from the configuration file.
I think they should only be enabled when you're behind proxy such as
Cloudflare or Incapsula.
I'm not sure how it behaves with only a bare nginx reverse proxy though.

Empty files can now be filtered.

Sorted preset extensions filter in config.sample.js.

Rephrased some options in config.sample.js as well.

maxTries now default to 3 in config.sample.js.

Various other small changes.
2018-12-20 18:53:37 +07:00
Bobby Wibowo
bba6836708
Updated _globals.njk 2018-12-19 18:25:58 +07:00
Bobby Wibowo
7665836ef4
Updates
Added total size to album public pages.
2018-12-13 20:31:24 +07:00
Bobby Wibowo
7d55b43ef2
Updated album.njk
Use album's description on OG tags.
2018-12-13 16:13:03 +07:00
Bobby Wibowo
da86f605c6
Updates [!! run database/migration.js !!]
Added description column into albums.
So yeah, now albums can have description.
It'll only be shown in the album's edit popup and public link.

HTML chars will now be escaped from album's name and description.

Removed message warning about CDN cache from album's public link.
A shortened version will be shown as the download button's tooltip.

Darkened color of textarea's placeholder.

Bumped v1 version string.
2018-12-13 16:09:46 +07:00
Bobby Wibowo
42b6c74711
Updated dashboard.css
Removed height animation from sidebar albums list.
I liked it back then, but now I simply find it an eyesore, kek.
2018-12-13 15:01:30 +07:00
Bobby Wibowo
f9f653997e
Updates
Removed type attribute from all LINK and SCRIPT tags to follow the
recommended practice of HTML5.
2018-12-11 19:31:48 +07:00
Bobby Wibowo
1eafafe8a7
Updates
* Fixed home page going out of bound due to git commit message.

* Git commit message will no longer have dotted underline. The old solution by using border-bottom wasn't suitable when the text is being split by word-break, but text-decoration-style wouldn't look as good due to its distance from the text being too close.

* Updated bulma to 0.7.2.

* Bumped v1 and v3 version strings.

* Various other small tweaks.
2018-12-08 05:10:35 +07:00
Bobby Wibowo
07b4ef8fc2
Updates
Added a new config entry named "cacheFileIdentifiers". More info in config.sample.js file.

Improved some descriptions in config.sample.js file.

Added some CSS animations wherever applicable.

Bumped v1 version string.
2018-12-04 18:58:53 +07:00
Bobby Wibowo
6543a87b11
Updates
Reworked unique name generator to prevent the same unique identifier from being used if it was already used with a different extension (e.i. If a file named aBcD.jpg already exists, then files such as aBcD.png or aBcD.txt may not exist).
This is mainly to deal with the fact that thumbnails are only being saved as PNG, so if the same unique name is being used by multiple image/video extensions, then only one of them will have the proper thumbnail.
If you already have existing files with matching unique name but varying extensions, unfortunately you can only deal with them manually for now (either allocating new unique names or deleting them altogether).

Added a new config option to filter files with no extension.

Files with no extensions will no longer have their original name appended to the allocated random name (e.i. A file named "textfile" used to become something like "aBcDtextfile", where "aBcD" was the allocated random name. Now it will only just become "aBcD").
In relation to that, utils.extname() function will now always return blank string if the file name does not seem to have any extension.
Though files such as '.DS_Store' (basically anything that starts with a dot) will still be accepted.
Examples:
.hiddenfile => .hiddenfile
.hiddenfile.sh => .sh
.hiddenfile.001 => .hiddenfile.001
.hiddenfile.sh.001 => .sh.001

Simplified error messages of /api/upload/finishchunks.

Most, if not all, of the error responses for /api/upload* will now have HTTP status code 400 (bad request) instead of 200 (ok).
I plan to generalize this for the other API routes in the future.

Updated home.js to properly handle formatted error message when the response's status code is not 200 (ok).

Bumped v1 version string (due to home.js).
2018-11-29 00:52:12 +07:00
Bobby Wibowo
6e160fa039
Added PrivateBin to footer links
Also updated fontello to include its icon
2018-11-24 20:58:33 +07:00
Bobby Wibowo
de87c37d66
Allows render.js to append version string to renders
Thus if you need to update an existing render, you just need to update v1 version string, and the new version string will be appended to the render's URL, thus forcing browser to refresh.

Also updated javelin_1.png since apparently I missed a tiny bit of watermark.
2018-10-23 18:02:19 +07:00
Bobby Wibowo
1517778ed7
Improve 2018-10-19 22:10:30 +07:00
Bobby Wibowo
e5417f0aa2
Restore modals to their original size after done with viewing originals 2018-10-19 21:57:15 +07:00
Bobby Wibowo
dd6934c540
Fixed lazyload breaking in uploads result 2018-10-18 20:40:47 +07:00
Bobby Wibowo
2bdb1d7245
Do not save into localStorage if render is enabled
We do not really want to save anything into user's storage/cookie unless necessary
2018-10-18 20:34:05 +07:00
Bobby Wibowo
cf570347e6
Updates
* Added ship waifu renders to homepage. These renders are toggleable since some of them maybe a bit NSFW-ish (state saved to browser's local storage).

* Updated lazyload to v10.19.0.

* Git commit URL is now have dotted bottom border.

* Thumbnail modal (the one that appears when you click display thumbnail button in lists view) now have a "Load original" button. For images it will simply load the original images, but for videos it will show a video player (relies on the browser's support for <video> tag). Thumbs view will now also have the "display thumbnail" button.

* Small changes to "add to album" modal.

* Small changes to alignment to modals in general.
2018-10-18 20:26:40 +07:00
Bobby Wibowo
0403684038
Fixed albums listing not working 2018-10-14 02:35:46 +07:00
Bobby Wibowo
c763d9b1ea
Fixed thumb/list view setting not being saved 2018-10-13 11:09:39 +07:00
Bobby Wibowo
94dbfa9d96
Fixed broken description in file name length menu 2018-10-12 17:28:42 +07:00
Bobby Wibowo
8e46eaf4ac
Added disk usage column to manage users 2018-10-12 17:19:14 +07:00
Bobby Wibowo
31f44a1b91
Added ID and uploads count columns into manage users
Updated client-side check of user's enabled status to match server-side

Removed a bunch of console.log()'s from development
2018-10-12 16:42:16 +07:00
Bobby Wibowo
5cf8480959
Updated _globals.njk
Bumped version string (v3). I updated fontello in this branch but I forgot to update its version string.
2018-10-12 16:11:39 +07:00