1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-09 20:00:12 +00:00
Commit Graph

164 Commits

Author SHA1 Message Date
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
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
8af1c13d7e
Display error messages on form
two new strings need translating in lang/form.
2021-01-25 18:01:18 +00:00
dd96d71280
Add optional label for invites
Requested in #38.
2021-01-24 15:55:45 +00:00
ea262ca60b
add optional welcome email for new users
When enabled, an email with the server URL and username will be sent to
created users. Requested in #38.
2021-01-24 15:19:58 +00:00
e834445b0b
Restructure language loading to support incomplete translations
On startup, files are scanned and any missing values are replaced with
the english version.
2021-01-19 00:29:29 +00:00
3d5bea003a
Fix email language selection, add finished french emails 2021-01-15 14:43:32 +00:00
bc99dc34ee
Add email translation, add part of french translations
Admin translation from @Killianbe, Email translation from
@Cornichon420. French is currently not functional, a few things are
missing which i'm waiting on.
2021-01-15 14:43:32 +00:00
4679c6f355
add language selector to admin 2021-01-15 14:43:32 +00:00
a3351f4da8
separate options for form and admin language 2021-01-15 14:43:32 +00:00
3c799b8783
remove debug printfs 2021-01-11 19:19:19 +00:00
3fbbc7f620
add language selector to form 2021-01-11 19:17:43 +00:00
8d0dc232d7 option to substitute "Jellyfin" in form.html
setting is jellyfin/substitute_jellyfin_strings.
2021-01-10 16:10:03 +00:00
d9e1e2f58b compiles, basic issues fixed
Server type is found under the Jellyfin settings tab, where you can
change it to emby. Currently:

