1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-06-02 07:37:48 +02:00
Commit Graph

107 Commits

Author SHA1 Message Date
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
c84ea17af4
refactor; separate jfapi and ombi into modules 2020-11-02 00:53:08 +00:00
d64d5c194f
initial steps for localisation 2020-10-30 22:51:47 +00:00
9abb177427
use typescript for form.html in separate file, allow customization of
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.
2020-10-20 23:00:30 +01:00
2f9965bcda
Print full error if writing config fails 2020-10-20 21:16:46 +01:00
82d07e423c
add optional path to custom web ui pages
'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.
2020-10-18 21:48:20 +01:00
2a2435ae11
remove version, device, device_id options, set them automatically
not sure why i exposed these to the user in the first place. they are
set to <jfa-go version>, <jfa-go>, <jfa-go-<version>-<commit>>
respectively.
2020-09-29 20:51:15 +01:00
e104bd8362
small changes, new images and readme updated 2020-09-24 23:57:42 +01:00
64ad8ccf6e
Fix docker build; add some color 2020-09-24 21:59:08 +01:00
313b75bead
Add SWAGGER and DEBUG env variables
Should be useful for docker installations.
2020-09-24 21:05:23 +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
544f5674e8
rename routes to make more sense
for example, /getInvite and /generateInvite become GET(/invites) and
    POST(/invites) respectively.
2020-09-24 14:03:25 +01:00
89e70f6f7a
Add default profile functionality
Default profile can be selected in settings.
2020-09-23 18:48:00 +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
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
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
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
7d84fdec96
userByName reloads cache if user not found, more things in test 2020-09-16 19:19:04 +01:00
e0c4d7c545
add "test" mode for debugging
running with "test" in the arguments will print jellyfin server info,
and try to getUsers.
2020-09-16 11:55:35 +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
831296a3e8
remove windows related messages
self restarts now work, so no need.
2020-09-08 23:13:44 +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
f5f2a0f190
Add notice about no self-restarts on windows 2020-09-05 21:52:23 +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
1b0ca34586
include version and commit hash at compile time
when using makefile, version is set to "git". Currently  printed on
start, but an about page in the web UI will be added.
2020-08-31 14:57:42 +01:00
6e3d5dac19
use newJellyfin instead of constructor method 2020-08-30 20:44:10 +01:00
d12335bb4a
cleaned up auth 2020-08-23 14:59:07 +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
56478e96c9
create new css link to smoothly transition between themes
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.
2020-08-19 14:31:41 +01:00
ec7609ed8c
Add debug flag; warning label for debug mode 2020-08-19 14:09:48 +01:00
151062fbc1
set gin mode before router initialization
this was previously set after the router was created, causing a debug
message every start.
2020-08-17 12:33:26 +01:00
8c4bd4541c
Added non interactive makefile option; fixed flags again
fixed another problem with the -data option, and added 'make headless'
for use in the dockerfile
2020-08-16 20:11:16 +01:00
6436dba48f
fixed custom config and data paths
any specified custom data path was only being used for the config file.
All combinations of options should work together now.
2020-08-16 14:26:07 +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
19bd31d968
attempt at using a config struct instead of the ini library
Added script to convert config-base.json into a go struct, so that
access to config values and metadata could be unified and simpler. It
probably won't see any actual use though as mapping the ini into it is
painful.
2020-08-15 22:07:48 +01:00
39bf3ad7f1
Safe shutdown 2020-08-05 16:58:24 +01:00
8ed1662a2f
add pprof middleware 2020-08-03 00:13:09 +01:00
699489e435 fixed static route for invites 2020-08-02 17:16:43 +01:00
c72e1a1c63 Images, fixed "data" path 2020-08-02 02:11:50 +01:00
94b8495f02 Fixed goreleaser config 2020-08-02 00:36:27 +01:00
f508b65fa0 Added setup, self restarts 2020-08-02 00:05:35 +01:00
62621dabb9 CLI flags, start setting up goreleaser, add build scripts
Copied and fixed the build scripts from jf-accounts, added them to the
.goreleaser.yml. Also:
data directory now stored in user's config folder
Handle timeouts in jfapi
Maybe more i forgot about.
2020-08-01 21:20:02 +01:00
c4d4b395d5 Password resets 2020-08-01 16:31:08 +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
dba20bd3ea Add auth & gin logging, fixed dummy logger 2020-08-01 14:08:55 +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
e5ebcef684 Partial check for invite page, 404 handling
The invite route no longer calls checkInvite, instead just chekcing the
invite exists. This speeds up page loading. the 404 and invalidCode
pages are now loaded when necessary.
2020-07-31 13:03:36 +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