Commit Graph
100 Commits
Author SHA1 Message Date
Harvey Tindall 03f1a3dbc0 userpage: expand contact card to fill height 2023-06-18 13:04:22 +01:00
Harvey Tindall 75dc9d4d1d userpage: store refresh token separately
stored as "user-refresh" fixes weird issues when two accounts are logged
in.
2023-06-18 12:30:23 +01:00
Harvey Tindall 5beeeb958b userpage: show expiry 2023-06-18 12:27:18 +01:00
Harvey Tindall a22f032924 userpage: show and allow modification of contact methods 2023-06-17 17:27:44 +01:00
Harvey Tindall 3e034c85d6 auth: provide error message if account is disabled 2023-06-17 13:57:48 +01:00
Harvey Tindall d3c5feaf1b userpage: use form langfile, move login strings to common
login-related stuff was moved into common using the langmover script, so
that the user page doesn't have to use the admin language files.
2023-06-17 12:48:28 +01:00
Harvey Tindall 96c62f556b langmover: rewrite whole directory when using --extract
--extract now takes a path argument, a new copy of the source folder is
made there. Rebuilding the whole folder gets rid of annoying things like
mis-capitalized files.
2023-06-17 12:45:00 +01:00
Harvey Tindall ebdad3f7c7 scripts: fix langmover for non-ascii chars 2023-06-16 20:59:06 +01:00
Harvey Tindall 2fc2f1ddb3 lang: add patchable notifications to common 2023-06-16 18:29:49 +01:00
Harvey Tindall a1af6e3892 scripts: add langmover
a tool to move strings between language file sections. Will be used to
move login strings from admin into their own "login" file section.
2023-06-16 17:27:09 +01:00
Harvey Tindall 726acb9c29 userpage: initial page
login, lang, and theme work. Currently only makes a request to a
hello-world type endpoint to verify auth works. Accessible at
/my/account.
2023-06-16 14:43:37 +01:00
Harvey Tindall 54fde33a20 admin: a little more refactoring
all theme functionality is now in theme.ts, and the tab stuff has been
changed a little but kept in admin as it won't be in use anywhere else
for the time being.
2023-06-16 13:43:34 +01:00
Harvey Tindall b8cc75c6b4 login: modularize frontend code
all in ts/modules/login.ts
2023-06-15 23:52:16 +01:00
Harvey Tindall b13fe7f3e4 html: move login modal to own file 2023-06-15 22:00:08 +01:00
Harvey Tindall 81372d6a6b auth: fix "ok" issue
the "ok" returned when the JWT claims are read was being overridden with
"false" before it could be checked.
2023-06-15 21:59:34 +01:00
Harvey Tindall 918f8816c5 auth: slight refactor, setup user auth
user-auth.go contains slightly adjusted versions of auth.go functions,
for authorizing jellyfin users (admin or not). Refactored auth.go so that
most code is shared. User auth isn't hooked up yet, nor has it been
tested.
2023-06-15 21:32:18 +01:00
Harvey Tindall bf981935cb form: fix header alignment 2023-06-15 18:20:46 +01:00
Harvey Tindall 1fa92f78e4 merge captcha changes 2023-06-15 17:36:17 +01:00
Harvey Tindall 07564bbde3 captcha: recaptcha respects dark mode
also removed the ugly border around it.
2023-06-15 17:35:51 +01:00
Harvey Tindall 4014e93155 signup: add reCAPTCHA
can be enabled in settings > captcha, requires a site key & secret key
from google. New wiki article explains getting these. currently a little
ugly looking on the page itself, hopefully fixable.
2023-06-15 17:11:27 +01:00
Harvey TindallandGitHub 115f5ae6a3 Merge accounts sort/filter
Accounts Sort/Filter, UI adjustments
2023-06-14 20:41:27 +01:00
Harvey Tindall bf12016315 accounts: make filter names translatable 2023-06-14 19:59:38 +01:00
Harvey Tindall b544931ee5 accounts: fix id filtering, make string translatable 2023-06-14 18:57:30 +01:00
Harvey Tindall 9cef626b28 accounts: filter dropdown appears over announce one 2023-06-14 18:52:33 +01:00
Harvey Tindall 708d382a3f accounts: fix hiding of search options header for default sort 2023-06-14 18:43:46 +01:00
Harvey Tindall f24ea4a5f8 accounts: fix sizing of sorting by button 2023-06-14 18:41:47 +01:00
Harvey Tindall 6ddd09ff1f accounts: add header to "actions" and "search options" 2023-06-14 18:38:12 +01:00
Harvey Tindall ddc560e862 accounts: move filter button, add clear search
filter button now on left due to the dropdown being huge.
2023-06-14 17:36:41 +01:00
Harvey Tindall 6f452c62de accounts: fix search bugs, adjust top bar layout
search bar is now massive with a small filter button next to it.
Action buttons are on their own row.
Also fixed dealing with going from a search with filters in to an empty
one, search() is now called for any change at all to the input.
2023-06-14 17:15:24 +01:00
Harvey Tindall 76bb95098c accounts: add list of available filters, fix deletion of existing date filters
The "Filters" button gives a list of filterable fields, and buttons to
select the type, including true/false, text match, and on/before/after a
date. When clicked, the appropriate values are put in the search box and
the cursor is placed if any input is needed.

