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.
requirement strings
Password requirement text is now loaded by the typescript, and can be
customized by changing the validationStrings variable. See wiki for more
info.
'html_templates' in 'files' can be set to a directory, in which you can
place custom version of the web ui pages. Added for #9. Wiki explainer
to follow.
invites
use table-sm and no form-check-input so profile menu looks normal on
bs4. Profile was being read after being marked as used on invites, so
single-use invites were deleted and no profile was applied.
i wanted to split up the web ui components into multiple files, and
figured it'd be a good chance to try out typescript. run make typescript
to compile everything in ts/ and put it in data/static/.
This is less of a rewrite and more of a refactoring, most of it still
works the same but bits have been cleaned up too.
Remaining javascript found in setup.js and form.html
user templates will become profiles. You will be able to make multiple,
and assign them to invites individually. This commit migrates the
separate template files into one profile entry called "Default", and
lets you select them on invites. No way to create profiles has been
added yet.
It's rough right now, but the accounts tab shows a list of users and
info. Right now the only action available is to apply settings (from
template or another user) to a selection of users. More to come.
closing the settings modal to immediately open another caused the
'modal-open' class on the body to get deleted, which meant scrolling
stopped working inside them. Also fix mistake added to jfapi in last commit.
the input areas in the user email menu were incorrectly identified by
the email address, which caused duplicate ids on blank fields, and
probably stopped any changes from being applied.
with jellyfin_login enabled, the username and password vals in the User
struct would be "". If you disabled 'required' on the login form, blank
username and password would allow you in.
the main JWT is stored temporarily, whereas the refresh token is stored
as a cookie and can only be used to obtain a new main token. Logout
button adds token to blocklist internally and deletes JWT and refresh
token from browser storage.
the generate invite box now wraps into 1 column automatically.
the invite code is ellipsized on small displays.
the dropdown button has a large tappable area, and is aligned correctly.
server now provides a reason for login fail to the web ui, and displays
it inside the login button, which looks a lot nicer than the previously
used error box.
Previously, directly editing the <link> tag with the new file would
cause the page to have no stylesheet for a moment while the new file is
downloaded. A new element is now appended below the original instead,
which smoothens out the transition.