Commit Graph

59 Commits

Author SHA1 Message Date
Harvey Tindall
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
Harvey Tindall
2f501697db merge translations 2021-06-07 13:58:53 +01:00
Harvey Tindall
0a71d5b216 PWR: Add option to set new password from magic link
For #103. Enable in Settings > Password Resets. Also changes the user's
ombi password.
2021-06-07 13:49:05 +01:00
Harvey Tindall
6fb8f1ed7f Merge pull request #112 from hrfee/matrix
Matrix Integration
2021-05-31 21:12:57 +01:00
Harvey Tindall
93c7a6e31b apt: Change versioning to hopefully fix updates
0.0.0-{commit} didn't register as updates to the previously installed
  versions, but it looks like 0{commit} works.
2021-05-31 14:13:41 +01:00
Harvey Tindall
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
Harvey Tindall
7035a3fe9c Tray: Add button to open logs 2021-05-25 20:16:42 +01:00
Harvey Tindall
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
Harvey Tindall
85536ff79e expand CONTRIBUTING, print if tray enabled on startup 2021-05-24 15:58:43 +01:00
Harvey Tindall
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
Harvey Tindall
a62648ee68 fix cross compilation in goreleaser/drone
Necessary for go-autostart to work on windows. Tray will be enabled by
default for x86_64 windows/linux binaries.
2021-05-16 21:01:31 +01:00
Harvey Tindall
5dee414596 add "autostart on login" option to tray 2021-05-16 17:40:03 +01:00
Harvey Tindall
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
Harvey Tindall
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
Harvey Tindall
9944cc2db9 refactor; move logger to module 2021-05-01 00:13:57 +01:00
Harvey Tindall
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
Harvey Tindall
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
Harvey Tindall
e1d42c8a87 Update CONTRIBUTING.md, mb 0.3.3
One last missing field added for #76.
2021-04-05 16:34:47 +01:00
Harvey Tindall
f53c852a4d bump mb to v0.3.2
includes missing struct fields for user Policy, fixes #76.
2021-04-05 15:07:30 +01:00
Harvey Tindall
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
Harvey Tindall
e16f05b130 use build constraints for embed, clean up makefile
internal-files/external-files and compile-debug are gone, the
environment variables INTERNAL=on/off and DEBUG=on/off replace them.
2021-04-01 14:22:11 +01:00
Harvey Tindall
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
Harvey Tindall
762dac2581 move mediabrowser to separate repo 2021-03-29 21:49:46 +01:00
Harvey Tindall
eb8f2777ae fix naming conflict with goreleaser, add buildrone key to other steps 2021-03-07 15:54:32 +00:00
Harvey Tindall
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
Harvey Tindall
40fc5e9604 Fix email editor when plaintext setting enabled 2021-02-22 16:40:37 +00:00
Harvey Tindall
78157f763f use different color library, wrap logger functions with it 2021-02-19 16:12:14 +00:00
Harvey Tindall
93b5b483cc add plaintext email option, use text/template
text/template is used on plaintext emails to avoid escaping of certain
characters.
2021-02-18 18:26:23 +00:00
Harvey Tindall
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
Harvey Tindall
f794322392 Merge branch 'go1.16'
merge go1.16 changes

This includes embedded files for releases (no extra 'data' directory!)
and support for a custom language file directory, allowing one to
customize the text accross the app.
2021-02-17 11:15:21 +00:00
Harvey Tindall
ba7370171a lowercase lang, go mod tidy 2021-02-16 14:31:31 +00:00
Harvey Tindall
a6a7710a79 use filepath.Join wrapper for different embed and os path styles
If using internal, "/" is used as a separator always, and with external,
filepath.Join is used.
2021-02-12 14:59:35 +00:00
Harvey Tindall
815bdc35ac fully self-contained
paths are pretty janky, but it works. Also, [files]/lang_files now must
be the path to a directory CONTAINING a "lang/" directory. I'll work
around this at a later date.
2021-02-12 14:28:09 +00:00
Harvey Tindall
0330540f87 Use fs for language, add lang_files option
The local app translations are loaded, and then if [files]/lang_files
is provided (a directory containing custom translations), any found
inside it are loaded over top. This makes customizing much easier.
2021-02-12 14:28:09 +00:00
Harvey Tindall
c2e68bdc77 add GOESBUILD option for platform without esbuild on npm 2021-02-11 18:21:21 +00:00
Harvey Tindall
406fef6595 bundle typescript 2021-01-23 19:08:27 +00:00
Harvey Tindall
5d56ed5378 fix most incompatibilites, start separating api clients 2021-01-10 16:10:03 +00:00
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
c79f86137e separate head into template, add description meta tag 2020-12-07 22:46:17 +00:00
Harvey Tindall
e35d0579c8 package upgrades 2020-11-15 17:20:19 +00:00
Harvey Tindall
fa96f21429 Fix smtp sending
there were a bunch of problems, namely using the jfa-go host address
instead of that of the smtp server in smtp.PlainAuth. For #15.
2020-11-14 15:33:25 +00:00
Harvey Tindall
ba601935b5 add "re-enter password" field on form
for #14.
2020-11-04 20:46:06 +00:00
Harvey Tindall
c84ea17af4 refactor; separate jfapi and ombi into modules 2020-11-02 00:53:08 +00:00
Harvey Tindall
9d62b70daa Fix esbuild and snapshot versioning in goreleaser
snapshots are now "jfa-go_git-<commit>..." instead of
"jfa-go_v0.0.0...".
2020-10-22 17:57:05 +01: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
8e6cf799cd use npx to avoid looking for node_modules, get rid of useless
get_node_deps

makefile works without interaction by default now.
2020-10-18 00:57:53 +01:00
Harvey Tindall
a12678bd4d upload tar.gz instead of zip 2020-10-08 21:37:44 +01:00
Harvey Tindall
04a4a4ca95 use esbuild to compile and minify ts
tsc is still used for ts-debug.
2020-09-29 20:35:06 +01:00
Harvey Tindall
64ad8ccf6e Fix docker build; add some color 2020-09-24 21:59:08 +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