Commit Graph

1011 Commits

Author SHA1 Message Date
Bobby Wibowo
df9887386a
Merge branch 'camjac251-camjac251-build-action' into safe.fiery.me
Also updated bump-versions.js to NOT require utilsController.js.
This is required to make sure GitHub runner can execute the script
without config.js existing in root directory.
To begin with the script don't particularly need anything much from the
said controller.
2020-07-30 05:09:08 +07:00
camjac251
3646721fb9
Add action for automatic lint/building of static resources
This will run the yarn build every time a file is modified in the /src folder. It will hopefully reduce the steps needed for developing.
2020-07-28 18:12:40 -05: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
541c1da5a6
Updated cookiepolicy.njk 2020-07-28 16:04:29 +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
08db3e55a8
Allow sorting by original names 2020-07-25 16:39:04 +07:00
Bobby Wibowo
63330bdc3f
sqlite3/node-addon-api 2.0.0 -> 2.0.1 2020-07-19 19:03:07 +07:00
Bobby Wibowo
24ed7c48bb
Updated dashboard.js
Bumped v1 version string
2020-07-19 18:26:44 +07:00
Bobby Wibowo
a200f81fd5
Updated dependencies
Rebuilt client assets and bumped v1 version string
2020-07-19 18:23:33 +07:00
Bobby Wibowo
09d82ede4f
Merge branch 'evanmn-safe.fiery.me' into safe.fiery.me 2020-07-03 22:56:34 +07:00
Bobby Wibowo
69664b05c2
Clean ups 2020-07-03 22:55:43 +07:00
evanmn
c8817ec8aa
Update Dockerfile 2020-07-03 22:50:24 +07:00
evanmn
732661ff02
Update docker-compose.yaml 2020-07-03 22:50:24 +07:00
evanmn
603c9f54e2
Update config.sample.js 2020-07-03 22:50:24 +07:00
Evan McCarthy
8ea0e491cd
add docker-compose stack 2020-07-03 22:50:24 +07:00
evanmn
f95cb64d7e
Update Dockerfile 2020-07-03 22:50:06 +07:00
Evan McCarthy
334c2ab736
add config 2020-07-03 22:49:53 +07:00
Evan McCarthy
cbed540ff2
fix docker 2020-07-03 22:49:53 +07:00
Bobby Wibowo
c4f576a061
Updated FUNDING.yml 2020-07-03 22:38:40 +07:00
Bobby Wibowo
77e87a3ac3
Updated real-ip-from-cf 2020-07-02 15:22:22 +07:00
Bobby Wibowo
2edb7f8bab
Updated dependencies
Bumped v1 version string and rebuilt client assets
2020-07-02 15:16:13 +07:00
Bobby Wibowo
2f7d1533e3
Merge branch 'camjac251-location.hostname' into safe.fiery.me 2020-07-02 15:11:21 +07:00
camjac251
7a23707555
change window.location.host to window.location.hostname
location.hostname() is unsupported by Opera and gives an error using the latest ESLint gulp plugin.
2020-07-01 13:59:22 -05:00
Bobby Wibowo
1981159805
Updated auth.njk again (and auth.js)
Better solution for #215

Bumped v1 version string and rebuilt client asset
2020-06-27 17:42:36 +07:00
Bobby Wibowo
4dfe776ff7
Updated auth.njk
Resolves #215
2020-06-27 17:24:12 +07:00
Bobby Wibowo
117f2ff0a4
Merge branch 'cf-api-token' into safe.fiery.me 2020-06-26 16:46:32 +07:00
Bobby Wibowo
bd3c86c1bb
Fix typos in config.sample.js 2020-06-26 13:58:23 +07:00
Bobby Wibowo
a93e34bf87
Init cf-api-token 2020-06-26 13:48:15 +07:00
Bobby Wibowo
0caa669980
Fix homepage's Config tab not saving some options
Resolved #211

Bumped v1 version string and rebuilt client asset
2020-06-22 19:45:42 +07:00
Bobby Wibowo
49ec795941
Disabled file delete GET API
40dd66297612b2a8429c8fcad2b07170a3ba582b#commitcomment-40060391
2020-06-21 22:21:38 +07:00
Bobby Wibowo
40dd662976
Removed delete URL from upload response
I wasn't aware ShareX wouldn't do a basic GET request to the delete URL,
but would instead open your browser to it.
Unfortunately, due to the structure of lolisafe auth setting token
through HTTP header, which had always been done by JS as it has to get
the value from local storage, just visiting the API from browser will
merely respond with "No token provided".
We'd need cookie-based auth, which I do not want to add.
The old me that added deletion API long ago might have been aware of
this fact, but the me of a few hours ago already forgot..
I'll give this further thoughts at a later date, as ShareX isn't really
a priority to me.

