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

294 Commits

Author SHA1 Message Date
ea0293bd4e
Split some settings into new "messages" section
Most email dependant sections now depend on this. Also renamed more
email things.
2021-05-07 21:53:29 +01:00
2d93b3b7ee
Telegram: Allow admin to add telegram contact
Works in the same way as on the form, but can now be done in the
accounts tab.
2021-05-07 18:20:35 +01:00
0f41d1e6cf
Telegram: Display username on accounts tab 2021-05-07 17:01:22 +01:00
716d6a931a
Telegram: Send messages via telegram
Most messages are now sent as plaintext via telegram when suitable.
2021-05-07 16:06:47 +01:00
72bf280e2d
telegram: Fix UI and store useful Telegram info
Creation now works, and language preferences made before signup are
kept. telegram file storage now uses the Jellyfin ID as a key, which
makes much more sense. Also added radios to select preferred notification
method (email/telegram) as well, which the admin will soon be able to
change also.
2021-05-07 14:32:51 +01:00
326c2cf70a
modal: use arrow function to avoid 'this' naming collision 2021-05-07 14:30:30 +01:00
2816c6277d
modal: add onopen/onclose 2021-05-07 13:22:07 +01:00
99875b9176
almost complete telegram user verification
When signing up, the user is given a pin code which they send to a
telegram bot. This provides user verification, but more importantly
allows the bot to message the user, as the Telegram API requires the
user to interact with the bot before it can do the opposite.

The bot should recognize the correct language, but a /lang command is
also provided to change it.

The verification process is pretty much functional but ui is still
broken, and it isn't properly integrated yet.
2021-05-07 01:08:12 +01:00
0e21942cd6
add hard restart for updates on *nix
reincarnates app.Restart() removed in
bbb0568cc4 as app.HardRestart().
2021-05-03 20:08:23 +01:00
b2b5083102
fix checkCheckCount on accounts reload 2021-05-03 18:55:46 +01:00
c0f316d049
add preview to Announcements 2021-05-03 18:35:27 +01:00
2c6d08319b
add typechecking step to Makefile when DEBUG=on 2021-05-03 18:32:56 +01:00
43effd0c32
add reset link option to setup 2021-05-02 14:15:03 +01:00
22a0d8925d
Remove unused typescript, update config readme 2021-05-02 13:23:33 +01:00
90a2c1f2e7
Fix email editor for other email types 2021-04-22 19:16:41 +01:00
8fdab39b18
use templateEmail and show conditionals in editor 2021-04-15 15:34:17 +01:00
55e21f8be3
accounts: add user enable/disable & emails 2021-04-12 21:28:36 +01:00
3dc0df0ac2
fix user expiry when only month field set 2021-04-09 13:35:46 +01:00
d701c5f27d
add months field to invites & expiry 2021-04-08 20:43:01 +01:00
871bc9f396
use proper date formatting on form for expiry 2021-04-07 15:17:15 +01:00
66b7df7cde
use selected language for time format, add manual selector
You can now choose between 12h and 24h time in the top left language
menu. Your preference is stored by the browser for future visits.
2021-04-07 15:09:44 +01:00
7196361cf6
(hopefully) get proper locale from browser 2021-04-07 14:05:17 +01:00
3f8414c70a
use unix timestamp for inv created & usedBy
usedBy is still stored as a string in invites.json to cope with existing
invites with times stored formatted. knz/strtime requires cgo for
strptime, so it has been replaced with the native itchyny/timefmt-go.
2021-04-06 21:25:44 +01:00
6ec2186bdf
switch accounts tab to unix times
should now respect the client's locale.
2021-04-06 20:53:30 +01:00
9370913ace
add password reset link option
When enabled (in Settings > Password Resets), a magic link will be sent
instead of a PIN when the user tries reset their password. By doing
this the user doesn't have to keep the Jellyfin tab open to enter the
code.
2021-03-30 22:41:28 +01:00
a0a25d64f1
rewrite stripmd, fix some typos
doesn't work any better, but more efficient and doesn't require
eyebleach after viewing.
2021-03-26 23:13:19 +00:00
1704ae8cb1
fix language link color on dark theme 2021-03-20 18:24:35 +00:00
de92516d52
add updates section to setup 2021-03-20 18:00:01 +00:00
c556878f11
hide password resets on setup when emby selected 2021-03-18 16:47:13 +00:00
111533fa2d
add advanced setting type with toggle in settings 2021-03-15 22:51:17 +00:00
03247ddef8
Add accounts search 2021-03-13 14:26:29 +00:00
e6e5b0f3cf
respect browser/os dark mode preference 2021-03-10 19:42:40 +00:00
92332206f0
add basic update functionality
If enabled, jfa-go pings buildrone (hosted at builds.hrfee.pw) every 30
min for new updates. If there is one, it gets information (and if
applicable, a binary) from the appropriate source (buildrone, github, or
dockerhub) and displays it on the admin page. You can switch update
channels between stable and unstable. For binary releases, updates are
downloaded automatically and installed when the user presses update.