Dates and strings are also now matched correctly, and case-insensitively when
deleting a filter.
2023-06-14 14:01:05 +01:00
Harvey Tindall 0e241f56fb scripts: add script to generate fake accounts
might be useful for screenshots too, currently just using for testing
the sorting/filtering.
2023-06-14 11:50:22 +01:00
Harvey Tindall 8ac3bb9711 accounts: show list row of search filters, click to remove
any filters in your search box will show as little button/chip things on
the row below. Clicking them will remove them from the search.
2023-06-13 22:27:08 +01:00
Harvey Tindall ff62f8821a accounts: filter by date, with =, <, >
Uses "any-date-parser" library to understand more date/time types.
Format is: "<field>:<equals, less than, greater than><date>", where the
part after the colon uses =, <, >. Omitting a symbol is the same as
using "=".
2023-06-13 17:19:24 +01:00
Harvey Tindall 90c433443f accounts: filter by string field, general search
string fields can now be searched by with the "<field>:<value>" syntax,
also added back a better general search, that supports essentially all
string fields, including Jellyfin ID.
2023-06-13 13:55:40 +01:00
Harvey Tindall 8a37663c89 accounts: start advanced search filter support
uses the same format "<field>:<value>", but supports quoted <values>
(allows for spaces in them), and lays groundwork to support string and
date-type field filtering. Truthiness is supported, meaning you can
check if an email is set with "email:yes" for example.
2023-06-13 13:39:13 +01:00
Harvey Tindall bc4015ac50 accounts: add indicator of sorted column at top of list
When clicking on a column to sort by it, a button with "Sorting By:
<column>" appears. Clicking it will reset the sort, which defaults for
ascending username.
2023-06-13 12:13:12 +01:00
Harvey Tindall f13c0d78a8 accounts: ability to sort by columns
click on column header in account table to sort by it, click again to
change sort direction. Works for all of them.
2023-06-13 11:07:56 +01:00
Harvey Tindall cc3871adf6 site: update node deps 2023-06-12 18:49:42 +01:00
Harvey Tindall 3e52beef14 update node deps, fix resulting issues 2023-06-12 18:44:10 +01:00
Harvey Tindall 48403ce940 discord: proper support for discriminator-less
names with no discriminator are shown as @username, and search works
with the @ too. Also bumped go version to 1.20, since it was stuck on
1.16 and i felt like trying generics (in an ugly way).
2023-06-12 16:32:40 +01:00
Harvey Tindall 6564df8082 about: fix donation buttons in dark mode 2023-06-12 16:05:50 +01:00
Harvey Tindall 73202e1483 crash: render ANSI colors on crash page
Could not for the life of me get any regex to properly strip the ANSI
escape sequences, so the text log will have to suffer with them, but the
ansihtml library is now used to render them into HTML.
2023-06-12 15:48:07 +01:00
Harvey Tindall dc60e97415 update license 2023-06-11 20:00:30 +01:00
Harvey Tindall ad40d7d8a9 fix bugs with restarts/interrupts
The password reset daemon wasn't being closed on restarts, so an extra
pwr would be sent w/ every restart. Restarts & Interrupts (Ctrl-C)
rarely worked, as there were multiple listeners to the "RESTART"
channel, and I didn't know the message was consumed by whoever got it
first, meaning if the main thread didn't get it first, the app wouldn't
quit. Listeners are now registered, and the restart message is
re-broadcasted until everyone's got it.

Fixes #264
2023-06-11 19:50:50 +01:00
Harvey Tindall f88f71d933 pwreset: Stop daemon on restart, dont fail if json is malformed
daemon now stops on the RESTART signal, and when it fails to read JSON,
it no longer stops the whole daemon.
2023-06-11 16:35:41 +01:00
Harvey Tindall d688dd02c8 args: respect other args when start/stop/daemon are used
these being present in os.Args messes up "flag"'s parsing of the rest of
the arguments, so when they are found, they are removed.

