Commit Graph

122 Commits

Author SHA1 Message Date
Bobby Wibowo
dab69e5882
Updated built-in error pages
I just noticed the old ones were loading font assets from my server,
but those fonts were already long gone.

On safe.fiery.me, I instead used my own builds of
BobbyWibowo/HttpErrorPages
so I never noticed the issues.

I only recently came to realize of this after realizing a bunch of
users getting temp-IP-banned from viewing error pages of other users of
this fork (since my server bans high amount of 404s).
2020-05-24 03:45:36 +07:00
Bobby Wibowo
0d38995b2b
Updates
* When gitHash in config.js is set to true, latest commit hash of the currently enabled git repo/branch will be displayed in home and nojs uploader pages.

* Error pages can now be configured with errorPages option (their root directory and their file names).
2018-09-20 18:41:17 +07:00
Bobby Wibowo
4d7b23bb39
Initial commit at browser-ecma6 branch
This commit is intended to downgrade codes in JS files used for browser to increase browsers compatibility.

This branch is still experimental and may require much more testing.
2018-07-14 10:42:18 +07:00
Bobby Wibowo
4660200b1e
More improvements to albums, and others
Improvements related to albums:

* Changed "rename album" option with a better "edit album" feature. With it you can also disable download or public link and even request a new public link (https://i.fiery.me/fz1y.png).
This also adds a new API route: /api/albums/edit.
The old API route, /api/albums/rename, is still available but will silently be using the new API in backend.

* Deleting album will now also delete its zip archive if exists.

* Renaming albums will also rename its zip archive if exists.

* Generating zip will use async fs.readFile instead of fs.readFileSync. This should improve generating speed somewhat.

* The codes that tries to generate random identifier for album will now check whether an album with the same identifier already exists. It will also rely on "uploads.maxTries" config option to limit how many times it will try to re-generate a new random identifier.

* Added a new config option "uploads.albumIdentifierLength" which sets the length of the randomly generated identifier.

* Added "download" and  "public" columns to "albums" table in database/db.js.
Existing users can run "node database/migration.js" to add the columns.

Others:

* uploadsController.getUniqueRandomName will no longer accept 3 paramters (previously it would accept a callback in the third parameter). It will now instead return a Promise.

* Album name of disabled/deleted albums will no longer be shown in uploads list.

* Added "fileLength" column to "users" table in database/db.js.

* Renamed HTTP404.html and HTTP500.html in /pages/error to 404.html and 500.html respectively. I'm still using symlinks though.

* Added a new CSS named sweetalert.css which will be used in homepage, auth and dashboard. It will style all sweetalert modals with dark theme (matching the current color scheme used in this branch).

* Updated icons (added download icon).

* Some other improvements/tweaks here and there.
2018-04-29 00:26:39 +07:00
Bobby Wibowo
6cc6928c62
Merging all the changes from 'master'
There's nothing much really. Here's a summary:
* Added dmca.gripe to README.md.
* Updated chrome extension's instruction in README.md.
* Bumped year in LICENSE.
* Moved error pages from /pages/errors to /pages/error.
* Added a README.md to /pages/error clarifying the fact that this repo is using symlinks for error pages.
2018-04-26 19:28:31 +07:00
Shumatsu
44ca2dd53d De loli-safe (#77)
* Change all occurences of loli-safe to lolisafe

Saw that repository was renamed, links were changed, but a lot of files of lolisafe were unchanged. So I followed the links and changed what seemed safe to change. Which turned out to be all occurences. 

Also, bumped the copyright.

* Change year in LICENSE

This seems to be the proper format.

* Image fix

It was out of focus.

* Relative image path

Heard on StackOverflow it can be done like this.
2018-04-26 08:54:07 +02:00
Bobby Wibowo
09f51c8448
Updates~ 😉
Thanks to Zephyrrus for the hints about nunjucks, sort of (he did not really give out any specific hints to me, I stalked his fork, lmao).

* Replaced Handlebars with Nunjucks.

* Replaced all static HTML files with their NJK-equivalent (excluding error pages).

* Renamed "albumDomain" to "homeDomain" in config.sample.js (make sure you update your config.js too).

* Updated dependencies: knex and eslint-plugin-import (dev).

* Updated vscode's settings.json (I may update this again very soon).
2018-04-19 04:00:36 +07:00
Bobby Wibowo
1aee22d6a2
Updated faq and dashboard
* Added box-shadow to thumbnail container in thumbs view.

* Added -webkit- prefix to box-shadow in faq.html (also applied to the new one in dashboard.css for dashboard).
2018-04-16 23:31:05 +07:00
Bobby Wibowo
f4c6b01f92
Updated faq.html
Removed border from and added box-shadow to message-body.
2018-04-16 23:17:02 +07:00
Bobby Wibowo
b83f4e3ce2
Updated home.css
Fixed wrong border-radius for logo.
2018-04-13 23:30:41 +07:00
Bobby Wibowo
dd43acecea
Updates
* Added VSCode settings to git repo. Now you can match yours with mine, if you want.

* Added .jsbeautifyrc for js-beautify (to be used by VSCode's Beautify extension).

* Refactored all instances of require('**/*.js') with require('**/*') wherever applicable (basically gotten rid of the .js extension).

* Refactored path in all instances of require() wherever applicable.

* Sorted instances of require() wherever applicable.

* Fixed 500 HTTP error trying to load an error page for 505 HTTP error.

* Removed special treatement of NoJS page from uploadsController.processFilesForDisplay().

* Updated version string of all static files.

* Beautified all HTML, HANDLEBARS and CSS files.

* Refactored the structure of footer links in homepage and No-JS uploader. This should now fix homepage going out-of-bound in smaller screens.

* Added CSS prefixes wherever applicable.

* Improved back-end side of No-JS uploader. This will now handle errors properly.

* No-JS uploader will now show max file size.

* No-JS uploader will now show a proper message when private mode is enabled and/or registration is disabled.
2018-04-13 23:20:57 +07:00
Bobby Wibowo
4923cf9800
Updates
* Added No-JS uploader page (it's on /nojs).

* Updated uploadsController.processFilesForDisplay() to support requests from No-JS uploader page.

* Added "Bash uploader" link to footer.

* Updated icons (added terminal icon for "Bash uploader" footer link).
2018-04-12 21:37:42 +07:00
Bobby Wibowo
9669d87cb5
Updates
Added placeholder ShareX config file.
2018-04-12 19:26:24 +07:00
Bobby Wibowo
4a7b407ccd
Updated dashboard
Added ID column to albums list (https://the.fiery.me/HtUb.png).
This info may be useful if you want to use something like my fork of uguush (https://github.com/BobbyWibowo/uguush/tree/lolisafe-kde), because to associated uploads into an album, you will have to specify its numerical ID.
2018-04-12 19:15:25 +07:00
Bobby Wibowo
8af32c457f
Updated dashboard
I accidentally removed 100% width from image container, causing files that did not have thumbnails to be left-aligned instead of centered, or something like that.
2018-04-09 01:48:32 +07:00
Bobby Wibowo
7978325cd6
Updates
* Removed rimraf from dependency. Although really it'll still need to be used by other dependencies, such as eslint and bcrypt, so it'll still have to be downloaded by yarn either way.

* Updated dashboard.css. Added "overflow: hidden" to thumbnail container. Previously potrait thumbnails will be visible outside of their container.

* Removed notice about having "chunks" folder from config.sample.js. Added a line in lolisafe.js to create the folder if it doesn't exist instead.

* Updated bcrypt to v2.0.0. I'm not really sure whatever has changed, but I've tested that it didn't require any additional changes for our current usage.

* Chunks will no longer be saved with their original file's extension. Instead they'll only be saved as plain files named 0, 1, ..., n, without any extension whatsoever. Extension for joined chunks will be read from the original file's name in /api/upload/finishchunks. If the user doesn't pass that data when calling the API, the joined chunks will not have any extension.

* Since rimraf has been removed, uploadsController.actuallyFinishChunks() will now use a combination of fs.unlink() and fs.rmdir(). Promise.all() will be used when running fs.unlink() so that all chunks will be deleted at the same time through multiple instances of async tasks (probably).

* Some other small changes and tweaks in uploadController.js.
2018-04-09 01:30:25 +07:00
Bobby Wibowo
661c8abefe
Updated dashboard 2018-04-05 19:58:22 +07:00
Bobby Wibowo
3ca692d8c7
Updates
* Refactored all instances of "failedIds" and "albumIds" to "failedids" and "albumids" respectively. Abandoning camel case for these ones.

* Refactored the way it looks into which albums the files are supposed to be added into.
For /api/upload/finishchunks, you can add "albumid" to each object in files[] to specify which album you want the finsihed chunks to be added into. Each object may have different album IDs.
For /api/upload, which is regular uploads, unfortunately you can only choose one album at a time (by adding "albumid" to the request headers, like usual). It uses the same function as the one used for finishchunks to add the files into album, so it shouldn't be hard to extend this ability to regular uploads, someday in the future.

* Fixed a bug in /api/upload/finishchunks. Previously you couldn't ever get it to work.

* Updated error message when successful uploads could not be added to album.

* "albumid" will no longer be added to request headers if they are chunked uploads. They'd have been ignored anyways.
2018-04-05 19:54:24 +07:00
Bobby Wibowo
b1dbb931c1
Updates
* Updated eslint-plugin-import dev dependency.

* Added 2 new ESLint rules: "prefer-const" and "object-shorthand".

* Refactor all JS files to follow the new ESLint rules.

* Refactored all instances of for-i into for-of wherever applicable.
2018-04-05 17:52:57 +07:00
Bobby Wibowo
95de5ee3fd
Updates
* New uploads that can NOT be added to an album, for whatever reason, will print out message that they can not be added to the said album, but their links will still also be shown underneath the message. Previously it would only print out the message but not the link.

* Improved uploadController.processFilesForDisplay(). Previously it would loop through all uploaded files and update album info for EVERY file, even though to begin with it was designed so that every call would only have to access ONE album. So yeah, this time it will only update album info ONCE no matter how many files are being processed in that session.
2018-04-05 17:21:51 +07:00
Bobby Wibowo
ed8a5ed0a9
Updated dashboard
Renamed "Preferred file name length" to "File name length".
2018-04-05 16:36:48 +07:00
Bobby Wibowo
cdfa3ede7a
Shift-click checkboxes
https://s.fiery.me/v6sM.mp4
2018-04-05 01:23:45 +07:00
Bobby Wibowo
7f10cccf70
Updates
* If files have to be added to an album on upload, it will now wait until they have either been succesfully added to the album or errored.

* File names in thumb view will now show their full URL on their tooltip.
2018-04-05 00:38:15 +07:00
Bobby Wibowo
b31f28ddcf
Updates
* De loli-safe wherever it's safe to do so.

* Removed bulma tooltip. Sigh, it came from an impulsive decision out of boredom to begin with.

* Chrome extension and GitHub links in home page will now open in new tab.

* File's link in the dashboard's list will still show the full URL in its tooltip, but it will no longer use bulma tooltip extension.
2018-04-04 23:47:20 +07:00
Bobby Wibowo
b4c17277d2
Updated version string of all JS and CSS files
I kinda fucked up version string of some files in some of the previous commits, thus causing some browsers to use a much older version of them.
I couldn't be bothered to track which ones of them were using older versions so I RegEx replaced all of them.
2018-04-04 15:20:45 +07:00
Bobby Wibowo
0d3591cb49
Updates
Added bulma tooltip extension for icons in home and file name in dashboard. I MAY revert this someday. I was bored as heck so I did this.
2018-04-04 10:18:53 +07:00
Bobby Wibowo
31585f745a
Updated home 2018-04-04 04:36:21 +07:00
Bobby Wibowo
3590d91c6e
Updated auth page
* Added icons to register and login buttons. I forgot to do so in the previous commit.

* Better width in tablet-like devices (it will now occupy 2/3 of the screen width instead of full).
2018-04-04 02:32:41 +07:00
Bobby Wibowo
f8323261bd
Updated dashboard
File name column will now try to occupy 25% of the table's width.
2018-04-04 02:05:15 +07:00
Bobby Wibowo
ab81bedffa
I can't ever be satisfied 🎤
* Updated home. All footer links are now using icons.

* Added Chrome extension link to home.

* Updated icons (added some and replaced some).

* Home will now show a different message if private mode is on but guests are still allowed to create accounts.

* Home will no longer show message about creating account if guests are not allowed to create one.

* Updated API route: /api/check. State of whether registration is enabled or not is now exposed with key "enableUserAccounts".
2018-04-04 01:54:42 +07:00
Bobby Wibowo
2f321d0dd4
Updated dashboard
* Added "Clear selection" button. This will clear all selection, in case you have selected like hundreds of files already but decided not to do anything to them in the end.

* Bulk "Add to album" button will now only show its icon only.

* Better un/select all files logic.

* Updated icons (added "cancel" icon for the "Clear selection" button).
2018-04-03 22:59:39 +07:00
Bobby Wibowo
77a8b23165
Updated home.html 2018-04-03 00:06:02 +07:00
Bobby Wibowo
8f41cd6f8c
Updates
* Fixed information of selected files being cleared when canceling either add to album or bulk delete prompt.

* Add to album prompt will now show how many files are going to be moved.

* Fixed bulk delete failing to reload file list properly when being used while listing an album.

* Added new ESLint rule "quotes" with option "single". I'm pretty sure Standard used to have this as default. I actually liked that back then.
2018-03-31 23:34:16 +07:00
Bobby Wibowo
4a2b7b3693
Updates
* File name, album/owner and size in thumbs view will no longer be clipped. Instead their overflow will be hidden in the form of ellipsis.

* Updated screenshot in README.md.
2018-03-31 21:44:06 +07:00
Bobby Wibowo
ceda9e67f7
Updated dashboard
Updated styling so that table cells will no longer wrap its content to new lines. Its container will still allow users to scroll to left and right, so this works better than forcing a minimum width.
2018-03-31 21:32:27 +07:00
Bobby Wibowo
ab1d8907c3
Updated dashboard
* Thumbnail button will no instead be disabled instead of not displayed when the file has no thumbnail.

* Bulk adding files to album will now un-check files that have been successfully moved to the album.
2018-03-31 21:26:53 +07:00
Bobby Wibowo
8724d45ce0
Updates
* Refactored all instances of "An error occurred" by appending an exclamation mark.

* Added the ability to add/remove files to/from album (API route: /api/albums/addfiles - https://s.fiery.me/dCAqLEQ9.mp4).

* Added the ability to purge files associated with an album when deleting the said album (set "purge" key to true in the JSON POST request to /api/albums/delete).

* Updated icons.

* Some other refactors, probably.
2018-03-30 09:39:53 +07:00
Bobby Wibowo
ac242fd9a9
Updated dashboard
* Simplified selectors in dashboard.css.

* Added checkboxes to thumbs view (but there's no un/select all checkbox).
2018-03-30 06:47:31 +07:00
Bobby Wibowo
0067c8fe83
Updates
* Refactored all instances of "err" into "error".

* Added bulk delete feature (API route: /api/uploads/bulkdelete). It accepts an array of IDs (its key must be "ids" in the JSON POST request). Don't forget it still requires a token in the headers. (https://s.fiery.me/6rjMAYoC.mp4)

* Removed fontello.css from auth.html.

* Updated a bunch of styling.

* Added "copy link to clipboard" button to thumbs view.

* Added "view thumbnail" button to list view. Clicking the row will no longer trigger thumb view, instead you have to press that button.

* Updated icons.

* ... and perhaps some others that I can't remember?
2018-03-30 06:22:08 +07:00
Bobby Wibowo
d2086ce4ba
IS LITERALLY CRYING
I broke the delete button apparently.
2018-03-29 03:32:47 +07:00
Bobby Wibowo
76076ac5c2
WHY CAN'T I EVER BE DONE!?
I forgot to make clipboard button on mobile to only appear after succesful upload.
2018-03-29 03:28:40 +07:00
Bobby Wibowo
add259d1b0
PLZ END MY SUFFERING 2018-03-29 03:13:10 +07:00
Bobby Wibowo
be4d16c6c2
Updated home.html and home.js
Removed "copy link" button from home page for desktop (the button for tablet and mobile will still be there).
2018-03-29 03:12:11 +07:00
Bobby Wibowo
0f32319552
Updates
* Small styling update to auth page.

* Changed icons used in dashboard.

* Added ClipboardJS.

* Added "copy link" button in file list (list view only) and album list. They will use ClipboardJS.

* Added "copy link" in upload result. For desktop, there will be small clipboard icons after the links, but for mobile and tablet, there will be a clickable buttons instead.

* Updated placeholder color for input elements.

* Updated "Loading..." in home page to use Bulma's loading spinner instead. It will also now be unclickable while still loading.

* Matched version string for all JS and CSS files.
2018-03-29 03:05:01 +07:00
Bobby Wibowo
2dd724f88f
Updates
* Switched standard to eslint with eslint-config-standard (and 4 more eslint plugins needed by standard).

* Added "curly" eslint rule with "all" option. I like it.

* Refactored all JS files to apply the new "curly" eslint rule.

* Renewed axios.min.js, dropzone.min.js and sweetalert.min.js. Re-minified and added a small comment stating their version and copyright statement.

* Some buttons in dashboard will now show loading icon whenever they're waiting for response from the server.

* Updated README.md and .gitignore.
2018-03-29 00:40:50 +07:00
Bobby Wibowo
e81e706914
Bug fix for chunked uploads support
Previously chunks merging would end up with corrupted files if the files were chunked into more than 10 chunks. It had something to do with incorrect file names sorting. This commit would fix it by prepending zeros to the file names depending on the amount of chunks.
2018-03-28 21:10:20 +07:00
Bobby Wibowo
7770192ca8
Updates
* Improved list view. When a row is clicked, as long as it has a thumbnail, a modal will pop-out to show the thumbnail.

* Improved image placement in thumb view.

* Refactored all instances of id attribute in HTML files to use double quotes instead of single quote.
2018-03-28 19:28:17 +07:00
Bobby Wibowo
66a63ca6d6
Updates (YAY, CHUNKED UPLOADS!)
* Added new dependency: rimraf. This will be used by chunked upload support to bulk delete temporary chunk files.

* Added chunked uploads support :3

* Updated Dropzone to 5.2.0.

* More improvements to thumbnail view. Delete button will now only appear on hover. Some other details, such as file name, size and album/owner will also appear on hover. Touch devices will have all of those appear always visible by default.

* Image thumbnails will now appear on home page after successful uploads (only for WEBP, JPG, JPEG, BMP, GIF and PNG files). WEBP may not work properly in Firefox though.

* Refactored home.js to use const/let and some other stuff.

* Refactored album view. It will now display properly on mobile screen. Download Album button will also no longer be located at the top right, but right below the subtitle.

* Updated some version strings.

* And maybe some others that I can't remember.
2018-03-28 18:36:28 +07:00
Kayo
a9d0e0a85c
Update github URL 2018-03-25 18:16:53 -07:00
Bobby Wibowo
3fa5b24ee5
Updates
* Better auth handling.

* Deleting a file will no longer cause the dashboard to load the very first page of uploaded files list. It will instead reload the currently viewed page.

* Updated dropzone (I guess).
2018-03-25 02:47:41 +07:00