Since this obviously introduces some "phone-home" functionality into
jfa-go, I just want to say IPs are not and will not be logged by
buildrone, although I may later introduce functionality to give a rough
idea of the number of users (again, no IPs stored). The whole thing can
also be turned off in settings.
2021-03-07 15:23:44 +00:00
1ec5d2ca3f
add disabled badge, extend expiry button to accounts 2021-02-28 17:52:24 +00:00
1e9d184508
implement user expiry functionality
All works now, but i'll add a field on the accounts tab for users with
an expiry, as well as a 'disabled' badge.
2021-02-28 15:41:06 +00:00
2934832a98
implement frontend for user expiry/duration
this will add an optional validity period to users, where their account
will be disabled (or deleted) a specified amount of time after they
created it.
2021-02-28 00:44:28 +00:00
40fc5e9604
Fix email editor when plaintext setting enabled 2021-02-22 16:40:37 +00:00
52d9cda61a
Move email rendering to browser
the email preview no longer has a delay after each change. This also
avoids a race condition in which the email currently being edited could
be actually sent.
2021-02-22 00:43:36 +00:00
d1b1b90de3
Add email list accessible by edit button in settings 2021-02-21 15:51:42 +00:00
058cac2e7b
implement email editor w/ live(?) preview
not accessible in the ui currently, but the object is available as
window.ee for testing.
2021-02-20 22:49:59 +00:00
fa433c88a8
add announcement emails
After selecting users in the accounts tab, you can press 'Announce',
then write a subject and message (with markdown), and an email will be
sent to each selected user.
2021-02-18 14:58:53 +00:00
91d3d2596e
fix broken invite links 2021-02-11 13:49:06 +00:00
192c9a4764
account for lack of trailing slash in url 2021-02-09 20:45:35 +00:00
218882b7c6
remove debug console.log 2021-02-08 11:50:58 +00:00
c09ffb49e7
switch emails to normal text when not editing
fixes padding on small screens.
2021-02-05 18:24:27 +00:00
2c8be42bbc
fix invite links with URL base 2021-02-05 13:33:34 +00:00
6691ae27f4
fix navigation with URL base set 2021-02-05 13:31:56 +00:00
90c6cee780
add restart button 2021-01-31 19:01:20 +00:00
456ef556b1
add inter-section dependency for settings
Currently used to hide all email sections when [email]/method is blank
(disabled).
2021-01-31 18:50:04 +00:00
ce98b2eb5a
add backwards navigation 2021-01-31 17:32:03 +00:00
ee026714d4
Add optional email confirmation
If enabled, a confirmation email will be sent before the user can create
their account.
2021-01-30 19:19:12 +00:00
4fc9bdb35b
element already existed, oops 2021-01-29 01:32:44 +00:00
c0a05be44e
add strftime notice on setup
string was already in translations, just forgot to include it.
2021-01-29 01:29:54 +00:00
3dd83bffbf
Merge branch 'new-setup'
Merge new setup wizard

This is much more up-to-date than the previous setup page, with a new
design and previously missing/new settings. Currently only available in
english (hopefully that changes soon).

also fixes conflict in _post.
2021-01-27 22:06:44 +00:00
79987ffa22
add refresh button that uses url base if given 2021-01-27 21:51:01 +00:00
7baea9101e
Add general settings, ombi
host, port, theme, tls are included in general. Page theme changes with
setting. Fixed checkbox support messages. Split some cards into columns.
2021-01-27 21:35:41 +00:00
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
c7f5aa2e2b
split into pages, hide email pages when disabled, add history navigation 2021-01-27 00:51:19 +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
b66654787c
make whole invite clickable to expand 2021-01-21 17:59:16 +00:00
72a7759ca5
Fix invite link when non-default language selected 2021-01-17 12:36:16 +00:00
e68dccbc17
keep language choice in url when changing tabs 2021-01-15 21:16:11 +00:00
4679c6f355
add language selector to admin 2021-01-15 14:43:32 +00:00
422f13202b
Use lang file in typescript 2021-01-15 14:43:31 +00:00
a102199d5a
include code in invite form instead of getting from url
potentially solves #34?
2021-01-14 14:22:20 +00:00
3fbbc7f620
add language selector to form 2021-01-11 19:17:43 +00:00
4aae655180
live validation on form, change special character definition
The internal array of special characters was lacking, so a character is
now special when not a digit and (uppercase form) == (lowercase form).
2021-01-09 01:00:27 +00:00
alexh-name
377c8d3e4e fix typo in form/en-us 2021-01-08 23:58:48 +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
f3c3b3ce76
use badges to denote admin users in accounts tab 2020-11-15 17:13:35 +00:00
b6f3cd7c1f
dont re-b64 the jwt
pointless, and messed up swagger auth.
2020-11-12 21:25:52 +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
ba601935b5
add "re-enter password" field on form
for #14.
2020-11-04 20:46:06 +00:00
0f4e77364b
remove hardcoded string from form.ts 2020-10-30 23:14:29 +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
29775e2e75
make goreleaser include modules subdir 2020-10-22 18:13:11 +01: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
2d6b1717db
move all shared typescript to common.ts 2020-10-20 23:33:32 +01: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
e104bd8362
small changes, new images and readme updated 2020-09-24 23:57:42 +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
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
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
73886fc037
rewrite accounts.js in typescript
slight refactor too.
2020-09-20 14:48:17 +01:00