Fixes #267
2023-06-11 16:06:18 +01:00
Harvey Tindall 456c99d7db args: fix help not usually showing
another weird side effect of the line cache/logging stuff.
The true stderr is now stored in the "stderr" global variable and is
used to print the help screen.
2023-06-11 15:48:27 +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 2cb72e1f48 module update, add notice to site 2023-06-11 14:22:58 +01:00
Harvey Tindall d800b97f69 README: add note about project status 2023-04-21 18:01:08 +01:00
Harvey Tindall 0674e04ee1 go module update/tidy 2023-02-20 10:47:54 +00:00
Harvey Tindall d56f321aad site changes 2023-02-05 01:08:29 +00:00
Harvey Tindall bedd2bbb23 README changes 2023-02-05 00:59:04 +00:00
Harvey Tindall 27ef7ce560 css: revert global change to absolute position for dropdowns
changing dropdowns to always have absolute positioning (in c187b94)
caused issues with all other dropdowns, where neighbors were positioned
below and hidden. adding the "over-top" class to a dropdown now gives
it absolute positioning.
2023-02-05 00:49:13 +00:00
Harvey Tindall 775ebd3b1e Accounts: Unlink Telegram/Discord/Matrix through cog
Added an unlinking section to the little cog dropdown next to users so
that one can remove and re-link a different account for a Jellyfin user.
Also adjusted padding in the dropdown.
2023-02-05 00:23:16 +00:00
Harvey Tindall 49c7d83840 fix logging and crash reports on Windows
"-H=windowsgui" disables stdout on Windows, and the io.Multiwriter used
for logging had stdout as it's first entry, which failed and caused
    logging and line caching to be skipped. stdout is now removed from
    the multiwriter in this situation. Other portion of the issue was
    because crash reports had colons in their names, which Windows
    doesn't like. Fixes #168.
2023-02-02 13:42:15 +00:00
Harvey Tindall c187b948d9 accounts: display "Contact through" above container
stops most of it being hidden at the bottom of the page.
2023-02-02 12:18:34 +00:00
Harvey Tindall eb85ee4d35 add option to auto redirect to jellyfin (or given link)
if enabled (General>Auto redirect on success), the user will not have to
    click "continue" on the form or creation success page and will
    insted be redirected. For #242.