* logs in
* creates users
* parses accounts
2021-01-10 16:10:03 +00:00
5d56ed5378 fix most incompatibilites, start separating api clients 2021-01-10 16:10:03 +00:00
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
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
9dbf60e3df
add URL base option for subfolder proxies
also cleaned up the naming of some things.
2020-11-22 16:36:43 +00:00
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
47abf20e1d
store emails even if password resets are disabled
there are other reasons to store email addresses now, so this is no
longer a just requirement.
2020-11-03 21:20:38 +00:00
493f10fa36
add french, fix language selector in settings
note: custom language files can now be added in data/lang/form and will be
listed in settings.
2020-11-03 21:11:43 +00:00
8e45ecb214
add cache_timeout option
controls how old the Jellyfin user cache can be before refetching. defaults to 30 minutes.
2020-11-02 23:26:46 +00:00
d4a92adc65
add rough error logging for read/write errors 2020-11-02 23:20:06 +00:00
c84ea17af4
refactor; separate jfapi and ombi into modules 2020-11-02 00:53:08 +00:00
95c9f4f42d
Apply email addres changes to ombi
for #11.
2020-10-30 21:13:13 +00:00
a89dc40ff2
delete ombi user when deleting jf user
also fix ombi defaults menu in ui. responds to #11.
2020-10-29 16:03:00 +00:00
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
7628e5d71d
Move api models to separate file 2020-09-27 21:03:37 +01:00
9f6e405d1c
Add auth and tags to swagger 2020-09-24 18:50:03 +01:00
b6537cef65
Add basic swagger documentation
accessible by running with -swagger. Accessible at /swagger/index.html.
Currently doesn't have authentication setup, so no requests will work.
2020-09-24 17:51:13 +01:00
9bd7fca95e
fix table sizing on bootstrap 4; fix profile application on single-use
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.
2020-09-23 19:12:58 +01:00
89e70f6f7a
Add default profile functionality
Default profile can be selected in settings.
2020-09-23 18:48:00 +01:00
6b25215768
apply settings even if section doesn't exist
in response to issue #7. Not sure why this wasn't the original
behaviour, nor how I hadn't noticed it earlier
2020-09-23 17:20:48 +01:00
903a61d0f2
Profiles replace user templates
Profile functionality is essentially complete, and they can be created
in settings. Only thing currently missing is a way to set a default
profile.
2020-09-23 00:01:07 +01:00
2ab9b48f4b
Move settings menu to a tab
settings is now its own tab instead of a modal.
2020-09-22 20:46:48 +01:00
b6ceee508c
Fix bug with invites in webui, add profile selector
invite codes starting with a digit don't work with the webui, so
GenerateInvite regenerates uuids until theres one that doesn't.
2020-09-22 00:34:11 +01:00
32b8ed4aa2
rewrite* most web ui code in typescript
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
2020-09-21 22:06:27 +01:00
c4acb43cb8
Initial features for move to profiles
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.
2020-09-20 11:21:04 +01:00
49b056f1d6
fix notification buttons
their current status wouldn't display because of a slight mistake, and
they did the wrong thing because i forgot there isn't a nil value for
bools.
2020-09-19 17:05:09 +01:00
5ba40cd6f8
fix panic when jfa-go user has no email set with jellyfin_login 2020-09-19 09:09:30 +01:00
d4b94bc9d9
add user button
added create user button for the admin to use.
2020-09-18 00:59:59 +01:00
9213f2a078
Add account deletion with email notification
Select users to delete, then optionally opt to notify the user in an
email with a provided reason.
2020-09-17 23:50:07 +01:00
7ac750879f
Remove email addresses in settings, move to accounts tab
still a little rough, but it works.
2020-09-17 21:23:45 +01:00
cd61989495
Initial features of accounts tab
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.
2020-09-17 16:51:19 +01:00
a8b4842895
add more info to getUsers, move admin.html css to scss files
more deatils included in getUsers response in prep for feature request #5. bs4 and bs5 css are now compiled instead of being copied.
2020-09-16 21:42:22 +01:00
b8dfb5d6a3
decouple email content from sender to ensure thread safety
If two emails fired off at once, they would previously replace each
other's content and possibly send the wrong email to the wrong person.
construct* methods now return the email content, which is sent
separately.
2020-09-13 21:18:47 +01:00
51839b5942
Restructure email sending
smtp and mailgun now implement an emailClient interface, which the
Emailer can use.
2020-09-13 21:07:15 +01:00
bbb0568cc4
basic daemon functionality, self-restarts without syscall.exec
running 'jfa-go start' will run it as a daemon in the background, and
'jfa-go stop' will tell it to quit via a unix socket. Self-restarts are
now implented by simply exiting the main function (now called start) and
running it again.
2020-09-08 23:08:50 +01:00
ba67fa7536
Initial Ombi integration
When enabled, an account for the user is created on both Jellyfin and
Ombi. Account defaults can be stored similarly to jf.
2020-09-05 17:32:49 +01:00
0e39b2b699
remove debug fmt.Printlns 2020-08-20 20:35:50 +01:00
ee3b421566
Fixed flaw with jellyfin_login; store refresh token in cookies
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.
2020-08-20 20:20:31 +01:00
d144077e62
Add refresh tokens for persistent login, logout button
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.
2020-08-19 22:30:54 +01:00
fd766e7b1a
use app identifier instead of ctx
changing this because ctx is commonly used with the context package.
2020-08-16 13:36:54 +01:00
39bf3ad7f1
Safe shutdown 2020-08-05 16:58:24 +01:00
23dbcf33ae
reinitialize validator on settings change 2020-08-03 00:12:45 +01:00
f0be006e16 use goroutines for (most) emails
invite emails have been left alone so that email success message is
shown on web ui
2020-08-02 17:17:29 +01:00
f508b65fa0 Added setup, self restarts 2020-08-02 00:05:35 +01:00
4e16f6fd48 make checkInvite check only one invite, invite daemon
checkInvite no longer loops over all invites and checks for expiry, that
functionality has moved to checkInvites. Couple more rogue print
statements removed aswell.
2020-08-01 15:22:30 +01:00
99a643ce9c Finished logging api 2020-08-01 12:35:28 +01:00
326b274329 Settings functional, start adding logging
Modifying settings also formats it nicely, as a bonus.
Also we using shortuuid instead of normal uuidv4 now because its the same
length as what I used in the python version.
2020-07-31 22:07:09 +01:00
024c0b56aa Display settings with hacky solution to retain order
Python utility included to convert config-base.json into a new version
which includes lists that define the order settings should be displayed.
admin.js edited to recognize this.
2020-07-31 16:09:30 +01:00
ef4f2503c9 DeleteInvite, user defaults, and email list modification 2020-07-31 13:59:25 +01:00
961b9afa75 Functioning user creation, notifications,
Fixed password validation for new users, add invite route, couple other
fixes.
2020-07-31 12:48:37 +01:00
d8fb6e5613 first 2020-07-29 22:11:28 +01:00