Commit Graph

97 Commits

Author SHA1 Message Date
Bobby Wibowo
498002ee2d
Updated lolisafe.js
Removed file extension check from setHeaders function. It will now apply Cache-Control to all files in /public, and to all files in the uploads folder if they are being served by node.
2018-04-25 14:30:38 +07:00
Bobby Wibowo
674d20c62c
Updates
Regular code improvements.
2018-04-21 04:39:06 +07: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
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
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
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
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
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
49cf3b0654
Updates
* Removed unnecessary math operator from lolisafe.js.

* Updated comment about HttpErrorPages (the branch was renamed from "fiery-me" to "fiery.me").
2018-02-10 06:20:34 +07:00
Bobby Wibowo
6246436aed
Hehe.. 2018-01-25 01:31:31 +07:00
Bobby Wibowo
878bdd484d
Added error pages
Utilizing BobbyWibowo/HttpErrorPages.
2018-01-25 01:13:17 +07:00
Bobby Wibowo
60c6357491
Updates
I don't know what I'm doing.
2018-01-24 23:18:01 +07:00
Bobby Wibowo
fc71601074
Updates
* Show horizontal scrollbar for table only when needed.

* Cache-Control for static files.
2018-01-24 23:04:21 +07:00
Bobby Wibowo
32dd070e49
Yet another bunch of updates
* Self-host all libs (including but not limited to Font Awesome icons). LICENSE files were properly included as well.

* Temporarily disabling error pages.

* Added "start" and "pm2" scripts. To be used with "yarn SCRIPT_NAME" or "npm run SCRIPT_NAME".

* Added container for the tables in dashboard. On narrow screens, such as phones, users will then have the ability to use horizontal scroll on the tables.

* Fixed various resource paths. This should now work properly when not being hosted in root domain (e.i. https://fiery.me/lolisafe/).

* Before checking API, the "Running in ..." button will now say "Loading..." instead.
2018-01-24 22:31:23 +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
Bobby Wibowo
47f2f30682
More breaking changes
* Added Editor Config file.

* Added ".vscode/" to .gitignore.

* Added final newline to some files.

* Added KDE Breeze Dark colors.

 * Applied various ESLint autofixes. There were still plenty of non-auto-fixable issues though. I'm not sure why this project had ESLint dev dependency but still ended up with countless issues.

* ... and maybe some others.
2018-01-24 01:00:55 +07:00
Pitu
992b632d1a Added album downloading through front-end 2017-10-04 02:05:38 -03:00
Pitu
8d8dbc7078 Missing semicolon 2017-10-04 00:59:18 -03:00
Pitu
54a262ef95 Fixes serving the actual configured uploads folder 2017-10-03 23:45:23 -03:00
Pitu
128b7113bf Little bit of this 2017-10-03 21:13:15 -03:00
Pitu
c1963b2809 Changed how domains are handled 2017-10-03 19:48:26 -03:00
Pitu
6b72453d4a Made the album viewer route SSR so crawlers dont have issues 🎉 2017-09-20 03:03:31 -03:00
Caroline
ce23b0f19d Keep the bad guys out >:c (#36) 2017-04-27 09:04:19 +02:00
Pitu
1db1b06a48 Refactor 2017-03-17 01:14:24 -03:00
Pitu
e05a7c751e Added public album sharing 👌 2017-02-07 04:32:55 -03:00
Pitu
18c66d27fb Added support for custom html files
There's a new folder that gets created upon running lolisafe for the first time. On said folder any html file with the same name as the default ones will be loaded instead, letting you place custom frontend files without messing with git.
2017-02-06 00:06:33 -03:00
Pitu
9b204b6c27 👌 2017-02-01 19:56:47 -03:00
Pitu
f29f208e52 Another thing crawl told me to do 2017-02-01 19:55:00 -03:00
Pitu
f56afcdd5c Something crawl told me to do 2017-02-01 19:52:29 -03:00
Pitu
e595298994 Making the window 5 seconds instead of milliseconds sounds about right 2017-02-01 19:51:51 -03:00
Pitu
67411d7fa9 Added rate limiting 2017-02-01 19:46:10 -03:00
Pitu
999c148dff Changed /panel to /dashboard 2017-01-31 03:37:17 -03:00
Pitu
9cd3846795 Added FAQ 2017-01-31 03:31:10 -03:00
Pitu
da47babc05 Added auth route 2017-01-29 04:19:14 -03:00
Pitu
3f4b879144 List and thumb view on uploads 2017-01-22 18:01:39 -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
aae56e91c9 Added multi-domain support. Maybe 2017-01-18 21:35:31 -03:00
Pitu
075e1baac7 Better static routes 2017-01-17 20:12:58 -03:00
kanadeko
79e786f3b8 Added 500 error page 2017-01-17 15:56:44 -03:00
kanadeko
54e73085c6 Removed extra routes, moved static to main file 2017-01-17 15:55:27 -03:00
kanadeko
7b72c3e560 Added generation of random token 2017-01-16 04:37:42 -03:00
pitu
91a7ec7286 WIP admin, probably not smart to clone repo now 2017-01-14 22:36:24 -03:00
kanadeko
b81cf72ac4 Changed from ip whitelist to token based auth 2017-01-14 18:13:58 -03:00
kanadeko
a246fc8365 Frontend done 2017-01-14 05:50:18 -03:00
kanadeko
07ba404dcb Frontend WIP 2017-01-14 03:01:23 -03:00
Pitu
376cf10663 First version 2017-01-13 04:34:21 -03:00