2023-02-02 10:34:22 +00:00
Harvey Tindall de6bc02ad8 Merge branch 'main' of github.com:hrfee/jfa-go 2023-02-02 09:41:56 +00:00
Harvey Tindall d355b3167f fix GOESBUILD for newer go versions
switched to 'go install' syntax. for #248.
2023-02-02 09:41:14 +00:00
Harvey TindallandGitHub 6cd846dfd8 Merge pull request #251 from aleksasiriski/patch-1
fixed setExpiry() and added checked to admin only
2023-02-02 09:27:12 +00:00
Harvey Tindall 5d289ce023 Admin: auto enable contact when an email is added
"Contact through email" is now automatically enabled when adding an
email address to an account without one on the admin page. Solves #233.
2023-02-01 15:25:47 +00:00
Harvey Tindall 2722e8482d Invites: unique email/ID requirement
"Require unique ..." Settings (`require_unique` in relevant sections of
config.ini) are now available for email/discord/telegram/matrix. An
error is shown on the invite form if a non-unique address/ID is used.
This was on my kanban without a link to an issue, so i'm guessing it was
requested on Discord.
2023-02-01 15:11:10 +00:00
Harvey Tindall 895dcf5a30 fix missing create-success css
part of #242
2023-02-01 14:14:13 +00:00
Harvey Tindall ac25c9cd7f accounts: Show "contact through" cog when only email is given"
one portion of #233: When adding an email address to an account, the
admin (for now) will manually have to enable its use by clicking the cog icon and
enabling "contact through email". Only for now, currently some other
unfinished work is stopping me from committing the other portion of code
for this issue.
2023-01-30 14:00:29 +00:00
Harvey Tindall 47d00d1f27 site: properly fix modals
uncss was clearing out the "block" and "animate-fade-in/out", so removed
that step since tailwind does a similar thing anyway.
2022-12-29 21:15:07 +00:00
Harvey Tindall 6bab805528 site: fix modals 2022-12-29 20:31:29 +00:00
Harvey Tindall 6efd28d904 fix translation conflict 2022-12-29 17:48:37 +00:00
Harvey Tindall 04329bf171 fix issue with light mode colors 2022-12-29 17:32:59 +00:00
Harvey TindallandGitHub 3d56b6864e Merge pull request #234 from HackingHackers/main
Fix Chinese translation issues
2022-12-29 16:51:25 +00:00
Harvey Tindall 4c3e310634 use go install for swag in goreleaser 2022-03-22 15:16:04 +00:00
Harvey Tindall 8b52330304 remove unused nightwind dep 2022-03-22 15:09:38 +00:00
Harvey Tindall 200dc1c91a lowercase lang 2022-03-22 15:03:53 +00:00
Harvey Tindall 12db53d1eb reorganise api, add "Connection refused" error in setup
fixes #201
2022-03-22 14:58:39 +00:00
Harvey Tindall cebde9d4c0 setup: report errors when saving config 2022-02-03 19:19:21 +00:00
Harvey Tindall 9395165916 updater: check build is ready 2022-01-30 18:25:47 +00:00
Harvey Tindall a8daa2c77e makefile changes 2022-01-30 18:03:21 +00:00
Harvey Tindall 49c873c858 dont ignore esbuild errors 2022-01-30 17:59:52 +00:00
Harvey Tindall c6fc5765f3 update node version in Dockerfile 2022-01-30 17:18:51 +00:00
Harvey Tindall 62cbbf57e7 form: fix mono text in discord linking modal 2022-01-30 16:47:29 +00:00
Harvey Tindall b81c5636cc settings: better top button padding on mobile 2022-01-30 16:43:28 +00:00
Harvey Tindall d867649a93 padding; fix hungarian lang names 2022-01-30 16:38:19 +00:00
Harvey Tindall cd08259012 lowercase lang 2022-01-30 16:28:20 +00:00
Harvey Tindall ecbff16a88 modal: change transition
now a simple fade-in/fade-out, which is part of tailwind.config.js
rather than modal.css.
2022-01-30 16:24:40 +00:00
Harvey Tindall baffa4a38c add NOTEMPLATE env var to missing-colors.js 2022-01-30 14:41:11 +00:00
Harvey Tindall 6431613363 update version; mention log button in bug report template 2022-01-30 14:27:00 +00:00
Harvey Tindall 25451eb763 form: show radios for only linked contact methods 2022-01-27 16:56:21 +00:00
Harvey Tindall dbefb80f63 form: reliably disable submit button, communicate if account linking is required 2022-01-27 16:48:46 +00:00
Harvey Tindall 4deb45df3c fix code text color in dark mode 2022-01-26 22:25:33 +00:00
Harvey Tindall 4b02960fd1 form: add captcha regen button
lots of false negatives so this is a solution for now.

Also the registering of each discord command is now logged for debugging
purposes.
2022-01-26 22:14:16 +00:00
Harvey Tindall 15e5564b12 discord: add/move to slash commands
the version of the discord library with support for this isn't
necessarily stable, so normal ! commands will still be available. The
user is no longer DMed for the PIN, instead they type /pin <PIN>.
2022-01-26 21:47:02 +00:00
Harvey Tindall e66241ddcb fix crash page css when using goreleaser 2022-01-26 15:45:21 +00:00
Harvey Tindall d3990a6c55 upgrade vulnerable dependency 2022-01-26 14:37:14 +00:00
Harvey Tindall be1d081629 build: fix css bundling bug with new esbuild
local testing was being done with an older version of esbuild which
didn't mind @tailwind statements before @imports (it complained, but did
its job). On the latest version used in Docker builds, it would leave
the @import statements intact which broke things like modals.
2022-01-26 14:26:10 +00:00
Harvey Tindall fafb524a47 accounts: link ombi/discord when adding 2022-01-25 18:05:17 +00:00
Harvey Tindall da1b9ccac7 ombi: add migration to link telegram/discord 2022-01-25 18:02:04 +00:00
Harvey Tindall 7b97e1ca26 fix discord/telegram linking with ombi
original issue creator replied with the fix.
2022-01-25 17:37:14 +00:00
Harvey Tindall 7f11549337 ombi: broken discord/telegram linking
doesn't work due to https://github.com/ombi-app/ombi/issues/3484
committing to save progress.
2022-01-25 17:01:18 +00:00
Harvey Tindall 987e0ddd4e accounts: show "Set expiry" button for non-disabled users
previously hidden in a dropdown on the "re-enable" button for disabled
users only, now can be used on active ones.
2022-01-25 15:27:16 +00:00
Harvey Tindall 8fd097836f discord: send in-channel reply to !start 2022-01-14 17:26:19 +00:00