Commit Graph

70 Commits

Author SHA1 Message Date
Harvey Tindall
0ecacc6064 tasks: add /tasks/jellyseerr, document
now live in tasks.go and have actual API documentation.
/tasks/jellyseerr triggers account import.
2025-11-28 17:26:27 +00:00
Harvey Tindall
d7e4431bd8 settings: more dependency fixes 2025-11-27 17:52:49 +00:00
Harvey Tindall
96ec12f2bd settings: hide groups if all children are hidden
only really affects the "Email" group when messages|enabled is false.
2025-11-27 16:36:26 +00:00
Harvey Tindall
d6d73e81d6 settings: fix (restart)required detection on save 2025-11-26 21:12:43 +00:00
Harvey Tindall
875387166e settings: fix weirdness on mobile
the check and button's onclick were both firing occasionally, so added
check to button.onclick that the target isn't the check or it's icon, as
I did for the invite details toggle.
2025-11-25 21:04:12 +00:00
Harvey Tindall
909614c3e7 invites: add details expand transition
why not.
2025-11-25 20:49:24 +00:00
Harvey Tindall
3178ca7572 settings: remove badge note, add tooltips to them
change required and restart required badges to icons with tooltips, and
removed the note at the top of settings. As a result, the sidebar is
much thinner.
2025-11-25 17:13:43 +00:00
Harvey Tindall
442bdd2220 settings: leave groups opened/closed on advanced settings toggle 2025-11-25 15:04:24 +00:00
Harvey Tindall
a680db92a7 settings: fix group indent
obviously groups don't need an increased margin value, they already have
a margin from the parent! Also increased it to ml-6.
2025-11-25 14:56:53 +00:00
Harvey Tindall
08c350d50b settings: fix search with groups
works now, as in searching for a group's name works, and seeing matches
within groups works.
2025-11-25 14:43:56 +00:00
Harvey Tindall
607d8e9566 settings: show updates at top if one available 2025-11-24 18:43:08 +00:00
Harvey Tindall
8f3b860cc7 settings/config: add root order and use on web, fix nesting and
animation

added an optional root "Order" field to the config. scripts/ini will
warn if you've used this and forgot to include any sections.

added more/most sections to a group now.

groups have their maxHeight set to 9999px once animation finishes, and
have it quickly set back to ~scrollHeight before they're animated
closed.
2025-11-24 18:31:35 +00:00
Harvey Tindall
a3dc8b7e07 settings: render groups
a little off at the moment but works, groups show as accordions and can
be nested. Maybe add indentation, and probably show them first in the
list. Also make sure search works with them.
2025-11-24 15:19:20 +00:00
Harvey Tindall
febbe27a0d emails: fix conditionals not being cleared on editor load 2025-08-31 17:31:48 +01:00
Harvey Tindall
e67f1bf1a9 emails: fix and confirm function of all emails
both custom and standard emails tested, quite a few fixes made,
including to an old bug with admin notifs.
2025-08-31 17:12:50 +01:00
Harvey Tindall
e38ac62ae4 settings: fix search with disabled/deprecated sections/settings
it was assumed all sections and settings would exist (either in
this._sections or on the DOM with the "data-name" attribute). Now it
checks they do and just ignores them if not.
2025-05-14 22:11:24 +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
d6f5c91d78 backups: add more info, keep 1 of each version opt
backup's filename format has changed, and includes the commit too now. a
Backup struct for going to/from the filename has been added, and the
option "keep 1 backup from each version" has been added, leaving the
most recent backup from each version always. All pre-this-commit backups
are considered the same "old" version.
2025-05-13 15:07:55 +01:00
Harvey Tindall
02f4ba6e8e ts: use pages modules in admin (kinda), change pseudo-links
pseudo-links are now just links, because i'm lazy and it's easier than
fixing an issue. They now take the form `/?invite=code` and
`/accounts/?user=userid`.

ts/modules.tabs.ts is now a wrapper for ts/modules/pages.ts.

Also, fixed no section appearing when visiting the settings tab.
2024-08-28 14:18:52 +01:00
Harvey Tindall
f063b970b4 config: migrate to new yaml format
config-base.yaml is almost identical to json version, except there's no "order" field, as
"sections" and "settings" fields are now lists themselves and so Go can
parse the correct order. As such, removed enumerate_config.py. Also,
rewrote scripts/generate_ini.py in Go as scripts/ini/. Config structure
in Go form is now in common/config.go, and is used by jfa-go and the ini
script. app.configBase is now untouched once read from config-base.yaml,
and instead copied to and patched in app.patchedConfig. Patching occurs
at program start and config modification, so GetConfig is now just a
couple of lines. Discord role patching still occurs in GetConfig, as the
available roles can change regularly. Also added new "Disabled" field to
sections, to avoid the nightmare of deleting from an array.
2024-08-26 15:43:28 +01:00
Harvey Tindall
a7aa3fd53e settings: de-dupe settings
all DOM elements now based off DOMSetting, which encompasses most
functionality. Extending classes (i forgot the terminology) pretty much just pass a
custom "input" element, "hider" element (the one to unfocus). DOMList
and DOMSelect remain slightly more complicated, but are much cleaner
now. Some CSS stuff has been adjusted too.
2024-08-24 13:09:22 +01:00
Harvey Tindall
32161139b2 settings: dependencies of dependencies
`settings-set-${section}-${name}` is now broadcast when a setting's
value is actually changed, while `settings-${section}-${name}` is
broadcast then or if the setting is hidden, i.e. by its parent (i.e.
some "enabled" bool). This allows chains of dependencies to be resolved
visually. When a setting is hidden, the value sent is "false", and when
a setting is shown again, the actual value of it is sent.
2024-08-23 18:50:50 +01:00
Harvey Tindall
e5f79c60ae webhooks: add "user created" webhook
Webhooks send a POST to an admin-supplied URL when something happens,
with relevant information sent in JSON. One has been added for creating
users in Settings > Webhooks > User Created.