Bumped v1 version string and rebuilt client assets.
2020-06-20 04:01:16 +07:00
Bobby Wibowo
b4ab04f55a
Async-load render.js
Also fixed undefined vars check, as var === undefined throws error
when truly not defined.
It's probably specific to browsers (don't recall seeing this in node).

Bumped v1 version string and rebuilt client assets.
2020-06-20 03:33:39 +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
51c8df71bc
Added deletion URL for ShareX or derivatives
For registered users only!
This requires adding a basic GET API for file deletion, so that I did.
Configs which guests download will not include pattern for delete URL,
so they won't get notified of unusable delete URL or anything like that.

dev: Improved logger.debug() to support specifying options for node's
Util.inspect() if an object is set as its last param
(assuming >1 params).
Default options now also includes enabling colors.

src/js/utils.js: Simplified dynamic ShareX config generator.
Among other things, it will now use JSON.stringify().
I don't even remember why we didn't use that in the first place..

Some logic improvements in src/js/home.js.

Bumped v1 version string and rebuilt client assets.
2020-06-20 01:28:23 +07:00
Bobby Wibowo
e552017bfb
Change deps versions from major to minor ranges
Since I'd usually test for new versions of dependencies anyway, only
minor version updates that I personally support for self-update.
2020-06-20 00:17:16 +07:00
Bobby Wibowo
fc0433dd67
Updated README.md 2020-06-18 04:09:01 +07:00
Bobby Wibowo
4aeb364d0d
Upgraded all dependencies
Consult package.json
2020-06-18 03:46:27 +07:00
Bobby Wibowo
a4d33c67a2
Updated uploadController.js 2020-06-16 03:01:32 +07:00
Bobby Wibowo
585331c6e5
Added timeout on chunked uploads
The service will now automatically clean up any leftover data from any
inactive & unfinished chunked upload attempts.

Updated config.sample.js for updated description and new sub-option
for chunkSize option.
2020-06-15 23:48:43 +07:00
Bobby Wibowo
b4c8b1d90e
BLAZING FAST CHUNKED UPLOADS 🚀
Inspired by our recent switch to using blake3 for file hashing, chunks
will now be written to a tmp file directly as they're uploaded.
So no more waiting so long for "rebuilding chunks".
There will still be some delay on every following attempts of uploading
each chunks. I'm not sure the specifics, as we're already reusing the
write stream.
2020-06-15 23:14:33 +07:00
Bobby Wibowo
14b97ecbf1
Updated uploadController.js
Make sure .generateThumbs() is always on force mode.
There may be stray thumbnails that weren't stored in DB due to
unexpected errors and whatnot.
2020-06-15 21:10:40 +07:00
Bobby Wibowo
0b8b1ed026
More fixes to thumbnailers
Use fluent-ffmpeg's .screenshots() function instead,
with some countermeasures for weird situations.

No more selective error suppressions.
2020-06-15 21:04:30 +07:00
Bobby Wibowo
4225819b98
Updated src/js/misc/utils.js
Make prepareShareX function practically optional.
If the ShareX element is missing, it shouldn't break everything else.
2020-06-15 15:39:29 +07:00
Bobby Wibowo
15f29f3fb9
Better error handlers in home uploader 2020-06-10 03:01:12 +07:00
Bobby Wibowo
c1d3b9724c
Fix auto page thingy breaking
Basically, when you're on the very last page of either uploads or users
lists, and then you decide to delete all uploads/users in the list, by
default it will automatically load the latest valid page (e.g. page - 1,
or more if it has to).
Unfortunately, that behavior will get cancelled out by "Something else
is still loading" warning. This fixed that.

Bumped v1 version string and rebuilt client assets.
2020-06-10 02:06:43 +07:00
Bobby Wibowo
0851d71688
Fix SQLite not understanding escape char
I honestly expected Knex.js would've already handled this
2020-06-07 20:51:59 +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
6d5ee7dd63
Thumbs size 2020-06-06 19:43:20 +07:00
Bobby Wibowo
46c84db64f
Merge branch 'patch-3' of https://github.com/camjac251/lolisafe into camjac251-patch-3 2020-06-06 19:34:46 +07:00