Commit Graph

44 Commits

Author SHA1 Message Date
Harvey Tindall
4a9bac1027 scripts: replace dark-variant.sh with go scripts/variants
uses regex mostly, resulting in a significantly faster execution (old:
~2s, new: ~31ms). Only matches classList.add/remove and class="..."
(won't touch string literal variables or colours), but these weren't
really used anyway. Supports multi-line classList.add/remove, which was
the reason I wrote this anyway (formatting the codebase introduced some
of these).
2025-12-09 14:28:05 +00:00
Harvey Tindall
817107622a ts: format finally
formatted with biome, a config file is provided.
2025-12-08 20:38:30 +00:00
Harvey Tindall
362984a391 web: remove almost every use of ml/mr
replace with flex and gap mostly. For #450.
2025-12-08 15:12:40 +00:00
Harvey Tindall
b5e348ad2b ui: correct html lang tag
set according to the language picked.
2025-12-07 19:31:52 +00:00
Harvey Tindall
fb5ea43ef5 CopyButton: add string getting func option 2025-12-07 11:38:46 +00:00
Harvey Tindall
44e4b5fce2 invites: editable label, /invites/edit route
PATCH /invite/edit lets you edit an invite by giving new values for a
subset of inviteDTO (EditableInviteDTO). Replaces /invite/profile and
/invite/notify, and allows changing (user)label and user expiry as well
as the previously customizable values through other routes. An edit
button next to the code/label allows changing on the invites tab.
2025-12-06 15:38:06 +00:00
Harvey Tindall
51f604d061 ivnites: use actual inviteDTO for DOMInvite
no intermediary parsing step. Also, moved the date -> duration (3mo6d3h
sorta thing) to the web, there's now a ValidTill field with a unix
timestamp. Used the new Temporal api with a polyfill. Bumped api version
(although it still isn't semver).
2025-12-06 14:01:06 +00:00
Harvey Tindall
556e1411f4 invites: add "send to" to dropdown
allows sending to more people after creating the invite. Fixes #444.
2025-12-05 19:51:42 +00:00
Harvey Tindall
77d2ad3b6b profiles: add ability to directly edit profile JSON
allows for customizing small things, like changing admin status.
2025-11-28 15:13:46 +00:00
Harvey Tindall
1d7d82b793 search: fix server-side date behaviour
OffsetMinutesFromUTC was being passed incorrectly by the web app
(getTimezoneOffset if UTC - Timezone, we wanted Timezone - UTC), now
fixed. This value is now used if given in comparisons. Times are
truncated to minute-deep precision, and Any date comparison ignores
empty date fields (i.e. a unix timestamp being 0 or a time.Time.IsZero()
== true).
2025-05-27 14:57:56 +01:00
Harvey Tindall
b40abafb95 list: cleanup, include offset in DateAttempt
included UTC offset in minutes in DateAttempt, will be used shortly.
Also moved this stuff (ParsedDate, DateAttempt) to the common d.ts, and
the method for parsing from a string (now parseDateString) to common.
Also pre-emptively load the user cache when the admin page loads.
2025-05-27 14:29:09 +01:00
Harvey Tindall
d09ee59a1a accounts: infinite scroll for performance
Found out the bottleneck when ~2000 or more elements are loaded isn't
the search or sort or anything, but the DOM. An infinite scroll
implementation is added, where elements are added to the DOM as you
scroll. May still be a little buggy, and can't yet cope with screen
resizes. Also, the "shown" indicator is broken.
2025-05-26 21:52:31 +01:00
Harvey Tindall
c52ba2162e config: start adding path parameters
to change the urls of the admin page, the my account page and of
invites. Seems to work, but need to check all the code over and test.
2025-05-13 21:10:40 +01:00
Harvey Tindall
6347495b5b auth: use unicode b64 encoding on browser
brought over unicodeB64Encode/Decode from my other filaments project.
Fixes #364.
2024-08-28 14:29:36 +01:00
Harvey Tindall
a9dc601751 web: fix intermittent "coudln't connect" on page load
was caused by language selector loader, simply added a
"noConnectionError" param to the _get/_post... methods which is enabled
for it.
2024-08-04 21:57:17 +01:00
Harvey Tindall
cb5a8c1c23 accounts: position filter dropdown better for mobile 2023-12-22 17:46:57 +00:00
Harvey Tindall
ade032241a backups: upload and restore backup in-app 2023-12-21 18:12:58 +00:00
Harvey Tindall
195813c058 backups: triggerable in ui, viewable, downloadable
new "Backups" menu in settings lists all available backups, lets you
trigger a new one, and lets you download them.
2023-12-21 16:47:17 +00:00
Harvey Tindall
2d83718f81 activity: sort, load more, compromises for client-side search
my initial intent before starting search was for it to be server-sided,
considering this activity log could rack up 100s or 1000s of entries,
and then I forgot and did it client-sided.

this commit adds a feature to load more results when scrolled to the
bottom, and when a search returns few or no results (this is limited, so
it wont loop infinitely). Also finally got rid of the useless left
column, since my ideas didn't match my implementation.

also, sorting is only by date, can't be bothered with anything else.
2023-10-22 00:31:30 +01:00
Harvey Tindall
5a80145607 css: add notification animation
simple slide animation, plus a little scale effect when a duplicate
notification gets sent to make the notification more obvious.
2023-06-26 20:13:02 +01:00
Harvey Tindall
e4f03fac4b setup: report panic errors to user
many issues occur with setup, all this does is tell the user something
bad happened and to check the logs. Might help with solving issues.
Also fixed some now invalid typescript.
2023-06-11 15:11:00 +01:00
Harvey Tindall
0e1cbd7e7b fix m-half in ts 2021-12-31 00:26:11 +00:00
Harvey Tindall
e73ecb7a52 fix some padding issues 2021-12-31 00:22:28 +00:00
Harvey Tindall
18ae03554f tailwind: upgrade a17t, somewhat functional dark mode
instead of adding dark: variants to each element, a preprocessor script
adds them. still needs to be implemented to typescript.
2021-12-30 00:49:43 +00:00
Harvey Tindall
b39ad5c688 site: add features, dono button 2021-11-14 23:06:15 +00:00
Harvey Tindall
b10b558358 announcements: add {username}
also works in the subject.
2021-07-16 19:39:06 +01:00
Harvey Tindall
e97b90d4d7 Matrix: Setup bot, add PIN verification
PIN is verified but not used currently. Works a little different than
the others, you input your matrix user ID and then the PIN is sent to
you. The bot doesn't support E2EE, so the bot being the first one to
message ensures the chat is unencrypted.
2021-05-29 17:43:11 +01:00
Harvey Tindall
2d93b3b7ee Telegram: Allow admin to add telegram contact
Works in the same way as on the form, but can now be done in the
accounts tab.
2021-05-07 18:20:35 +01:00
Harvey Tindall
22a0d8925d Remove unused typescript, update config readme 2021-05-02 13:23:33 +01:00
Harvey Tindall
871bc9f396 use proper date formatting on form for expiry 2021-04-07 15:17:15 +01:00
Harvey Tindall
66b7df7cde use selected language for time format, add manual selector
You can now choose between 12h and 24h time in the top left language
menu. Your preference is stored by the browser for future visits.
2021-04-07 15:09:44 +01:00
Harvey Tindall
7196361cf6 (hopefully) get proper locale from browser 2021-04-07 14:05:17 +01:00
Harvey Tindall
6ec2186bdf switch accounts tab to unix times
should now respect the client's locale.
2021-04-06 20:53:30 +01:00
Harvey Tindall
3dd83bffbf Merge branch 'new-setup'
Merge new setup wizard

This is much more up-to-date than the previous setup page, with a new
design and previously missing/new settings. Currently only available in
english (hopefully that changes soon).

also fixes conflict in _post.
2021-01-27 22:06:44 +00:00
Harvey Tindall
167fae9892 add jellyfin connection test, submission
fully functional now, but still need to add some sections (ombi mainly).
2021-01-27 12:55:39 +00:00
Harvey Tindall
8c871bc5fa Add ts to link setting dependance
Also make store each setting as classes in a settings object, to make it
easier to serialize on submitting. Also, added
"substitute_jellyfin_strings", "no_username" and welcome_email.
2021-01-26 22:57:29 +00:00
Harvey Tindall
8af1c13d7e Display error messages on form
two new strings need translating in lang/form.
2021-01-25 18:01:18 +00:00
Harvey Tindall
422f13202b Use lang file in typescript 2021-01-15 14:43:31 +00:00
Harvey Tindall
eb370d64df Merge a17t-redesign, kinda ts-ify setup.js
the web ui has been redesigned with the a17t toolkit, which imo looks a
lot better than bootstrap. This also brought a complete rework of the
web code, which now makes a lot more sense hopefully. the setup page is
still stuck with bootstrap, its not much of a priority but i'll rewrite
it eventually.
2021-01-05 18:16:23 +00:00
Harvey Tindall
a1e30ff5db fix/improve parsing of last active dates
parseDT only uses the magic json.Unmarshal method if theres an error
with the better version. Error came from some times being sent without a
"Z" at the end denoting UTC.
2020-12-03 20:49:50 +00:00
Harvey Tindall
9dbf60e3df add URL base option for subfolder proxies
also cleaned up the naming of some things.
2020-11-22 16:36:43 +00:00
Harvey Tindall
b6f3cd7c1f dont re-b64 the jwt
pointless, and messed up swagger auth.
2020-11-12 21:25:52 +00:00
Harvey Tindall
d64e98da37 use Bearer auth instead of Basic
this was a relic from the python version, i'd modeled the auth code off
some random blog post back then.
2020-11-12 21:05:46 +00:00
Harvey Tindall
301f502052 Rework typescript to use modules
web UI now uses modules, and relies less on bodge to make things work.
Also fixes an issue where invites where "failed to send to xx" appeared
in invite form.
2020-10-22 17:50:40 +01:00