Commit Graph

39 Commits

Author SHA1 Message Date
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
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
aea89ecbd4
Updates and merged changes from 'master'
* Removing files from an album will now update the state of the said album. Which means, the Download Album as zip feature will properly make a new zip instead of re-using the old one which would obviously still have the said files.

* "migration.js" will no longer try to create column if it already exists.

* Changed type of all columns that used to be DATETIME to INTEGER. Apparently SQLite would have stored them as INTEGER anyways, so you don't have to change anything else.
2018-04-05 10:10:10 +07:00
Bobby Wibowo
a61060249f
Updates
* Updated README.md to get rid of all the warnings from linter. Just because.

* Removed an unnecessary logic check in albumsController.addFiles().

* Refactored "successIds" to "updateDbIds" in utilsController.bulkDeleteFilesByIds().
2018-04-03 22:01:19 +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
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
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
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
Bobby Wibowo
616124446f
Updates (WARNING!)
WARNING: Please turn off lolisafe before upgrading, then run "node database/migration.js" once after upgrading. Ignore all errors/warnings about duplicate column name. Afterwards make sure your config.js follows the new format in config.sample.js (specifically fileLength and generateThumbnails options).

* generateImageThumbnails and generateVideoThumbnails options in config.js is now renamed to an object named generateThumbnails, with image and video as its properties.

* fileLength option is now an object with min, max, default and userChangeable as its properties.

* User may now change their preferred file length (following the previous option, of course).

* Updated a bunch of responses messages. Mainly appending a dot to the messages.

* New APIs:
/fileLength/config to get an object of the current fileLength config (exactly what is in the config.js file).
/fileLength/change to change user's preferred file length.

* And maybe some others ...?
2018-03-24 20:52:47 +07:00
Bobby Wibowo
677d8717e7
Fixes to albums
* It will now properly create "editedAt" and "zipGeneratedAt" columns into "albums" table, which will then be used for the "Download Album" feature. Previously, due to the lack of those columns, people could not download albums. Existing installation will have to do some manual patches, which I will describe further in the commit's comments.

* Thumbnail-less files will properly show the extensions in albums. Previously it would have two dots.
2018-02-07 23:56:32 +07:00
Bobby Wibowo
62f142a046
Updates
Patching albums for installations which serve files through a different domain (experimental).
2018-02-07 13:45:18 +07:00
Bobby Wibowo
efbaa24b30
Updates
More experimental changes to compliment the previous commit.
2018-02-07 13:32:26 +07:00
Bobby Wibowo
bcdfcd7064
Various updates
* Switched ESLint + Aqua to Standard. I'm a big fan of Standard. Updated yarn.lock file too.

* Lots of refactors to follow the rules of Standard.

* Fixed issue with uploading as a not logged in user.
2018-01-24 03:06:30 +07:00
Pitu
76d48602c6 Async who? 2017-10-04 02:51:55 -03:00
Pitu
09a5c6bf1e Added a little bit of logging 2017-10-04 02:46:31 -03:00
Pitu
149742ab61 Bypass file if not found when zipping an album 2017-10-04 02:45:45 -03:00
Pitu
992b632d1a Added album downloading through front-end 2017-10-04 02:05:38 -03:00
Pitu
e56ef97975 Return 404 for deleted albums 2017-10-04 00:59:05 -03:00
Pitu
702075b66d ES6 rewrite 2017-10-03 21:13:38 -03:00
Pascal Temel
b05dac6743 cleanup 2017-09-24 05:54:13 +02:00
Pitu
80117235f9 Added album check to uploads 2017-08-30 04:48:17 -03:00
Pitu
026e0a3ef0 Derps were made, and now fixed 2017-03-18 01:36:50 -03:00
Pitu
72fb9ec938 whoops 2017-03-17 01:19:33 -03:00
Pitu
1db1b06a48 Refactor 2017-03-17 01:14:24 -03:00
Pitu
61a4e984de Little fix 2017-02-07 04:54:58 -03:00
Pitu
36e17b0372 Album stuff 2017-02-07 04:52:53 -03:00
Pitu
e05a7c751e Added public album sharing 👌 2017-02-07 04:32:55 -03:00
Pitu
4a4ca06366 Forgot it was an array 2017-01-30 04:42:15 -03:00
Pitu
751a876360 Updated albumsController to use new auth 2017-01-29 22:17:49 -03:00
Pitu
bae03cdc25 File delete, album delete and album rename. Sugoooi! 2017-01-20 03:28:26 -03:00
Pitu
bb0f746598 Album delete WIP 2017-01-19 17:14:28 -03:00
Pitu
83aaef0f82 Changed request system and post data
Changed from XMLHttpRequest to Axiios and made every POST call to look for params or json and not pass the values as headers. Token is still a header though
2017-01-19 02:37:35 -03:00
Pitu
93891ae1e5 Small fixes 2017-01-19 00:31:01 -03:00
Pitu
02be558683 Added enabled flag to create/list of albums 2017-01-18 05:07:20 -03:00
Pitu
0dcaf36332 Added browsing galleries from dashboard 2017-01-18 04:05:56 -03:00
Pitu
cf98005c4f Better tables and showing album on upload view 2017-01-18 03:29:46 -03:00
Pitu
84ff2241ba Shit ton of things on this update 2017-01-18 02:40:14 -03:00
Pitu
c4b5457891 Change from gallery to album 2017-01-17 18:55:35 -03:00