Commit Graph

227 Commits

Author SHA1 Message Date
Bobby Wibowo
b117fa9ad1
feat: expose utils to nunjucks templates
also fix nunjucks templates not adhering to env vars overrides for
domains config options, because they attempted to read config directly
2022-06-29 13:58:09 +07:00
Bobby
2465864c53
feat: copy to clipboard button in file info page 2022-06-28 12:52:50 +07:00
Bobby
b17b24b159
feat: new page /file/:identifier
this will display all information recorded from the specified file, but
only to the users that own them (it requires token)

this page also has a delete file button, allowing us to provide link to
this page for sharex deletion url option

once again, this is only for authenticated users, and will only show
file that the users own, unless said user is a moderator or higher
2022-06-28 12:03:49 +07:00
Bobby
ed06b4bcb1
feat: allow disabling redirect on js-only pages 2022-06-28 11:47:28 +07:00
Bobby Wibowo
0537268e4d
fix: simplified enable_home_renders 2022-06-24 09:24:32 +07:00
Bobby Wibowo
3dd056d8f3
chore: removed useless nojs logic from player.njk 2022-06-24 08:42:25 +07:00
Bobby Wibowo
35666dd988
chore: _globals.sample.njk 2022-06-22 17:05:09 +07:00
Bobby Wibowo
8a9f0b412f
feat: removed default home renders 2022-06-22 16:52:14 +07:00
Bobby
7d2e2d97e0
feat: use fontello for video.js seek buttons 2022-05-27 13:44:22 +07:00
Bobby
7dd4f50e9e
feat: allow markdown in album description 2022-05-05 12:55:21 +07:00
Bobby
5584b6b3df
feat: clean up _globals.sample.njk 2022-03-04 02:15:17 +07:00
Bobby
b80e2cca6e
feat: _globals.njk -> _globals.sample.njk
it's now the same as config.js file
copy it as _globals.njk then modify according to your needs
2022-03-04 01:36:54 +07:00
Bobby
cda2ebe565
fix: add a quick toggle to hide irrelevant FAQ
categories for personal-use installations.
2021-11-23 02:59:54 +07:00
Bobby Wibowo
631d14d887
feat: better extension names parsing
It will now preserve upper/lower/mixed case.

