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

139 Commits

Author SHA1 Message Date
d81679fbae
print error if logging fails 2021-12-20 19:05:18 +00:00
4fcba32f74
apidocs: re-version, set up for hosted ui
swagger.json is uploaded after each build, and is hosted at
api.jfa-go.com.
2021-11-15 00:19:52 +00:00
eeb9b07bce
admin: add manual "Send Password reset" to accounts tab
Only appears with Reset links enabled.
Pressing this sends a PWR link to the users selected.
if one user is selected, or if one of you selected users doesn't have a
method of contact, a link is given to the admin to send to them
manually.
2021-10-13 15:04:22 +01:00
fbe3553b25
fix missing last log line
Sometimes calls to app.err.Fatalf would fail to print the error to the
console, and fail to show "A crash report has been saves to...". Both of
these should be fixed now.
2021-09-18 13:43:11 +01:00
2be34ed063
quote jellyfin URL for censoring in logs 2021-08-22 13:54:39 +01:00
eb3489b34f
tray: fix crashlogs, restart from web 2021-08-16 23:01:08 +01:00
6e88c1f4fc
setup: MkdirAll config dir if necessary
some have had this issue in the past on new systems/users where ~/.config
doesn't exist yet.
2021-07-27 10:54:52 +01:00
67c60cb677
fix 'jfa-go systemd' layout
lines were printing out-of-order for some reason, so i added time.Sleep
between them.
2021-07-27 10:47:07 +01:00
6551eeb938
setup: also respect -host 2021-07-21 17:24:06 +01:00
36c23c1e4f
setup: respect -p/-port
fixes #128.
2021-07-21 17:17:59 +01:00
833d02b032
matrix: end-to-end encryption by default
Existing chats will remain unencrypted but new ones will be.
2021-07-13 19:02:16 +01:00
3e55cd1e31
accounts: add templates for announcements
you can now save announcements as templates, and then use them later by
hovering over the "Announce" button, as well as delete them.
2021-07-10 16:43:27 +01:00
21125033ff
Add copy button to crash page 2021-06-13 15:36:36 +01:00
b538922c05
Show log on log.Fatal calls, provide "sanitized" version, fix goreleaser
Sanitization means change anything in double quotes to "CENSORED". A
notice is included telling the user to check for themselves as well.
2021-06-11 23:28:21 +01:00
f0f4e8118e
Generate crash report txt and webpage
The last 100 lines of logs are now cached, and when a crash occurs, they
are saved to a file in the temp directory ("/tmp" on *nix), and pretty
HTML version is also created and opened in the browser.
* Currently only handles panics, will be included in more places soon
* Copy button and button to generate a GH issue will be added
2021-06-11 21:56:53 +01:00
e49996c401
Setup: Don't break if setup not completed, fix restart
Since an invalid example config was created on first run, if the app restarted
before setup was completed, it would crash on the next start. The
example now has a "first_run" flag in it, which is only set to false
when the config is modified. Also fixed restart at the end of setup for
tray builds.
2021-06-01 19:54:13 +01:00
19715f25f6
Move all migrations to separate file
Also fixed some inconsistent uses of snake case.
2021-06-01 14:18:49 +01:00
9bd6abadf4
Matrix: Fix user storage 2021-05-29 19:50:33 +01:00
e97b90d4d7
Matrix: Setup bot, add PIN verification
PIN is verified but not used currently. Works a little different than
the others, you input your matrix user ID and then the PIN is sent to
you. The bot doesn't support E2EE, so the bot being the first one to
message ensures the chat is unencrypted.
2021-05-29 17:43:11 +01:00
7035a3fe9c
Tray: Add button to open logs 2021-05-25 20:16:42 +01:00
62c29d55cc
Log output to TEMP/jfa-go.log when Tray enabled
-H=windowsgui completely disables Stdout/Stderr on Windows, so logging
is enabled.
2021-05-25 17:59:41 +01:00
85536ff79e
expand CONTRIBUTING, print if tray enabled on startup 2021-05-24 15:58:43 +01:00
f419a57e6d
Fixed loaded message, Tray by default 2021-05-23 22:12:47 +01:00
Harvey Tindall
5a9bc1c66f
Merge Discord branch
Discord Integration, Accounts UI improvements
2021-05-23 20:25:15 +01:00
b8e3fc636c
Accounts: Fix cog on telegram when no discord linked
Also, disable telegram & discord if an auth/initialization error occurs.
2021-05-23 14:48:36 +01:00
a6447165b7
add email notify enable/disable; remove (de)hyphening
hyphen/dehyphen conflicted with new migration for email contact
preference, and it's been a while since this has been an issue so i've
just commented it out for now.
2021-05-21 22:46:46 +01:00
e931c09a34
add message when web ui is loaded
a lack of output after "Loading routes" was a little confusing.
2021-05-21 21:39:32 +01:00
d928df7ab2
Discord: Start bot, add !start and pin validity check
The bot should be created by the admin and added to a discord server
mutual to the intended new user(s). On !start in the server,
communication is moved to DMs. Currently !start works, and validity of a
given PIN is checked although nothing it done with this yet.
2021-05-17 23:42:33 +01:00
8cf9b1f905
add basic tray functionality
enable with `make TRAY=on ...`. Cross compilation apparently should work
from linux to linux & windows.
2021-05-16 16:23:28 +01:00
33f8070e57
cleanup; fix stripping with DEBUG=on 2021-05-16 15:00:13 +01:00
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
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
9944cc2db9
refactor; move logger to module 2021-05-01 00:13:57 +01:00
a2c344de83
add shorthand flag names
along with an ugly wrapper for the help message that merges the
descriptions for the short & long versions.
2021-04-24 23:54:56 +01:00
886ae64feb
add "systemd" command to generate a .service file
never got around to adding this from jellyfin-accounts for some reason.
2021-04-24 18:54:31 +01:00
47ac505cac
shutdown your background workers!
I believe everything #74 was caused by not shutting down the userDaemon
when we do a pseudo-restart. shutdown of it and the invite daemon are
now deferred so this should fix any problems and reduce log spam.
2021-04-06 18:12:06 +01:00
78049d4a33
hyphenate/dehyphenate users.json if necessary
doubt this would have caused problems anyway but why not.
2021-04-06 15:46:28 +01:00
76b822213e
add more error logging; mutex for app.storage.users 2021-04-06 13:44:52 +01:00
2a0edeb3c5
bump mediabrowser version, more consistent logs
uses descriptive errors added in mb v0.2.0. Also improved
the consistency of logs in api.go/main.go.
2021-04-02 22:13:04 +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
762dac2581
move mediabrowser to separate repo 2021-03-29 21:49:46 +01:00
1cf8d3037b
remove dependency on common from mediabrowser 2021-03-29 20:57:13 +01:00
f0dccc58aa
separate pprof from debug mode
enabled with -pprof now.
2021-03-23 21:59:04 +00:00
1a6d78352c
add comments, fix user expiry log spam
now actually removes the already deleted user from the expiry list.
2021-03-21 22:50:33 +00:00
de92516d52
add updates section to setup 2021-03-20 18:00:01 +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
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
b3fa667db1
version with ldflags instead of script 2021-02-22 01:23:42 +00:00
78157f763f
use different color library, wrap logger functions with it 2021-02-19 16:12:14 +00:00
76fa171575
cleanup logs and use structs in jf/emby api
Also means times are directly parsed when pulling data from jf/emby,
which was *painful* to get working (something broke the whole program and it
took me an hour to figure out it was this lol). Time parsing should be a
lot stabler too.
2021-02-19 00:47:01 +00:00