Commit Graph

62 Commits

Author SHA1 Message Date
Harvey Tindall 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
Harvey Tindall ee6f81b9e9
Add ability to revert to non-hyphenated user IDs
The first 10.7.0 build i tried used hyphens, but a later one didn't.
emails.json can now be converted between the two forms depending on what
the server uses.
2020-12-18 15:44:19 +00:00
Harvey Tindall 3c952d21f7
fix 10.7.0 compatibility, simplify scss
Hyphens are added to user IDs from 10.7.0, so if the server is running
it, emails.json will be modified to include them. The existing file is
backed up. Also, scss files have been simplified since bs4-jf and bs5-jf share
much of the same content.
2020-11-29 18:01:10 +00:00
Harvey Tindall 9dbf60e3df
add URL base option for subfolder proxies
also cleaned up the naming of some things.
2020-11-22 16:36:43 +00:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall c84ea17af4
refactor; separate jfapi and ombi into modules 2020-11-02 00:53:08 +00:00
Harvey Tindall d64d5c194f
initial steps for localisation 2020-10-30 22:51:47 +00:00
Harvey Tindall 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
Harvey Tindall 2f9965bcda
Print full error if writing config fails 2020-10-20 21:16:46 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall e104bd8362
small changes, new images and readme updated 2020-09-24 23:57:42 +01:00
Harvey Tindall 64ad8ccf6e
Fix docker build; add some color 2020-09-24 21:59:08 +01:00
Harvey Tindall 313b75bead
Add SWAGGER and DEBUG env variables
Should be useful for docker installations.
2020-09-24 21:05:23 +01:00
Harvey Tindall 9f6e405d1c
Add auth and tags to swagger 2020-09-24 18:50:03 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 89e70f6f7a
Add default profile functionality
Default profile can be selected in settings.
2020-09-23 18:48:00 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall d4b94bc9d9
add user button
added create user button for the admin to use.
2020-09-18 00:59:59 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 7d84fdec96
userByName reloads cache if user not found, more things in test 2020-09-16 19:19:04 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 831296a3e8
remove windows related messages
self restarts now work, so no need.
2020-09-08 23:13:44 +01:00
Harvey Tindall 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
Harvey Tindall f5f2a0f190
Add notice about no self-restarts on windows 2020-09-05 21:52:23 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 6e3d5dac19
use newJellyfin instead of constructor method 2020-08-30 20:44:10 +01:00
Harvey Tindall d12335bb4a
cleaned up auth 2020-08-23 14:59:07 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall ec7609ed8c
Add debug flag; warning label for debug mode 2020-08-19 14:09:48 +01:00
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 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
Harvey Tindall 39bf3ad7f1
Safe shutdown 2020-08-05 16:58:24 +01:00
Harvey Tindall 8ed1662a2f
add pprof middleware 2020-08-03 00:13:09 +01:00
Harvey Tindall 699489e435 fixed static route for invites 2020-08-02 17:16:43 +01:00
Harvey Tindall c72e1a1c63 Images, fixed "data" path 2020-08-02 02:11:50 +01:00