It will now properly preserve all tarballs (#370).
2021-01-29 23:15:24 +07:00
Bobby Wibowo
c5647cb8bf
albums sidebar in dashboard is now collapsible
they'll also be collapsed on initial page load

this uses a new client-side dependency, bulma-collapsible
https://github.com/creativebulma/bulma-collapsible

/api/albums to fetch albums list now support simple reply, where only
their ids and names will be returned.
this simple reply will also return all of the user's albums, instead of
being limited to only 9 or 25 entires like before.

fixed add to album in dashboard, and album selector in homepage uploader
being limited to only 25 albums.
2020-12-26 18:49:51 +07:00
Bobby Wibowo
456cea5b8e
im blue da ba dee da be daa 🎤 2020-11-27 16:07:49 +07:00
Bobby Wibowo
12cffb022d
Added waveform in embedded player if playing audio
Added LICENSE files

Moved videojs plugins into their own sub-directories in libs directory
2020-11-03 22:37:24 +07:00
Bobby Wibowo
a5693d16d8
Updated album.njk and player.njk 2020-11-03 21:57:43 +07:00
Bobby Wibowo
519d4154e7
Updated 2020-11-03 21:25:07 +07:00
Bobby Wibowo
f5e70b2d96
Added experimental embedded video.js player thingy 2020-11-03 20:56:32 +07: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
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
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
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
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
8b4b0e79c5
Improved albums public page cache and more
Removed its dependency towards albums' editedAt property.
Editing album's metas (name, description, etc) will no longer update
its editedAt property.
Instead it will now ONLY be updated when adding/removing files to/from
it. Just like how it was meant to be, which was to be used to check
whether it's necessary to re-generate their downloadable ZIPs.

Albums public page cache will still be properly invalidated when
adding/removing files to/from it, as well as after editing their metas.

Added views/album-notice.njk to be used to render okay-ish notice when
an album's public page is still being generated.
I was originally thinking of using it for disabled albums as well, but
I refrained from it to reduce the possibility of disabled album IDs from
being easily scanned (as it just returns 404 now).

Removed invalidatedAt property from stats cache. Instead their caches
will immediately be nullified as they should (thus frees up memory
slightly as well).

Stats cache for albums will now only be cleared when truly necessary.
As in, adding/removing files to/from albums will no longer clear them.

Updated Nunjucks files to properly use h1, h2, h3 tags in actual
hierarchical orders.
Elements that don't need to use hX tags will now use P instead.
Nothing changes visually, only structurally.

Fixed some elements in Nunjucks using single quotes instead of
double quotes. They'd have worked the same, but consistency.

Added h1 title in FAQ page.

Make text for no JS warning a bit bigger, and improved the phrasing
a little bit.
2020-06-03 10:44:24 +07:00
Bobby Wibowo
5e5d5c5647
Manage albums admin page, and more!
Resolves #194.

Added pagination for Manage your albums page.

Albums sidebar will now only list 9 albums at most.
Use Manage your albums page to view the rest.
Albums in the list will now have View uploads button after all.

Delete album button for albums renamed to Disable album.
Since techincally the server would've always been disabling the albums
instead of deleting them.
It was something upstream dev's decided, and I haven't bothered changing
its behavior.

I'll work on actual Delete album feature some other days.

As the title says, added Manage albums admin page.

Viewing uploads of an album will hook into albumid: filter key.

I'll work on filter and bulk operations some other days.

Updated styling for disabled albums and users.
Instead of havine a line through them, they will be greyed out.
Disable public page of albums will still use line through however.

Links to album's disabled public page are now clickable.

Added a new button styling is-dangerish.
It'll be orange.

Renamed /api/albums/delete to /api/albums/disable.
For backwards compatibility, /api/albums/delete will still work
but automatically re-routed to /api/albums/disable.

/api/uploads/list will no longer print SQLite errors for moderators
or higher when encountering them.
It was originally used to inform moderators of non-existing colum names
when used for sorting.
But on one of the recent commits, I had added a check for allowed colum
names.

Improved some caching in dashboard page.

Added new entries to cookie policy.

Some other small things.

Bumped v1 version string and rebuilt client assets.
2020-06-01 11:44:16 +07:00
Bobby Wibowo
58cbcdd1fe
Updated some Nunjucks files and home.js
Updated options in _globals.njk to NOT use camelCase.

Rephrased banned categories.

Added toggle option for banned categories into faq.njk.

Added FAQ message about Tor and/or VPNs being blocked.

Updated faq.njk and cookiepolicy.njk for updated option names.

Updated cookie settings for Cookie Consent in home.js.
Now it will only enable Secure cookie if on HTTPS protocol.
This should properly store the cookie in local installations.

Bumped v1 version string and rebuilt client assets.
2020-05-28 05:18:09 +07:00
Bobby Wibowo
36a41c9711
Added floating home button to auth page
Moved floating home button codes to views/_partial/floating-home.njk.

Added some variables support into some partial NJK files.

album.njk now uses partial versions for noscript codes.

A few other things.

Bumped v1 version string and rebuilt client assets.
2020-05-26 03:49:54 +07:00
Bobby Wibowo
64ab8e20b2
Updated auth page, amont other things
"Login or register" subtitle and Register button will no longer be shown
if enableUserAccounts are disabled in config.

Updated auth.js to continue working even when register and/or login
buttons cannot be found.

Added .is-wrappable support for .button elements.
This makes the text inside the buttons "wrappable" to next lines.
Do note that this will cause the buttons to get taller when they do need
to wrap their texts.

Updated "Log in to upload" button in homepage uploader use the new
.is-wrappable class.
Their texts will also now be split into two lines.
Anonymous upload warning specifically will now instead say
"Log in or register".

Bumped v1 version string and rebuilt client assets.
2020-05-26 03:04:26 +07:00
Bobby Wibowo
575a9353fa
Quick fix _globals.njk 2020-05-17 22:43:01 +07:00
Bobby Wibowo
e495d3efd3
Added home icon to album public pages
Updated dashboard.js: Uppercase ZIP in
Statistics > Albums > Zip Generated.

Bumped v1 version string and rebuilt client assets.
2020-05-17 04:54:06 +07:00
Bobby Wibowo
5e91554a52
Updated faq.njk
Added a message linking to Cookie Policy in FAQ.

Added id attribute to all h1 elements in FAQ.
These allow URL fragments if needed.
2020-05-17 03:56:37 +07:00
Bobby Wibowo
86b51fe5f5
Added Cookie Consent, among other things
This adds Cookie Consent library at public/libs/cookieconsent.

Added views/cookiepolicy.njk.

Added a new config option cookiePolicy. Disabled by default.

Updated views/faq.njk to use variables wherever applicable.
The variables are initiated at views/_globals.njk.
The said file also contains variables used at views/cookiepolicy.njk.

Restored messages about Cloudflare to FAQ.
They will be shown only if config.cloudflare.purgeCache is enabled.

Statistics will now capitalize first letters of the keys instead.

Updated background color of SweetAlert modals.

Moved table styling from dashboard.css to style.css (global),
since table will also be used in Cookie Policy page.

Bumped v1 version string and rebuilt client assets.
2020-05-17 03:35:54 +07:00
Bobby Wibowo
7b676bb9fd
Added retina/2x home logo
Rebuilt client assets and bumped v1 version string
2020-05-09 14:40:44 +07:00
Bobby Wibowo
ff54f088bd
Added client assets update detection
/api/check and /api/token/verify will now pass along v1 version string
if used (when config.cacheControl is used) for both home.js and
dashboard.js to use to compare version strings.
This should help notify users using browsers with a bit more overbearing
caching (generally mobile browsers).

Rebuilt client assets and bumped v1 version string

Slight update to yarn.lock (a small syntax change for node-gyp, idk why)
2020-04-30 05:56:28 +07:00
Bobby Wibowo
12516032e1
Updated disabled JS warning
Moved <style> tag from <noscript> tag into <head> tag.

Auto-redirect visitors with JS disabled to either No-JS uploader or
No-JS version of album pages after 3 seconds.

Those changes can be found in a new NJK file at the location below:
views/_partial/noscript-refresh.njk

Made the warning a lot more concise.
2020-04-24 01:18:25 +07:00
Bobby Wibowo
69af0549d5
Updated FAQ: Albums 2020-04-12 15:24:22 +07:00
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