Lazily, the portion of GetUsers which generates a respUser has been
factored out, and is called to send the JSON payload.

A stripped-down common.Req method has been added, which is used by the
barebones WebhookSender struct.
2024-08-20 21:45:31 +01:00
Harvey Tindall
6bad293f74 config: add support for "list" type
"list" is a list of strings, represented in the .ini as repeated entries
for a field, e.g.
url = myurl1
url = myurl2
Shown in the UI as multiple inputs with delete buttons.
2024-08-20 20:19:32 +01:00
Harvey Tindall
e71d492495 config: migrate "url_base" dupes to "jfa_url"
URL Base now refers to JUST the subfolder portion, i.e. `/accounts` if
you access jfa-go at `http://jellyf.in/accounts`. General > "jfa_url"/"External
jfa-go URL" now refers to the WHOLE URL you access jfa-go at, i.e.
`http://jellyf.in/accounts`. The settings in "invite emails" and
"password resets" have been removed, and a value chosen from the two
applied to "jfa_url". Migration also makes a config backup. Adds a
"deprecated" flag to config-base, which just tells the UI to not show
it (for now). Also added some warnings related to the URL base /
External URL.
2024-08-12 18:53:46 +01:00
Harvey Tindall
3a0f61e324 config: add wiki links
main wiki link included with "about" and "user profiles". Sections with
a relevant page have a linked button next to their title when clicked.
Behaviour added by the "wiki_link" field in the "meta" section of a
config "section".
2024-08-10 20:19:38 +01:00
Harvey Tindall
b40211a6e0 settings: add loader, improve css a bit
Loader appears on about/user profiles area. These two are now shown next
to each other.
on small screens, the sidebar list of sections is displayed without a
card around it, and the top left/right corner buttons on all pages are
correctly aligned with the content.
2024-08-05 20:23:10 +01:00
Harvey Tindall
dabef831d7 form: add more customizable success card
Success card could be customized simply with the "Success message"
setting, but a new "Post sign-up help card" in the Message editor
supports full markdown.
2024-07-28 20:05:13 +01:00
Harvey Tindall
ade032241a backups: upload and restore backup in-app 2023-12-21 18:12:58 +00:00
Harvey Tindall
eff313be41 backups: restore local backups in-app 2023-12-21 17:42:07 +00:00
Harvey Tindall
1bb83c88d9 backups: add filesize to list 2023-12-21 16:51:33 +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
73cfa5bef2 settings: "no results found", section matching
No results found screen added, nd when a section name matches the
search, all settings in the section are shown normally.
2023-10-14 12:33:48 +01:00
Harvey Tindall
6909477f45 settings: hidden items in search explained
if a matched setting is hidden, an aside card will show explaining why,
    eitherbecause advanced settings is not enabled or because it depends
    on another setting.
2023-10-13 19:07:41 +01:00
Harvey Tindall
701d1305d3 settings: non-match search result have transparency
Matches have 100% opacity, non-matches have 50. Looks better than the
aside thing, doesn't break anything.
2023-10-13 15:52:53 +01:00
Harvey Tindall
08498074ed settings: funtioning search functionality
Search box and clear button work, curently matching settings are changed
to "aside"s for the border effect. Not super happy with how it looks
yet, and it messes up tooltips slightly.
2023-10-13 14:51:42 +01:00
Harvey Tindall
635c2be32c settings: initial search function
not really plugged into anything yet.
2023-10-13 10:30:59 +01:00
Harvey Tindall
084f8aa658 settings: link to new PWR wiki article in note 2023-09-09 16:02:39 +01:00
Harvey Tindall
920161b920 settings: add "note" type, shows as card
also comes with a "style" attribute, to apply a color to the aside it's
shown in. Used in User Page/Messages to mention the customize button,
and on User page w/ a critical color to mention the jellyfin login
requirement.
2023-06-21 12:28:52 +01:00
Harvey Tindall
7b9b0d8a84 userpage: implement login message card
Shares code with custom emails, so most related functions have had a
%s/Email/Message/g. Press the edit button on the user page setting to
add a message.
2023-06-20 21:43:25 +01:00
Harvey Tindall
9874dce520 merge tailwind and upgraded a17t
a17t v0.10 became a tailwind plugin rather than standalone css, and made
some other changes. Much of the original custom CSS now uses tailwind
classes, and there have been some other UI changes.
2022-01-04 20:28:36 +00:00
Harvey Tindall
2f50ab36fd pad table and some other stuff 2022-01-04 20:09:51 +00:00
Harvey Tindall
7e0e0b0520 fix form layout 2021-12-31 18:52:03 +00:00
Harvey Tindall
3dbb993d35 fix button layout on accounts tab 2021-12-31 02:03:29 +00: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
51b59ae103 settings: add button to get logs 2021-12-30 17:54:27 +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
73c7f22bd1 messages: add option to show/hide linking on registration
In each of the Discord/Telegram/Matrix sections, the "Show on user
registration" option can be disabled to hide the "Link xxx" button on
the registration form. This is useful is you're only using these
registrations for admin purposes.
2021-11-17 16:49:26 +00:00
Harvey Tindall
9092f42834 remove vulnerable node deps, cleanup 2021-11-14 14:50:40 +00:00