Compare commits

...

289 Commits

Author SHA1 Message Date
ClankJake
a0af76364a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7 of 7 strings)

Translation: jfa-go/Password Reset Links
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/password-reset-links/pt_BR/
2021-06-20 19:02:08 +02:00
ClankJake
169622bf95 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (6 of 6 strings)

Translation: jfa-go/Telegram/Matrix/Discord bots
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/chat-bots/pt_BR/
2021-06-20 19:02:08 +02:00
ClankJake
78b5136b9a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/pt_BR/
2021-06-20 19:02:08 +02:00
ClankJake
e546f50141 translation from Weblate (Portuguese (Brazil))
Currently translated at 99.3% (162 of 163 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/pt_BR/
2021-06-20 19:02:08 +02:00
ClankJake
e35fe8d425 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (20 of 20 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/pt_BR/
2021-06-20 19:02:08 +02:00
ClankJake
6ed2f7aaa6 translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (37 of 37 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/pt_BR/
2021-06-20 19:02:08 +02:00
ClankJake
084e8ec432 Added translation using Weblate (Portuguese (Brazil)) 2021-06-20 19:02:08 +02:00
ClankJake
fd7f74682b Added translation using Weblate (Portuguese (Brazil)) 2021-06-20 19:02:08 +02:00
Harvey Tindall
9950c158a1 move copy button to right, don't uncss when DEBUG=on
keep unused css when DEBUG=on by skipping the uncss step.
2021-06-13 16:31:40 +01:00
Harvey Tindall
21125033ff Add copy button to crash page 2021-06-13 15:36:36 +01:00
Harvey Tindall
1dc0b2234a switch to normal npm mirror in package-lock
was using cnpm as i'd added it to help a user who was having problems
(ended up being internet-related, not blocking).
2021-06-11 23:46:01 +01:00
Harvey Tindall
0ea5c7fdc0 remove inline-css-cli build dep
unnecessary (inline-source-cli already includes its functionality) and a
dependency of it had a high-severity CVE (wouldn't have affected anyone,
but w/e).
2021-06-11 23:39:38 +01:00
Harvey Tindall
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
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
0014db44f0 form: module-ize password validator 2021-06-05 22:17:10 +01:00
Harvey Tindall
885d2ebf0f admin: fix telegram/discord/matrix enabled varnames 2021-06-05 22:16:57 +01:00
Richard de Boer
6d089a9818 Translated using Weblate (Dutch)
Currently translated at 100.0% (6 of 6 strings)

Translation: jfa-go/Telegram/Matrix/Discord bots
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/chat-bots/nl/
2021-06-02 14:39:37 +02:00
Richard de Boer
de81c7e29f Added translation using Weblate (Dutch) 2021-06-02 14:39:37 +02:00
Harvey Tindall
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
Malte
aa40a72075 Translated using Weblate (German)
Currently translated at 100.0% (6 of 6 strings)

Translation: jfa-go/Telegram/Matrix/Discord bots
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/chat-bots/de/
2021-06-01 18:29:10 +02:00
Richard de Boer
19b7341e80 Translated using Weblate (Dutch)
Currently translated at 100.0% (20 of 20 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/nl/
2021-06-01 18:29:10 +02:00
Malte
73645a7569 Translated using Weblate (German)
Currently translated at 100.0% (20 of 20 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/de/
2021-06-01 18:29:10 +02:00
Malte
a9dac8c04c translation from Weblate (German)
Currently translated at 100.0% (37 of 37 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/de/
2021-06-01 18:29:09 +02:00
Malte
43fbbbcd16 translation from Weblate (German)
Currently translated at 100.0% (163 of 163 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/de/
2021-06-01 18:29:09 +02:00
Richard de Boer
fc57a8c97f translation from Weblate (Dutch)
Currently translated at 100.0% (37 of 37 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/nl/
2021-06-01 18:29:07 +02:00
Richard de Boer
1fb2ef5675 translation from Weblate (Dutch)
Currently translated at 100.0% (163 of 163 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/nl/
2021-06-01 18:29:06 +02:00
Malte
e0d994c35c Added translation using Weblate (German) 2021-06-01 17:21:53 +02:00
hrfee
cab30eb628 Added translation using Weblate (English (United Kingdom)) 2021-06-01 17:13:56 +02:00
Harvey Tindall
71df011556 merge translations 2021-06-01 16:13:28 +01:00
Levi
b2828110e3 Translated using Weblate (Swedish)
Currently translated at 100.0% (101 of 101 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/sv/
2021-06-01 17:07:49 +02:00
Levi
50eb05776a translation from Weblate (Swedish)
Currently translated at 100.0% (32 of 32 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/sv/
2021-06-01 17:07:49 +02:00
Harvey Tindall
19715f25f6 Move all migrations to separate file
Also fixed some inconsistent uses of snake case.
2021-06-01 14:18:49 +01:00
Harvey Tindall
d41a281d53 mention tray icon in issue template 2021-06-01 00:54:22 +01:00
Harvey Tindall
a8229631bd mention matrix in readme 2021-06-01 00:06:35 +01:00
Harvey Tindall
0a2cf6132f merge matrix into local changes 2021-05-31 22:13:52 +01:00
Harvey Tindall
d7ab01063a apt: Use commit count to fix version comparisons
previous fix only worked because the numerical portion of the commit
hash happened to be greater. This should do properly fix it.
2021-05-31 22:11:43 +01:00
Harvey Tindall
6fb8f1ed7f Merge pull request #112 from hrfee/matrix
Matrix Integration
2021-05-31 21:12:57 +01:00
Harvey Tindall
a9b11012bc Matrix: Add example images 2021-05-31 20:56:29 +01:00
Harvey Tindall
e7cb1f516b Mention wiki in Telegram/Discord/Matrix settings descriptions 2021-05-31 20:32:16 +01:00
Harvey Tindall
555d5abf59 bump browserslist version 2021-05-31 18:53:21 +01:00
Harvey Tindall
93937ec3b5 drone: use pre-made image with dependencies
a cron job builds hrfee/jfa-go-build-docker daily, which includes the
apt dependencies for building.
2021-05-31 14:58:20 +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
a9cabe3d74 apt: also remove jfa-go-tray 2021-05-30 23:37:17 +01:00
Harvey Tindall
d6fd1d6894 apt: remove last unstable before adding
kind of a hack, since all versions have version number 0.0.0, reprepro
skips adding new files.
2021-05-30 23:26:50 +01:00
Harvey Tindall
375022ba95 Matrix: Add token generation wizard
Pressing the "+" next to matrix in settings allows you to enter a
homeserver, username and password to enable matrix and generate an
access token.
2021-05-30 23:09:20 +01:00
Harvey Tindall
75fdf6ec3d Matrix: Connect on accounts tab, customizable chat topic 2021-05-30 11:47:41 +01:00
Harvey Tindall
561c461a18 PWR: TrimPrefix instead of Replace for PWR links 2021-05-30 00:07:18 +01:00
Harvey Tindall
59ebf52fe2 Matrix: Show matrix on accounts page 2021-05-30 00:05:46 +01:00
Harvey Tindall
89fb3fa619 Matrix: Notifications 2021-05-29 21:05:12 +01:00
Harvey Tindall
9bd6abadf4 Matrix: Fix user storage 2021-05-29 19:50:33 +01:00
Harvey Tindall
953a66ec47 Password Resets: Ignore magic link visits from bots
For #108. Literally just searches the useragent for "Bot", seems good
enough for Telegram atleast.
2021-05-29 19:24:00 +01:00
Harvey Tindall
4e826f4167 Matrix: Store user on sign-up 2021-05-29 18:51:43 +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
fb6256d1ed Telegram: Escape all necessary characters
Fixes #108.
2021-05-25 23:03:13 +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
a83dbcf3ab debian/ubuntu, not just debian 2021-05-25 01:33:58 +01:00
Harvey Tindall
e48bdcc45b README: change install section layout
Downloads at the top also now link to parts in the install section.
2021-05-24 22:58:11 +01:00
Harvey Tindall
0b473ef01f don't put .debs on buildrone; link to instructions at top of README 2021-05-24 20:30:31 +01:00
Harvey Tindall
e03525a1d1 separate codenames for stable & unstable
templates don't work in name_template as i though, so this should work
instead.
2021-05-24 19:53:53 +01:00
Harvey Tindall
087172c79e fix package naming to avoid conflicts 2021-05-24 18:46:54 +01:00
Harvey Tindall
8fd919bf04 remove chglog, add steps to upload to apt.hrfee.dev
chglog isn't actually needed. Packages are uploaded as jfa-go(-git) and
jfa-go-tray(-git).
2021-05-24 18:37:26 +01:00
Harvey Tindall
2ad84db482 add inaccurate chglog
not really correct, tagged as v0.3.6 despite the few extra commits.
2021-05-24 16:33:20 +01:00
Harvey Tindall
85536ff79e expand CONTRIBUTING, print if tray enabled on startup 2021-05-24 15:58:43 +01:00
Harvey Tindall
8b62c91d13 Mention TrayIcon deps in README 2021-05-23 23:49:48 +01:00
Harvey Tindall
e7d1693517 Enable updater for Tray builds 2021-05-23 23:20:14 +01:00
Harvey Tindall
e78b4882b3 Fix updater for zip files
Forgot to change this when I switched, oops.
2021-05-23 23:05:40 +01:00
Harvey Tindall
e01144950b Mention Discord in README 2021-05-23 22:41:39 +01:00
Harvey Tindall
86ef665b12 Discord: Try to avoid more race conditions
also added RACE=on to Makefile to enable go's race detector.
2021-05-23 22:26:56 +01:00
Harvey Tindall
f419a57e6d Fixed loaded message, Tray by default 2021-05-23 22:12:47 +01:00
Harvey Tindall
d7e8ec95de add missing perms, fix order 2021-05-23 20:48:17 +01:00
Harvey Tindall
5a9bc1c66f Merge Discord branch
Discord Integration, Accounts UI improvements
2021-05-23 20:25:15 +01:00
Harvey Tindall
1f9af8df89 Discord: Add option to provide server invite
When enabled, a temporary one-use invite is created and shown to the
user on the account creation form.
2021-05-23 19:50:03 +01:00
Harvey Tindall
0676b6c41f Discord: Display channel on account creation form 2021-05-23 17:31:20 +01:00
ClankJake
ac842e6273 translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (32 of 32 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/pt_BR/
2021-05-23 18:23:21 +02:00
Harvey Tindall
ce8cdced4d Discord: Fix GetUsers, add invite messages
The "Send to" box on the invite tab now accepts username#discriminator,
and a search icon has been added which opens a search window similar to
the one on the accounts tab. DiscordDaemon.GetUsers was also very broken
and wouldn't work with full username#discriminator, that's been fixed.
2021-05-23 16:16:31 +01:00
Harvey Tindall
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
Harvey Tindall
519a5615cc Accounts: Fix email check on dropdown 2021-05-23 14:35:01 +01:00
Harvey Tindall
168b217553 Discord: fix user links 2021-05-23 14:32:35 +01:00
Harvey Tindall
7d698d63e3 Discord: split discord search into own module
Will also be used for "Send to" on the invite page.
2021-05-23 14:22:18 +01:00
Harvey Tindall
035dbde819 last image 2021-05-23 02:11:48 +01:00
Harvey Tindall
c373d8b2d6 add final oauth tab image 2021-05-23 02:08:02 +01:00
Harvey Tindall
8698c3c6a4 add oauth2 section to bot instructions 2021-05-23 02:03:55 +01:00
Harvey Tindall
0edd2ba68b add settings image for bot setup 2021-05-23 01:51:59 +01:00
Harvey Tindall
b91f0b5a18 Discord: add images for bot creation instructions 2021-05-23 01:38:40 +01:00
Harvey Tindall
24fa841c0d Discord: Wait for non-nil pointer to bot data
While testing others things, I had quite a few nil pointer dereference
errors from accessing bot data right after initializing. A for loop now
waits until the first of the pointers is non-nil, which should
hopefully avoid crashes.
2021-05-23 01:09:03 +01:00
Harvey Tindall
44558b8109 Discord: Remove extra newlines around links
Since links are converted into embeds, links put on their own line often
lead to extra newlines that looks pretty weird. They should now be
stripped.
2021-05-23 01:05:53 +01:00
Harvey Tindall
478b40d0ff Telegram: Escape exclamation marks, remove for images
![alt](link) becomes [alt](link), telegram seems to pick up that they're
images anyway.
2021-05-22 23:38:21 +01:00
Harvey Tindall
8b816dc725 merge translations 2021-05-22 23:26:49 +01:00
Harvey Tindall
81a58f628b Add -H=windowsgui in goreleaser 2021-05-22 23:26:13 +01:00
Harvey Tindall
e98c9b46f1 Accounts: no wrapping for contact dropdown 2021-05-22 23:18:43 +01:00
Harvey Tindall
b3ce7acfcb Accounts: Always inline icons, only one settings cog
Admin chip, email edit bot and contact method cog icon are now always inline.
Only one cog icon is shown now.
2021-05-22 23:05:53 +01:00
Harvey Tindall
9fac79b1f0 Discord: Add users via accounts tab
Doesn't require a PIN like Telegram, as we can access a list of guild
users with the GuildMembers intent set. This has to be enabled under
Bot > Priviliged Gateway intents on the developer portal.
2021-05-22 21:42:15 +01:00
Harvey Tindall
591e3c5ca1 Discord: embed images
![alt](image link) is now converted to an image embed.
2021-05-22 15:32:51 +01:00
Harvey Tindall
35d407afef Discord: remove @ from username 2021-05-22 15:31:25 +01:00
Harvey Tindall
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
Malte
23800bb892 Translated using Weblate (German)
Currently translated at 100.0% (7 of 7 strings)

Translation: jfa-go/Password Reset Links
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/password-reset-links/de/
2021-05-21 23:02:50 +02:00
Malte
b47cb91f55 Translated using Weblate (German)
Currently translated at 100.0% (101 of 101 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/de/
2021-05-21 23:02:50 +02:00
Malte
2d9e3fbc1d Translated using Weblate (German)
Currently translated at 100.0% (16 of 16 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/de/
2021-05-21 23:02:50 +02:00
Malte
bf67e27737 Translated using Weblate (German)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/de/
2021-05-21 23:02:50 +02:00
Malte
3427c97e3e translation from Weblate (German)
Currently translated at 100.0% (32 of 32 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/de/
2021-05-21 23:02:50 +02:00
Malte
81e69a7166 translation from Weblate (German)
Currently translated at 100.0% (156 of 156 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/de/
2021-05-21 23:02:50 +02:00
Malte
564098b9d8 Added translation using Weblate (German) 2021-05-21 23:02:50 +02:00
ClankJake
ec659174fb translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (156 of 156 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/pt_BR/
2021-05-21 23:02:50 +02:00
ClankJake
1a42d8280c Translated using Weblate (Portuguese (Brazil))
Currently translated at 93.7% (15 of 16 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/pt_BR/
2021-05-21 23:02:50 +02:00
ClankJake
b14f10d79d translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (32 of 32 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/pt_BR/
2021-05-21 23:02:50 +02:00
Cornichon420
ee8facd1bf Translated using Weblate (French)
Currently translated at 100.0% (16 of 16 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/fr/
2021-05-21 23:02:50 +02:00
Cornichon420
811657b553 Translated using Weblate (French)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/fr/
2021-05-21 23:02:50 +02:00
Cornichon420
95936f7c29 translation from Weblate (French)
Currently translated at 100.0% (32 of 32 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/fr/
2021-05-21 23:02:50 +02:00
Cornichon420
613d4cd9af translation from Weblate (French)
Currently translated at 100.0% (156 of 156 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/fr/
2021-05-21 23:02:50 +02:00
Richard de Boer
7beb3d9974 Translated using Weblate (Dutch)
Currently translated at 100.0% (16 of 16 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/nl/
2021-05-21 23:02:50 +02:00
Richard de Boer
6f2bb7f0b5 Translated using Weblate (Dutch)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/nl/
2021-05-21 23:02:50 +02:00
Richard de Boer
315b5fda91 translation from Weblate (Dutch)
Currently translated at 100.0% (32 of 32 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/nl/
2021-05-21 23:02:50 +02:00
Richard de Boer
a6aa89e502 translation from Weblate (Dutch)
Currently translated at 100.0% (156 of 156 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/nl/
2021-05-21 23:02:50 +02:00
Harvey Tindall
3bf722c5fe Discord: send links as embeds
Kind of janky but works. This kind of messes up the layout if you write
links in-line.
2021-05-21 21:59:50 +01:00
Harvey Tindall
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
Harvey Tindall
f8f5f35cc1 PIN verification, notifications, multiple notif providers
Discord, Email & Telegram can be enabled, although email is always
enabled right now (will fix). Also apparently markdown hyperlinks don't
work in Discord, eventually will implement something to convert them to
embeds.
2021-05-21 21:35:25 +01:00
Harvey Tindall
524941da0c fix heading size with sm 2021-05-21 21:10:32 +01:00
Harvey Tindall
22bba922f9 Discord: Add !lang command 2021-05-18 18:41:42 +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
4b11bbe21f remove leaked telegram token
token has been revoked, but it doesn't look like it was used anyway.
2021-05-17 11:43:58 +01:00
Harvey Tindall
18bcd55972 remove debug println 2021-05-17 01:32:22 +01:00
Harvey Tindall
057f306ed9 hide/ignore ssl_cert when on windows
x509.SystemCertPool is unavailable on windows, so any value is ignored
and the setting is hidden on the web UI.
2021-05-17 01:16:59 +01:00
Harvey Tindall
76bbb3f147 consistent naming for tray builds 2021-05-16 23:02:09 +01:00
Harvey Tindall
0f3ad8bb69 fix generate_ini for multiline descriptions 2021-05-16 23:00:37 +01:00
Harvey Tindall
1d47b9074f change notray/tray naming, add deb/rpm/apk
Since Tray support requires dependencies, it won't be the default for
releases. deb/rpm/apk support may be broken still.
2021-05-16 22:44:04 +01:00
Harvey Tindall
5167fde080 change tar.gz to zip in drone 2021-05-16 21:12:18 +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
6bf1920160 merge dependabot bump 2021-05-16 15:00:30 +01:00
Harvey Tindall
33f8070e57 cleanup; fix stripping with DEBUG=on 2021-05-16 15:00:13 +01:00
Harvey Tindall
4d2a018032 Merge pull request #98 from hrfee/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21
2021-05-14 14:48:41 +01:00
dependabot[bot]
ca7fb540ee Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 21:24:34 +00:00
ClankJake
beb0712ce9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (101 of 101 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/pt_BR/
2021-05-09 20:59:31 +02:00
woosade
a081b14794 Translated using Weblate (Spanish)
Currently translated at 100.0% (7 of 7 strings)

Translation: jfa-go/Password Reset Links
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/password-reset-links/es/
2021-05-09 20:59:30 +02:00
woosade
e416acf6bd translation from Weblate (Spanish)
Currently translated at 100.0% (152 of 152 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/es/
2021-05-09 20:59:30 +02:00
woosade
bf94f76509 Translated using Weblate (Spanish)
Currently translated at 100.0% (101 of 101 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-05-09 20:59:30 +02:00
Richard de Boer
ac239a309c translation from Weblate (Dutch)
Currently translated at 100.0% (152 of 152 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/nl/
2021-05-09 20:59:30 +02:00
Richard de Boer
0f12586166 Translated using Weblate (Dutch)
Currently translated at 100.0% (101 of 101 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/nl/
2021-05-09 20:59:30 +02:00
Cornichon420
b1b50ce561 Translated using Weblate (French)
Currently translated at 100.0% (101 of 101 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/fr/
2021-05-09 20:59:30 +02:00
Cornichon420
8e2bf48ab4 Translated using Weblate (French)
Currently translated at 100.0% (13 of 13 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/fr/
2021-05-09 20:59:30 +02:00
Cornichon420
6ec5022a0d translation from Weblate (French)
Currently translated at 100.0% (28 of 28 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/fr/
2021-05-09 20:59:30 +02:00
Cornichon420
ef97e0ac76 translation from Weblate (French)
Currently translated at 100.0% (152 of 152 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/fr/
2021-05-09 20:59:30 +02:00
Harvey Tindall
30736a055d add example bot settings for wiki 2021-05-08 16:37:40 +01:00
Harvey Tindall
d0905a29be add example bot creation for wiki 2021-05-08 16:29:16 +01:00
Harvey Tindall
fe5cf69b7a Merge Telegram support
For #94.
2021-05-08 16:15:41 +01:00
Harvey Tindall
c560ec0f9f Merge branch 'main' into telegram 2021-05-08 16:08:20 +01:00
Harvey Tindall
71554e0c85 Telegram: Change user's contact method in accounts
By clicking the cog next to the telegram username, one can select
whether to contact through telegram or email.
2021-05-08 15:53:42 +01:00
Harvey Tindall
0efd7c5718 Telegram: add language files
somehow these were included in the .gitignore.
2021-05-07 23:45:53 +01:00
Harvey Tindall
901ad7529e mention wiki in telegram settings description 2021-05-07 23:36:46 +01:00
Harvey Tindall
b64bcc9738 include telegram verif in images 2021-05-07 23:30:32 +01:00
Harvey Tindall
fddb7b7584 Mention telegram in readme 2021-05-07 23:18:44 +01:00
Harvey Tindall
b91302ddf8 Invite: fix "none yet" message on users created 2021-05-07 22:41:51 +01:00
Harvey Tindall
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
Harvey Tindall
51f2f4cc6a Telegram: close updates channel on restart
Also removed some references to email.
2021-05-07 18:29:56 +01:00
Harvey Tindall
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
Harvey Tindall
0f41d1e6cf Telegram: Display username on accounts tab 2021-05-07 17:01:22 +01:00
Harvey Tindall
36edd4ab0d Telegram: Use markdown for custom emails/announcements
Had no idea telegram supported this, pretty cool.
2021-05-07 16:33:44 +01:00
Harvey Tindall
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
Harvey Tindall
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
Harvey Tindall
326c2cf70a modal: use arrow function to avoid 'this' naming collision 2021-05-07 14:30:30 +01:00
Harvey Tindall
2816c6277d modal: add onopen/onclose 2021-05-07 13:22:07 +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
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
Harvey Tindall
b2b5083102 fix checkCheckCount on accounts reload 2021-05-03 18:55:46 +01:00
Harvey Tindall
c0f316d049 add preview to Announcements 2021-05-03 18:35:27 +01:00
Harvey Tindall
2c6d08319b add typechecking step to Makefile when DEBUG=on 2021-05-03 18:32:56 +01:00
Harvey Tindall
5d8f139356 fix race condition; rename route functions; fix swagger params
fix race condition when notifying of invite expiry, rename custom email
related functions as to reduce confusion, and add proper path params for
some swagger routes. Also moved some stuff around in api.go.
2021-05-02 20:42:37 +01:00
Harvey Tindall
87ef71b415 lowercase lang 2021-05-02 15:25:09 +01:00
André Cruz
cf99ae880c Translated using Weblate (Spanish)
Currently translated at 100.0% (6 of 6 strings)

Translation: jfa-go/Password Reset Links
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/password-reset-links/es/
2021-05-02 16:23:10 +02:00
André Cruz
8e86078394 Translated using Weblate (Spanish)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/es/
2021-05-02 16:23:10 +02:00
André Cruz
beea903879 translation from Weblate (Spanish)
Currently translated at 100.0% (151 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/es/
2021-05-02 16:23:10 +02:00
André Cruz
c5e4c5d509 Translated using Weblate (Spanish)
Currently translated at 100.0% (13 of 13 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/es/
2021-05-02 16:23:10 +02:00
André Cruz
fac951c733 Translated using Weblate (Spanish)
Currently translated at 100.0% (98 of 98 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-05-02 16:23:10 +02:00
Cornichon420
83449f3332 Translated using Weblate (French)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/fr/
2021-05-02 16:23:10 +02:00
Cornichon420
2a9fc8c7a5 translation from Weblate (French)
Currently translated at 88.0% (133 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/fr/
2021-05-02 16:23:10 +02:00
André Cruz
f8d4f79271 Translated using Weblate (Spanish)
Currently translated at 100.0% (98 of 98 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-05-02 16:23:10 +02:00
André Cruz
bc466d0c6f Added translation using Weblate (Spanish) 2021-05-02 16:23:10 +02:00
Harvey Tindall
382a0f4c3c add donate button to about 2021-05-02 15:16:28 +01:00
Harvey Tindall
488c2f5df5 fix broken url in welcome email 2021-05-02 14:44:19 +01:00
Harvey Tindall
43effd0c32 add reset link option to setup 2021-05-02 14:15:03 +01:00
Harvey Tindall
af61549bf1 ombi: reset password when using pwr links
When password reset links are enabled, the ombi password will be reset
to the PIN along with Jellyfin.
2021-05-02 13:23:59 +01:00
Harvey Tindall
22a0d8925d Remove unused typescript, update config readme 2021-05-02 13:23:33 +01:00
Harvey Tindall
59a014f681 fix title for invite emails 2021-05-02 12:50:04 +01:00
Harvey Tindall
9944cc2db9 refactor; move logger to module 2021-05-01 00:13:57 +01:00
Harvey Tindall
570e3a1e54 fix en-es name and filename 2021-04-30 13:54:53 +01:00
woosade
a9bde40661 translation from Weblate (Spanish)
Currently translated at 100.0% (151 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/es/
2021-04-29 23:54:04 +02:00
woosade
b03a185e88 Translated using Weblate (Spanish)
Currently translated at 100.0% (98 of 98 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-04-29 23:54:03 +02:00
woosade
e450587eea translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (151 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/pt_BR/
2021-04-29 23:54:03 +02:00
Richard de Boer
30a529baac translation from Weblate (Dutch)
Currently translated at 100.0% (151 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/nl/
2021-04-29 23:54:03 +02:00
woosade
adbb74f56b Translated using Weblate (Spanish)
Currently translated at 100.0% (98 of 98 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-04-28 15:15:40 +02:00
woosade
223b4df172 translation from Weblate (Spanish)
Currently translated at 100.0% (28 of 28 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/es/
2021-04-28 15:15:40 +02:00
woosade
44dc315914 Translated using Weblate (Spanish)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/es/
2021-04-28 15:15:40 +02:00
woosade
c959e2ce4d translation from Weblate (Spanish)
Currently translated at 100.0% (150 of 150 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/es/
2021-04-28 15:15:40 +02:00
woosade
57b10dd514 Translated using Weblate (Spanish)
Currently translated at 100.0% (13 of 13 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/es/
2021-04-28 15:15:40 +02:00
woosade
9da0f89613 Added translation using Weblate (Spanish) 2021-04-28 15:15:40 +02:00
woosade
4104cb334e add translation from Weblate (Spanish) 2021-04-28 15:15:40 +02:00
woosade
94067a1ec2 Added translation using Weblate (Spanish) 2021-04-28 15:15:40 +02:00
woosade
3e9da3baf7 add translation from Weblate (Spanish) 2021-04-28 15:15:40 +02:00
woosade
6129305b2c Added translation using Weblate (Spanish) 2021-04-28 15:15:40 +02:00
ClankJake
7165eb1f59 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/pt_BR/
2021-04-28 15:15:40 +02:00
ClankJake
a4820de423 translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (150 of 150 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/pt_BR/
2021-04-28 15:15:40 +02:00
Marketos Damigos
0c09f3b05f Translated using Weblate (Greek)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/el/
2021-04-28 15:15:40 +02:00
Marketos Damigos
269d67f071 translation from Weblate (Greek)
Currently translated at 100.0% (150 of 150 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/el/
2021-04-28 15:15:39 +02:00
Richard de Boer
bdc0c0ffa2 Translated using Weblate (Dutch)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/nl/
2021-04-28 15:15:39 +02:00
Richard de Boer
c00f5f4330 translation from Weblate (Dutch)
Currently translated at 100.0% (150 of 150 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/nl/
2021-04-28 15:15:39 +02: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
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
Harvey Tindall
90a2c1f2e7 Fix email editor for other email types 2021-04-22 19:16:41 +01:00
Harvey Tindall
d772e43e44 merge language changes 2021-04-15 15:34:52 +01:00
Harvey Tindall
8fdab39b18 use templateEmail and show conditionals in editor 2021-04-15 15:34:17 +01:00
Harvey Tindall
f7d2771263 add email templater with basic if statements
at this point I really should've just used text/template, but I guess
this way compatibility is kept with existing custom emails. If statement
works as so:

{if variable}variable was true{endif}
{if !variable}variable was false{endif}

no else yet, just do as above (two if statements).
2021-04-14 23:58:54 +01:00
ClankJake
e8b1cca9ca translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (140 of 140 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/pt_BR/
2021-04-14 19:15:43 +02:00
Richard de Boer
d4d7219801 translation from Weblate (Dutch)
Currently translated at 100.0% (140 of 140 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/nl/
2021-04-14 19:15:43 +02:00
Harvey Tindall
3273607fc3 translation: add fallback option to langMeta
If set to a language code (e.g fr-fr), any missing strings will be
filled in from that language (if possible) rather than from the default
en-us. Currently not used, but could be useful in the future for
variations of the same language.
2021-04-13 18:34:13 +01:00
Harvey Tindall
55e21f8be3 accounts: add user enable/disable & emails 2021-04-12 21:28:36 +01:00
ClankJake
dafb439a7d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (45 of 45 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/pt_BR/
2021-04-12 18:27:42 +02:00
Richard de Boer
ab94de2f95 Translated using Weblate (Dutch)
Currently translated at 100.0% (45 of 45 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/nl/
2021-04-12 18:27:42 +02:00
Harvey Tindall
3dc0df0ac2 fix user expiry when only month field set 2021-04-09 13:35:46 +01:00
Harvey Tindall
d701c5f27d add months field to invites & expiry 2021-04-08 20:43:01 +01:00
Harvey Tindall
a8f71c83da store language preference as cookie 2021-04-08 16:03:46 +01:00
Harvey Tindall
7a3e0d60f9 add expiry to welcome email, add dummy emailer for debugging
the "yourAccountWillExpire" has also been added to the editor for #81.
To use the dummy emailer, set [email]/method to "dummy".
2021-04-08 14:20:13 +01:00
Harvey Tindall
2687af31ca updater: immediately store executable
for some reason I kept the response body and downloaded file in memory,
which led to timeouts and failed updates.
2021-04-07 18:17:18 +01:00
Harvey Tindall
d51a6abb02 remove cl.md 2021-04-07 17:45:31 +01:00
Harvey Tindall
374ffbf01f fix incomplete lang patching, add en-gb stub
en-gb is empty, so it's patched with en-us strings. Added so DD/MM/YY
date formatting was possible in the ui.
2021-04-07 17:42:15 +01:00
Harvey Tindall
871bc9f396 use proper date formatting on form for expiry 2021-04-07 15:17:15 +01:00
Harvey Tindall
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
Harvey Tindall
bc76770ca4 move 12h/24h time strings to common 2021-04-07 15:09:25 +01:00
Harvey Tindall
7196361cf6 (hopefully) get proper locale from browser 2021-04-07 14:05:17 +01:00
Harvey Tindall
3e73d16cce merge language changes 2021-04-06 21:30:14 +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
6ec2186bdf switch accounts tab to unix times
should now respect the client's locale.
2021-04-06 20:53:30 +01:00
ClankJake
6dd575b276 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (44 of 44 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/pt_BR/
2021-04-06 19:49:18 +02:00
JoshiJoshiJoshi
1a98946d71 Translated using Weblate (German)
Currently translated at 100.0% (100 of 100 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/de/
2021-04-06 19:49:18 +02:00
ClankJake
8922549bdb Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (11 of 11 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/pt_BR/
2021-04-06 19:49:18 +02:00
Richard de Boer
173b49aeb7 Translated using Weblate (Dutch)
Currently translated at 100.0% (11 of 11 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/nl/
2021-04-06 19:49:18 +02:00
JoshiJoshiJoshi
eee6046465 Translated using Weblate (German)
Currently translated at 100.0% (11 of 11 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/de/
2021-04-06 19:49:18 +02:00
JoshiJoshiJoshi
b76011be4f translation from Weblate (German)
Currently translated at 100.0% (28 of 28 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/de/
2021-04-06 19:49:18 +02:00
Richard de Boer
3d93d79b0b Translated using Weblate (Dutch)
Currently translated at 100.0% (44 of 44 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/nl/
2021-04-06 19:49:18 +02:00
Harvey Tindall
7dcc9b20a1 clear user cache when user expires 2021-04-06 18:39:12 +01:00
Harvey Tindall
754b956206 remove extra logs 2021-04-06 18:32:32 +01:00
Harvey Tindall
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
Harvey Tindall
e6e5231f63 add extra logging 2021-04-06 18:02:15 +01:00
Harvey Tindall
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
Harvey Tindall
8a6cfe0b4d disallow negative values in ExtendExpiry, fix nil map err 2021-04-06 14:00:32 +01:00
Harvey Tindall
afedc78113 only load users if they don't exist already
another guess for #77.
2021-04-06 13:53:07 +01:00
Harvey Tindall
76b822213e add more error logging; mutex for app.storage.users 2021-04-06 13:44:52 +01:00
Harvey Tindall
ab3d5f3321 fix logging for expiry extension
also delete expiries for users that no longer exist.
2021-04-06 13:31:42 +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
aaea889e47 use apt-get in drone.yml 2021-04-03 21:38:26 +01:00
Harvey Tindall
bf98c74ecf Merge pull request #75 from Toucan-Sam/patch-1
Fix docker link in README.md
2021-04-03 21:37:54 +01:00
Toucan-Sam
fcadabd339 Fix docker link in README.md 2021-04-04 08:32:38 +12: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
30f16e7207 email: use strconv.Itoa instead of sprintf 2021-04-02 15:56:34 +01:00
Harvey Tindall
dbe7e2e659 remove ts-debug 2021-04-01 14:33:57 +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
07573a515a merge translation 2021-04-01 12:58:06 +01:00
Harvey Tindall
b3a2de50cf hide no_username support message on setup
fixes #74.
2021-04-01 12:56:47 +01:00
Marketos Damigos
5388d3d4c0 Translated using Weblate (Greek)
Currently translated at 100.0% (11 of 11 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/el/
2021-03-31 21:18:01 +02:00
Marketos Damigos
c392d48174 Translated using Weblate (Greek)
Currently translated at 100.0% (44 of 44 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/el/
2021-03-31 21:18:00 +02:00
Marketos Damigos
967fab3411 Translated using Weblate (Greek)
Currently translated at 100.0% (100 of 100 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/el/
2021-03-31 14:54:34 +02:00
Marketos Damigos
d7845b78f6 Translated using Weblate (Greek)
Currently translated at 100.0% (43 of 43 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/el/
2021-03-31 14:54:34 +02:00
Marketos Damigos
a253858625 translation from Weblate (Greek)
Currently translated at 100.0% (140 of 140 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/el/
2021-03-31 14:54:34 +02:00
Marketos Damigos
ad1aae16e3 translation from Weblate (Greek)
Currently translated at 100.0% (28 of 28 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/el/
2021-03-31 14:54:34 +02: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
dcd2e234e8 move "copy" string to common, add "copied"
for a new password reset feature.
2021-03-30 21:16:24 +01:00
Harvey Tindall
762dac2581 move mediabrowser to separate repo 2021-03-29 21:49:46 +01:00
Harvey Tindall
1cf8d3037b remove dependency on common from mediabrowser 2021-03-29 20:57:13 +01:00
Harvey Tindall
40808bdcb9 merge language changes 2021-03-29 20:54:06 +01:00
Harvey Tindall
2451d69341 rewrite lang.go format and templateString
surprisingly not much faster than the originals.
2021-03-27 16:07:22 +00:00
virusperfect
e449853568 Translated using Weblate (German)
Currently translated at 100.0% (100 of 100 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/de/
2021-03-27 00:19:06 +01:00
virusperfect
2082e960c2 Translated using Weblate (German)
Currently translated at 100.0% (43 of 43 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/de/
2021-03-27 00:19:06 +01:00
virusperfect
7b2a083f98 translation from Weblate (German)
Currently translated at 100.0% (28 of 28 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/de/
2021-03-27 00:19:06 +01:00
virusperfect
270143a8f6 translation from Weblate (German)
Currently translated at 100.0% (140 of 140 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/de/
2021-03-27 00:19:06 +01:00
ClankJake
766b69d95e translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (140 of 140 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/pt_BR/
2021-03-27 00:19:06 +01:00
ClankJake
f5addc4947 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (100 of 100 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/pt_BR/
2021-03-27 00:19:06 +01:00
ClankJake
55eb59c526 translation from Weblate (Portuguese (Brazil))
Currently translated at 100.0% (28 of 28 strings)

Translation: jfa-go/Account Creation Form
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/form/pt_BR/
2021-03-27 00:19:06 +01:00
Richard de Boer
679cac4dbd Translated using Weblate (Dutch)
Currently translated at 100.0% (100 of 100 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/nl/
2021-03-27 00:19:06 +01:00
Harvey Tindall
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
Harvey Tindall
9875458b01 rewrite time unmarshaler for mediabrowser
Last ditch effort for #69, removes quotes and trailing Z's manually and
also removes nanoseconds since they're useless.
2021-03-23 21:59:41 +00:00
Harvey Tindall
f0dccc58aa separate pprof from debug mode
enabled with -pprof now.
2021-03-23 21:59:04 +00:00
Harvey Tindall
636bc22d52 reimplement Lshortfile for log wrapper
Fixes all debug messages having "logger:<line>:" instead of the actual
caller.
2021-03-23 21:57:53 +00:00
Harvey Tindall
fc6b6a9c6b Fix time parser for "ZZ" prefix
I think this means UTC-08:00, but this just strips it since time
handling is pretty naïve already.
2021-03-23 16:10:25 +00:00
Harvey Tindall
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
Harvey Tindall
e351c35cc8 use banner class on banner in about 2021-03-21 00:59:51 +00:00
168 changed files with 13929 additions and 4956 deletions

View File

@@ -9,23 +9,28 @@ steps:
commands:
- git fetch --tags
- name: release
image: golang:latest
image: hrfee/jfa-go-build-docker:latest
volumes:
- name: ssh_key
path: /id_rsa
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
GITHUB_TOKEN:
from_secret: github_token
commands:
- apt update -y
- apt install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
- apt install nodejs
- curl -sL https://git.io/goreleaser > ../goreleaser
- chmod +x ../goreleaser
- ./scripts/version.sh ../goreleaser
- wget https://builds.hrfee.pw/upload.py -P ../
- pip3 install requests
- bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
- bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"'
- bash -c 'python3 ../upload.py https://builds.hrfee.pw hrfee jfa-go --tag internal=true'
volumes:
- name: ssh_key
host:
path: /root/.ssh/id_rsa_packaging
trigger:
event:
- tag
@@ -71,22 +76,29 @@ type: docker
steps:
- name: build
image: golang:latest
image: hrfee/jfa-go-build-docker:latest
volumes:
- name: ssh_key
path: /id_rsa
commands:
- apt update -y
- apt install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
- apt install nodejs
- curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist
- wget https://builds.hrfee.pw/upload.py
- pip3 install requests
- bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.tar.gz --tag internal-git=true'
- bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
# - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go"'
# - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go-tray"'
- bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"'
- bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip ./dist/*.rpm ./dist/*.apk --tag internal-git=true'
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
volumes:
- name: ssh_key
host:
path: /root/.ssh/id_rsa_packaging
trigger:
branch:
- main
@@ -143,10 +155,10 @@ steps:
- name: build
image: golang:latest
commands:
- apt update -y
- apt install build-essential python3-pip curl software-properties-common sed upx -y
- apt-get update -y
- apt-get install build-essential python3-pip curl software-properties-common sed upx gcc libgtk-3-dev libappindicator3-dev gcc-mingw-w64-x86-64 -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
- apt install nodejs
- apt-get install nodejs
- curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist

View File

@@ -19,8 +19,11 @@ What to do to reproduce the problem.
**Logs**
**If you're using a build with a tray icon, right-click on it and press "Open logs" to access your logs.**
When you notice the problem, check the output of `jfa-go`. If the problem is not obvious (e.g a panic (red text) or 'ERROR' log), re-run jfa-go with the `-debug` argument and reproduce the problem. You should then take a screenshot of the output, or paste it here, preferably between \`\`\` tags (e.g \`\`\``Log here`\`\`\`). Remember to censor any personal information.
If nothing catches your eye in the log, access the admin page via your browser, go into the console (Right click > Inspect Element > Console), refresh, reproduce the problem then paste the output here in the same way as above.
**Configuration**

3
.gitignore vendored
View File

@@ -4,7 +4,6 @@ dist/
build/
data/
version.go
embed.go
notes
docs/*
lang/langtostruct.py
@@ -14,3 +13,5 @@ server.key
server.pem
server.crt
instructions-debian.txt
cl.md
./telegram/

View File

@@ -22,27 +22,84 @@ before:
- python3 scripts/generate_ini.py -i config/config-base.json -o data/config-default.ini
- python3 scripts/compile_mjml.py -o data/
- npx esbuild --bundle ts/admin.ts --outfile=./data/web/js/admin.js --minify
- npx esbuild --bundle ts/pwr.ts --outfile=./data/web/js/pwr.js --minify
- npx esbuild --bundle ts/form.ts --outfile=./data/web/js/form.js --minify
- npx esbuild --bundle ts/setup.ts --outfile=./data/web/js/setup.js --minify
- npx esbuild --bundle ts/crash.ts --outfile=./data/crash.js --minify
- cp html/crash.html data/
- npx uncss data/crash.html --csspath web/css --output data/bundle.css
- npx inline-source --root data data/crash.html data/crash.html
- rm data/bundle.css
- mv data/crash.html data/html/
- go get -u github.com/swaggo/swag/cmd/swag
- swag init -g main.go
- python3 scripts/embed.py internal
builds:
- dir: ./
- id: notray
dir: ./
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm
- arm64
- amd64
- id: windows-tray
dir: ./
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
flags:
- -tags=tray
ldflags:
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary -H=windowsgui
goos:
- windows
goarch:
- amd64
- id: linux-tray
dir: ./
env:
- CGO_ENABLED=1
flags:
- -tags=tray
ldflags:
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary
goos:
- linux
goarch:
- amd64
archives:
- replacements:
- id: windows-tray
builds:
- windows-tray
format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_TrayIcon_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: macOS
linux: Linux
windows: Windows
amd64: x86_64
- id: linux-tray
builds:
- linux-tray
format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_TrayIcon_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: macOS
linux: Linux
windows: Windows
amd64: x86_64
- id: notray
builds:
- notray
format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: macOS
linux: Linux
windows: Windows
@@ -50,10 +107,61 @@ archives:
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "git-{{.ShortCommit}}"
name_template: "0.0.0-{{ .Env.JFA_GO_NFPM_EPOCH }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
nfpms:
- id: notray
file_name_template: '{{ .ProjectName }}{{ if .IsSnapshot }}-git{{ end }}_{{ .Arch }}_{{ if .IsSnapshot }}{{ .ShortCommit }}{{ else }}v{{ .Version }}{{ end }}'
package_name: jfa-go
homepage: https://github.com/hrfee/jfa-go
description: A web app for managing users on Jellyfin
maintainer: Harvey Tindall <hrfee@hrfee.dev>
license: MIT
vendor: hrfee.dev
version_metadata: git
builds:
- notray
contents:
- src: ./LICENSE
dst: /usr/share/licenses/jfa-go
formats:
- apk
- deb
- rpm
- id: tray
file_name_template: '{{ .ProjectName }}{{ if .IsSnapshot }}-git{{ end }}_TrayIcon_{{ .Arch }}_{{ if .IsSnapshot }}{{ .ShortCommit }}{{ else }}v{{ .Version }}{{ end }}'
package_name: jfa-go-tray
homepage: https://github.com/hrfee/jfa-go
description: A web app for managing users on Jellyfin
maintainer: Harvey Tindall <hrfee@hrfee.dev>
license: MIT
vendor: hrfee.dev
version_metadata: git
builds:
- linux-tray
contents:
- src: ./LICENSE
dst: /usr/share/licenses/jfa-go
formats:
- apk
- deb
- rpm
overrides:
deb:
conflicts:
- jfa-go
replaces:
- jfa-go
dependencies:
- libappindicator3-1
rpm:
dependencies:
- libappindicator-gtk3
apk:
dependencies:
- libappindicator

View File

@@ -1,8 +1,20 @@
#### Code
I use 4 spaces for indentation. Go should ideally be formatted with `goimports` and/or `gofmt`. I don't use a formatter on typescript, so don't worry about that.
If you need to test your changes:
* `make debug` will build everything, and include sourcemaps for typescript. This should be the first thing you run.
* `make compile` compiles go into `build/jfa-go`.
* `make ts-debug` will compile typescript w/ sourcemaps into `build/data/web/js`.
* `make copy` will copy css, html, language and static files into `build/data`.
Code in Go should ideally use `PascalCase` for exported values, and `camelCase` for non-exported, JSON for transferring data should use `snake_case`, and Typescript should use `camelCase`. Forgive me for my many inconsistencies in this, and feel free to fix them if you want.
Functions in Go that need to access `*appContext` should be generally be receivers, except when the behaviour could be seen as somewhat independent from it (`email.go` is the best example, its behaviour is broadly independent from the main app except from a couple config values).
#### Compiling
Prefix each of these with `make DEBUG=on INTERNAL=off `:
* `all` will download deps and build everything. The executable and data will be placed in `build`. This is only necessary the first time.
* `compile` will only compile go code into the `build/jfa-go` executable.
* `typescript` will compile typescript w/ sourcemaps into `build/data/web/js`.
* `bundle-css` will bundle CSS and place it in `build/data/web/css`.
* `configuration` will generate the `config-base.json` (used to render settings in the web ui) and `config-default.ini` and put them in `build/data`.
* `email` will compile email mjml, and copy the text versions in to `build/data`.
* `copy` will copy iconography, html, language files and static data into `build/data`.
See the [wiki](https://github.com/hrfee/jfa-go/wiki/Build) for more info.

View File

@@ -6,7 +6,7 @@ RUN apt-get update -y \
&& apt-get install build-essential python3-pip curl software-properties-common sed -y \
&& (curl -sL https://deb.nodesource.com/setup_14.x | bash -) \
&& apt-get install nodejs \
&& (cd /opt/build; make configuration npm email typescript bundle-css swagger copy external-files GOESBUILD=on) \
&& (cd /opt/build; make configuration npm email typescript bundle-css swagger copy INTERNAL=off GOESBUILD=on) \
&& sed -i 's#id="password_resets-watch_directory" placeholder="/config/jellyfin"#id="password_resets-watch_directory" value="/jf" disabled#g' /opt/build/build/data/html/setup.html
@@ -16,7 +16,7 @@ ENV GOARCH=$TARGETARCH
COPY --from=support /opt/build /opt/build
RUN (cd /opt/build; make compile UPDATER=docker)
RUN (cd /opt/build; make compile INTERNAL=off UPDATER=docker)
FROM golang:latest

140
Makefile
View File

@@ -11,11 +11,54 @@ VERSION := $(shell echo $(VERSION) | sed 's/v//g')
COMMIT ?= $(shell git rev-parse --short HEAD || echo unknown)
UPDATER ?= off
BUILDFLAGS := -X main.version=$(VERSION) -X main.commit=$(COMMIT)
LDFLAGS := -X main.version=$(VERSION) -X main.commit=$(COMMIT)
ifeq ($(UPDATER), on)
BUILDFLAGS := $(BUILDFLAGS) -X main.updater=binary
LDFLAGS := $(LDFLAGS) -X main.updater=binary
else ifneq ($(UPDATER), off)
BUILDFLAGS := $(BUILDFLAGS) -X main.updater=$(UPDATER)
LDFLAGS := $(LDFLAGS) -X main.updater=$(UPDATER)
endif
INTERNAL ?= on
ifeq ($(INTERNAL), on)
TAGS :=
DATA := data
else
DATA := build/data
TAGS := -tags external
endif
TRAY ?= off
ifeq ($(INTERNAL)$(TRAY), offon)
TAGS := $(TAGS) tray
else ifeq ($(INTERNAL)$(TRAY), onon)
TAGS := -tags tray
endif
OS := $(shell go env GOOS)
ifeq ($(TRAY)$(OS), onwindows)
LDFLAGS := $(LDFLAGS) -H=windowsgui
endif
DEBUG ?= off
ifeq ($(DEBUG), on)
SOURCEMAP := --sourcemap
TYPECHECK := tsc -noEmit --project ts/tsconfig.json
# jank
COPYTS := rm -r $(DATA)/web/js/ts; cp -r ts $(DATA)/web/js
UNCSS := cp $(DATA)/web/css/bundle.css $(DATA)/bundle.css
else
LDFLAGS := -s -w $(LDFLAGS)
SOURCEMAP :=
COPYTS :=
TYPECHECK :=
UNCSS := npx uncss $(DATA)/crash.html --csspath web/css --output $(DATA)/bundle.css
endif
RACE ?= off
ifeq ($(RACE), on)
RACEDETECTOR := -race
else
RACEDETECTOR :=
endif
npm:
@@ -29,31 +72,25 @@ npm:
configuration:
$(info Fixing config-base)
-mkdir -p data
python3 scripts/enumerate_config.py -i config/config-base.json -o data/config-base.json
-mkdir -p $(DATA)
python3 scripts/enumerate_config.py -i config/config-base.json -o $(DATA)/config-base.json
$(info Generating config-default.ini)
python3 scripts/generate_ini.py -i config/config-base.json -o data/config-default.ini
python3 scripts/generate_ini.py -i config/config-base.json -o $(DATA)/config-default.ini
email:
$(info Generating email html)
python3 scripts/compile_mjml.py -o data/
python3 scripts/compile_mjml.py -o $(DATA)/
typescript:
$(TYPECHECK)
$(info compiling typescript)
-mkdir -p data/web/js
-$(ESBUILD) --bundle ts/admin.ts --outfile=./data/web/js/admin.js --minify
-$(ESBUILD) --bundle ts/form.ts --outfile=./data/web/js/form.js --minify
-$(ESBUILD) --bundle ts/setup.ts --outfile=./data/web/js/setup.js --minify
ts-debug:
$(info compiling typescript w/ sourcemaps)
-mkdir -p data/web/js
-$(ESBUILD) --bundle ts/admin.ts --sourcemap --outfile=./data/web/js/admin.js
-$(ESBUILD) --bundle ts/form.ts --sourcemap --outfile=./data/web/js/form.js
-$(ESBUILD) --bundle ts/setup.ts --sourcemap --outfile=./data/web/js/setup.js
-rm -r data/web/js/ts
$(info copying typescript)
cp -r ts data/web/js
-mkdir -p $(DATA)/web/js
-$(ESBUILD) --bundle ts/admin.ts $(SOURCEMAP) --outfile=./$(DATA)/web/js/admin.js --minify
-$(ESBUILD) --bundle ts/pwr.ts $(SOURCEMAP) --outfile=./$(DATA)/web/js/pwr.js --minify
-$(ESBUILD) --bundle ts/form.ts $(SOURCEMAP) --outfile=./$(DATA)/web/js/form.js --minify
-$(ESBUILD) --bundle ts/setup.ts $(SOURCEMAP) --outfile=./$(DATA)/web/js/setup.js --minify
-$(ESBUILD) --bundle ts/crash.ts --outfile=./$(DATA)/crash.js --minify
$(COPYTS)
swagger:
$(GOBINARY) get github.com/swaggo/swag/cmd/swag
@@ -64,47 +101,54 @@ compile:
$(GOBINARY) mod download
$(info Building)
mkdir -p build
cd build && CGO_ENABLED=0 $(GOBINARY) build -ldflags="-s -w $(BUILDFLAGS)" -o ./jfa-go ../*.go
compile-debug:
$(info Downloading deps)
$(GOBINARY) mod download
$(info Building)
mkdir -p build
cd build && CGO_ENABLED=0 $(GOBINARY) build -ldflags "$(BUILDFLAGS)" -o ./jfa-go ../*.go
$(GOBINARY) build $(RACEDETECTOR) -ldflags="$(LDFLAGS)" $(TAGS) -o build/jfa-go
compress:
upx --lzma build/jfa-go
bundle-css:
-mkdir -p data/web/css
-mkdir -p $(DATA)/web/css
$(info bundling css)
$(ESBUILD) --bundle css/base.css --outfile=data/web/css/bundle.css --external:remixicon.css --minify
$(ESBUILD) --bundle css/base.css --outfile=$(DATA)/web/css/bundle.css --external:remixicon.css --minify
inline:
cp html/crash.html $(DATA)/crash.html
$(UNCSS)
npx inline-source --root $(DATA) $(DATA)/crash.html $(DATA)/crash.html
rm $(DATA)/bundle.css
copy:
$(info copying fonts)
cp -r node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 data/web/css/
cp -r node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 $(DATA)/web/css/
$(info copying html)
cp -r html data/
cp -r html $(DATA)/
mv $(DATA)/crash.html $(DATA)/html/
$(info copying static data)
-mkdir -p data/web
cp -r static/* data/web/
-mkdir -p $(DATA)/web
cp -r static/* $(DATA)/web/
$(info copying systemd service)
cp jfa-go.service $(DATA)/
$(info copying language files)
cp -r lang data/
cp LICENSE data/
cp -r lang $(DATA)/
cp LICENSE $(DATA)/
internal-files:
python3 scripts/embed.py internal
external-files:
python3 scripts/embed.py external
-mkdir -p build
$(info copying internal data into build/)
cp -r data build/
# internal-files:
# python3 scripts/embed.py internal
#
# external-files:
# python3 scripts/embed.py external
# -mkdir -p build
# $(info copying internal data into build/)
# cp -r data build/
install:
cp -r build $(DESTDIR)/jfa-go
all: configuration npm email typescript bundle-css swagger copy internal-files compile
all-external: configuration npm email typescript bundle-css swagger copy external-files compile
debug: configuration npm email ts-debug bundle-css swagger copy external-files compile-debug
clean:
-rm -r $(DATA)
-rm -r build
-rm mail/*.html
-rm docs/docs.go docs/swagger.json docs/swagger.yaml
go clean
all: configuration npm email typescript bundle-css inline swagger copy compile

View File

@@ -4,30 +4,32 @@
[![Translation status](https://weblate.hrfee.pw/widgets/jfa-go/-/svg-badge.svg)](https://weblate.hrfee.pw/engage/jfa-go/)
##### Downloads:
##### [dockerhub](https://hub.docker.com/r/hrfee/jfa-go) | [stable](https://github.com/hrfee/jfa-go/releases) | [nightly](https://builds.hrfee.pw/view/hrfee/jfa-go) | [aur stable](https://aur.archlinux.org/packages/jfa-go) | [aur binary](https://aur.archlinux.org/packages/jfa-go-bin) | [aur nightly](https://aur.archlinux.org/packages/jfa-go-git)
##### [docker](#docker) | [debian/ubuntu](#debian) | [arch (aur)](#aur) | [other platforms](#other-platforms)
---
jfa-go is a user management app for [Jellyfin](https://github.com/jellyfin/jellyfin) (and now [Emby](https://emby.media/)) that provides invite-based account creation as well as other features that make one's instance much easier to manage.
I chose to rewrite the python [jellyfin-accounts](https://github.com/hrfee/jellyfin-accounts) in Go mainly as a learning experience, but also to slightly improve speeds and efficiency.
a rewrite of [jellyfin-accounts](https://github.com/hrfee/jellyfin-accounts) (original naming for both, ik
😂).
#### Features
* 🧑 Invite based account creation: Sends invites to your friends or family, and let them choose their own username and password without relying on you.
* 🧑 Invite based account creation: Send invites to your friends or family, and let them choose their own username and password without relying on you.
* Send invites via a link and/or email
* Granular control over invites: Validity period as well as number of uses can be specified.
* Account profiles: Assign settings profiles to invites so new users have your predefined permissions, homescreen layout, etc. applied to their account on creation.
* Password validation: Ensure users choose a strong password.
* ⌛ User expiry: Specify a validity period, and new user's accounts will be disabled/deleted after it. The period can be manually extended too.
* ⌛ User expiry: Specify a validity period, and new users accounts will be disabled/deleted after it. The period can be manually extended too.
* 🔗 Ombi Integration: Automatically creates Ombi accounts for new users using their email address and login details, and your own defined set of permissions.
* Account management: Apply settings to your users individually or en masse, and delete users, optionally sending them an email notification with a reason.
* Telegram/Discord/Matrix Integration: Verify users via a chat bot, and send Password Resets, Announcements, etc. through it.
* 📨 Email storage: Add your existing users email addresses through the UI, and jfa-go will ask new users for them on account creation.
* Email addresses can optionally be used instead of usernames
* 🔑 Password resets: When user's forget their passwords and request a change in Jellyfin, jfa-go reads the PIN from the created file and sends it straight to the user via email.
* 🔑 Password resets: When users forget their passwords and request a change in Jellyfin, jfa-go reads the PIN from the created file and sends it straight to the user via email/telegram.
* Notifications: Get notified when someone creates an account, or an invite expires.
* 📣 Announcements: Bulk email your users with announcements about your server.
* 📣 Announcements: Bulk message your users with announcements about your server.
* Authentication via Jellyfin: Instead of using separate credentials for jfa-go and Jellyfin, jfa-go can use it as the authentication provider.
* Enables the usage of jfa-go by multiple people
* 🌓 Customizable look
* Edit emails with variables and markdown
* 🌓 Customizations
* Customize emails with variables and markdown
* Specify contact and help messages to appear in emails and pages
* Light and dark themes available
@@ -44,7 +46,9 @@ I chose to rewrite the python [jellyfin-accounts](https://github.com/hrfee/jelly
#### Install
The [Docker](https://hub.docker.com/repository/docker/hrfee/jfa-go) image is your best bet.
**Note**: `TrayIcon` builds include a tray icon to start/stop/restart, and an option to automatically start when you log-in to your computer. For Linux users, these builds depend on the `libappindicator3-1`/`libappindicator-gtk3`/`libappindicator` package for Debian/Ubuntu, Fedora, and Alpine respectively.
##### [Docker](https://hub.docker.com/r/hrfee/jfa-go)
```sh
docker create \
--name "jfa-go" \ # Whatever you want to name it
@@ -55,9 +59,41 @@ docker create \
-v /etc/localtime:/etc/localtime:ro \ # Makes sure time is correct
hrfee/jfa-go # hrfee/jfa-go:unstable for latest build from git
```
Available on the AUR as [jfa-go](https://aur.archlinux.org/packages/jfa-go/), [jfa-go-bin](https://aur.archlinux.org/packages/jfa-go) or [jfa-go-git](https://aur.archlinux.org/packages/jfa-go-git/).
For other platforms, grab an archive from the release section for your platform (or nightly builds [here](https://builds.hrfee.dev/view/hrfee/jfa-go)), and extract the `jfa-go` executable to somewhere useful.
##### [Debian/Ubuntu](https://apt.hrfee.dev)
```sh
sudo apt-get update && sudo apt-get install curl apt-transport-https gnupg
curl https://apt.hrfee.dev/hrfee.pubkey.gpg | sudo apt-key add -
# For stable releases
echo "deb https://apt.hrfee.dev trusty main" | sudo tee /etc/apt/sources.list.d/hrfee.list
# ------
# For unstable releases
echo "deb https://apt.hrfee.dev trusty-unstable main" | sudo tee /etc/apt/sources.list.d/hrfee.list
# ------
sudo apt-get update
# For servers
sudo apt-get install jfa-go
# ------
# For desktops/servers with GUI (has dependencies)
sudo apt-get install jfa-go-tray
# ------
```
##### Arch
Available on the AUR as:
* [jfa-go](https://aur.archlinux.org/packages/jfa-go/) (stable)
* [jfa-go-bin](https://aur.archlinux.org/packages/jfa-go) (pre-compiled, stable)
* [jfa-go-git](https://aur.archlinux.org/packages/jfa-go-git/) (nightly)
##### Other platforms
Download precompiled binaries from:
* [The releases section](https://github.com/hrfee/jfa-go/releases) (stable)
* [Buildrone](https://builds.hrfee.dev/view/hrfee/jfa-go) (nightly)
unzip the `jfa-go`/`jfa-go.exe` executable to somewhere useful.
* For \*nix/macOS users, `chmod +x jfa-go` then place it somewhere in your PATH like `/usr/bin`.
Run the executable to start.
@@ -71,24 +107,38 @@ Otherwise, full build instructions can be found [here](https://github.com/hrfee/
#### Usage
Simply run `jfa-go` to start the application. A setup wizard will start on `localhost:8056` (or your own specified address). Upon completion, refresh the page.
Note: jfa-go does not run as a daemon by default. You'll need to figure this out yourself.
```
Usage of ./jfa-go:
-config string
alternate path to config file. (default "~/.config/jfa-go/config.ini")
-data string
alternate path to data directory. (default "~/.config/jfa-go")
Usage of jfa-go:
start
start jfa-go as a daemon and run in the background.
stop
stop a daemonized instance of jfa-go.
systemd
generate a systemd .service file.
-config, -c string
alternate path to config file. (default "/home/hrfee/.config/jfa-go/config.ini")
-data, -d string
alternate path to data directory. (default "/home/hrfee/.config/jfa-go")
-debug
Enables debug logging and exposes pprof.
Enables debug logging.
-help, -h
prints this message.
-host string
alternate address to host web ui on.
-port int
-port, -p int
alternate port to host web ui on.
-pprof
Exposes pprof profiler on /debug/pprof.
-swagger
Enable swagger at /swagger/index.html
```
#### Systemd
jfa-go does not run as a daemon by default. Run `jfa-go systemd` to create a systemd `.service` file in your current directory, which you can copy into `~/.config/systemd/user` or somewhere else.
---
If you're switching from jellyfin-accounts, copy your existing `~/.jf-accounts` to:
* `XDG_CONFIG_DIR/jfa-go` (usually ~/.config/jfa-go) on \*nix systems,

1544
api.go

File diff suppressed because it is too large Load Diff

154
args.go Normal file
View File

@@ -0,0 +1,154 @@
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"os"
"path/filepath"
"strings"
)
func (app *appContext) loadArgs(firstCall bool) {
if firstCall {
flag.Usage = helpFunc
help := flag.Bool("help", false, "prints this message.")
flag.BoolVar(help, "h", false, "SHORTHAND")
DATA = flag.String("data", app.dataPath, "alternate path to data directory.")
flag.StringVar(DATA, "d", app.dataPath, "SHORTHAND")
CONFIG = flag.String("config", app.configPath, "alternate path to config file.")
flag.StringVar(CONFIG, "c", app.configPath, "SHORTHAND")
HOST = flag.String("host", "", "alternate address to host web ui on.")
PORT = flag.Int("port", 0, "alternate port to host web ui on.")
flag.IntVar(PORT, "p", 0, "SHORTHAND")
DEBUG = flag.Bool("debug", false, "Enables debug logging.")
PPROF = flag.Bool("pprof", false, "Exposes pprof profiler on /debug/pprof.")
SWAGGER = flag.Bool("swagger", false, "Enable swagger at /swagger/index.html")
flag.Parse()
if *help {
flag.Usage()
os.Exit(0)
}
if *SWAGGER {
os.Setenv("SWAGGER", "1")
}
if *DEBUG {
os.Setenv("DEBUG", "1")
}
if *PPROF {
os.Setenv("PPROF", "1")
}
}
if os.Getenv("SWAGGER") == "1" {
*SWAGGER = true
}
if os.Getenv("DEBUG") == "1" {
*DEBUG = true
}
if os.Getenv("PPROF") == "1" {
*PPROF = true
}
// attempt to apply command line flags correctly
if app.configPath == *CONFIG && app.dataPath != *DATA {
app.dataPath = *DATA
app.configPath = filepath.Join(app.dataPath, "config.ini")
} else if app.configPath != *CONFIG && app.dataPath == *DATA {
app.configPath = *CONFIG
} else {
app.configPath = *CONFIG
app.dataPath = *DATA
}
// Previously used for self-restarts but leaving them here as they might be useful.
if v := os.Getenv("JFA_CONFIGPATH"); v != "" {
app.configPath = v
}
if v := os.Getenv("JFA_DATAPATH"); v != "" {
app.dataPath = v
}
os.Setenv("JFA_CONFIGPATH", app.configPath)
os.Setenv("JFA_DATAPATH", app.dataPath)
}
/* Adds start/stop/systemd to help message, and
also gets rid of usage for shorthand flags, and merge them with the full-length one.
implementation is 🤢, will clean this up eventually.
-h SHORTHAND
-help
prints this message.
becomes:
-help, -h
prints this message.
*/
func helpFunc() {
fmt.Fprint(os.Stderr, `Usage of jfa-go:
start
start jfa-go as a daemon and run in the background.
stop
stop a daemonized instance of jfa-go.
systemd
generate a systemd .service file.
`)
shortHands := []string{"-help", "-data", "-config", "-port"}
var b bytes.Buffer
// Write defaults into buffer then remove any shorthands
flag.CommandLine.SetOutput(&b)
flag.PrintDefaults()
flag.CommandLine.SetOutput(os.Stderr)
scanner := bufio.NewScanner(&b)
out := ""
line := scanner.Text()
eof := !scanner.Scan()
lastLine := false
for !eof || lastLine {
nextline := scanner.Text()
start := 0
if len(nextline) != 0 {
for nextline[start] == ' ' && start < len(nextline) {
start++
}
}
if strings.Contains(line, "SHORTHAND") || (len(nextline) != 0 && strings.Contains(nextline, "SHORTHAND") && nextline[start] != '-') {
line = nextline
if lastLine {
break
}
eof := !scanner.Scan()
if eof {
lastLine = true
}
continue
}
// if !strings.Contains(line, "SHORTHAND") && !(strings.Contains(nextline, "SHORTHAND") && !strings.Contains(nextline, "-")) {
match := false
for i, c := range line {
if c != '-' {
continue
}
for _, s := range shortHands {
if i+len(s) <= len(line) && line[i:i+len(s)] == s {
out += line[:i+len(s)] + ", " + s[:2] + line[i+len(s):] + "\n"
match = true
break
}
}
}
if !match {
out += line + "\n"
}
line = nextline
if lastLine {
break
}
eof := !scanner.Scan()
if eof {
lastLine = true
}
}
fmt.Fprint(os.Stderr, out)
}

69
autostart.go Normal file
View File

@@ -0,0 +1,69 @@
// +build tray
package main
import (
"log"
"os"
"path/filepath"
"github.com/emersion/go-autostart"
"github.com/getlantern/systray"
)
type Autostart struct {
as *autostart.App
enabled bool
menuitem *systray.MenuItem
clicked chan bool
}
func NewAutostart(name, displayname, trayName, trayTooltip string) *Autostart {
a := &Autostart{
as: &autostart.App{
Name: name,
DisplayName: displayname,
},
enabled: true,
clicked: make(chan bool),
}
a.menuitem = systray.AddMenuItemCheckbox(trayName, trayTooltip, a.as.IsEnabled())
command := os.Args
command[0], _ = filepath.Abs(command[0])
// Make sure to replace any relative paths with absolute ones
pathArgs := []string{"-d", "-data", "-c", "-config"}
for i := 1; i < len(command); i++ {
isPath := false
for _, p := range pathArgs {
if command[i-1] == p {
isPath = true
break
}
}
if isPath {
command[i], _ = filepath.Abs(command[i])
}
}
a.as.Exec = command
return a
}
func (a *Autostart) HandleCheck() {
for range a.menuitem.ClickedCh {
if !a.menuitem.Checked() {
if err := a.as.Enable(); err != nil {
log.Printf("Failed to enable autostart on login: %v", err)
} else {
a.menuitem.Check()
log.Printf("Enabled autostart")
}
} else {
if err := a.as.Disable(); err != nil {
log.Printf("Failed to disable autostart on login: %v", err)
} else {
a.menuitem.Uncheck()
log.Printf("Disabled autostart")
}
}
}
}

View File

@@ -5,14 +5,14 @@ import (
"log"
)
// TimeoutHandler recovers from an http timeout.
// TimeoutHandler recovers from an http timeout or panic.
type TimeoutHandler func()
// NewTimeoutHandler returns a new Timeout handler.
func NewTimeoutHandler(name, addr string, noFail bool) TimeoutHandler {
return func() {
if r := recover(); r != nil {
out := fmt.Sprintf("Failed to authenticate with %s @ %s: Timed out", name, addr)
out := fmt.Sprintf("Failed to authenticate with %s @ \"%s\": Timed out", name, addr)
if noFail {
log.Print(out)
} else {

View File

@@ -12,6 +12,10 @@ import (
)
var emailEnabled = false
var messagesEnabled = false
var telegramEnabled = false
var discordEnabled = false
var matrixEnabled = false
func (app *appContext) GetPath(sect, key string) (fs.FS, string) {
val := app.config.Section(sect).Key(key).MustString("")
@@ -40,7 +44,7 @@ func (app *appContext) loadConfig() error {
key.SetValue(key.MustString(filepath.Join(app.dataPath, (key.Name() + ".json"))))
}
}
for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template", "invites", "emails", "user_template", "custom_emails", "users"} {
for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template", "invites", "emails", "user_template", "custom_emails", "users", "telegram_users", "discord_users", "matrix_users"} {
app.config.Section("files").Key(key).SetValue(app.config.Section("files").Key(key).MustString(filepath.Join(app.dataPath, (key + ".json"))))
}
app.URLBase = strings.TrimSuffix(app.config.Section("ui").Key("url_base").MustString(""), "/")
@@ -64,6 +68,12 @@ func (app *appContext) loadConfig() error {
app.MustSetValue("deletion", "email_html", "jfa-go:"+"deleted.html")
app.MustSetValue("deletion", "email_text", "jfa-go:"+"deleted.txt")
// Deletion template is good enough for these as well.
app.MustSetValue("disable_enable", "disabled_html", "jfa-go:"+"deleted.html")
app.MustSetValue("disable_enable", "disabled_text", "jfa-go:"+"deleted.txt")
app.MustSetValue("disable_enable", "enabled_html", "jfa-go:"+"deleted.html")
app.MustSetValue("disable_enable", "enabled_text", "jfa-go:"+"deleted.txt")
app.MustSetValue("welcome_email", "email_html", "jfa-go:"+"welcome.html")
app.MustSetValue("welcome_email", "email_text", "jfa-go:"+"welcome.txt")
@@ -74,15 +84,28 @@ func (app *appContext) loadConfig() error {
app.MustSetValue("user_expiry", "email_html", "jfa-go:"+"user-expired.html")
app.MustSetValue("user_expiry", "email_text", "jfa-go:"+"user-expired.txt")
app.MustSetValue("matrix", "topic", "Jellyfin notifications")
app.config.Section("jellyfin").Key("version").SetValue(version)
app.config.Section("jellyfin").Key("device").SetValue("jfa-go")
app.config.Section("jellyfin").Key("device_id").SetValue(fmt.Sprintf("jfa-go-%s-%s", version, commit))
if app.config.Section("email").Key("method").MustString("") == "" {
messagesEnabled = app.config.Section("messages").Key("enabled").MustBool(false)
telegramEnabled = app.config.Section("telegram").Key("enabled").MustBool(false)
discordEnabled = app.config.Section("discord").Key("enabled").MustBool(false)
matrixEnabled = app.config.Section("matrix").Key("enabled").MustBool(false)
if !messagesEnabled {
emailEnabled = false
telegramEnabled = false
discordEnabled = false
matrixEnabled = false
} else if app.config.Section("email").Key("method").MustString("") == "" {
emailEnabled = false
} else {
emailEnabled = true
}
if !emailEnabled && !telegramEnabled && !discordEnabled && !matrixEnabled {
messagesEnabled = false
}
app.MustSetValue("updates", "enabled", "true")
releaseChannel := app.config.Section("updates").Key("channel").String()
@@ -121,6 +144,8 @@ func (app *appContext) loadConfig() error {
}
app.storage.lang.chosenAdminLang = app.config.Section("ui").Key("language-admin").MustString("en-us")
app.storage.lang.chosenEmailLang = app.config.Section("email").Key("language").MustString("en-us")
app.storage.lang.chosenPWRLang = app.config.Section("password_resets").Key("language").MustString("en-us")
app.storage.lang.chosenTelegramLang = app.config.Section("telegram").Key("language").MustString("en-us")
app.email = NewEmailer(app)

View File

@@ -1,11 +1,4 @@
### fixconfig
Python's `json` library retains the order of data in a JSON file, which meant settings sent to the web page would be in the right order. Go's `encoding/json` and maps do not retain order, so this script opens the json file, and for each section, adds an "order" list which tells the web page in which order to display settings.
Python's `json` library retains the order of data in a JSON file, which meant settings sent to the web page would be in the right order. Go's `encoding/json` and maps do not retain order, so `enumerate/enumerate_config.py` opens the json file, and for each section, adds an "order" array which tells the web page in which order to display settings.
Specify the input and output files with `-i` and `-o` respectively.
### jsontostruct
Generates a go struct from `config-base.json`. I wrote this because i was annoyed with the `ini` library, but i've since realised mapping the ini values onto it is painful.

View File

@@ -124,7 +124,7 @@
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default Account Form Language. See issue #12 on Github if you'd like to translate."
"description": "Default Account Form Language. Visit weblate.hrfee.dev if you'd like to translate."
},
"language-admin": {
"name": "Default Admin Language",
@@ -135,7 +135,7 @@
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default Admin page Language. Settings has not been translated. Submit a PR on github if you'd like to translate."
"description": "Default Admin page Language. Settings has not been translated. Visit weblate.hrfee.dev if you'd like to translate."
},
"theme": {
"name": "Default Look",
@@ -345,33 +345,20 @@
}
}
},
"email": {
"messages": {
"order": [],
"meta": {
"name": "Email",
"description": "General email settings."
"name": "Messages/Notifications",
"description": "General settings for emails/messages."
},
"settings": {
"language": {
"name": "Email Language",
"required": false,
"requires_restart": false,
"depends_true": "method",
"type": "select",
"options": [
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default email language. Submit a PR on github if you'd like to translate."
},
"no_username": {
"name": "Use email addresses as username",
"required": false,
"requires_restart": false,
"depends_true": "method",
"enabled": {
"name": "Enabled",
"required": true,
"requires_restart": true,
"type": "bool",
"value": false,
"description": "Use email address from invite form as username on Jellyfin."
"value": true,
"description": "Enable the sending of emails/messages such as password resets, announcements, etc."
},
"use_24h": {
"name": "Use 24h time",
@@ -399,6 +386,37 @@
"type": "text",
"value": "Need help? contact me.",
"description": "Message displayed at bottom of emails."
}
}
},
"email": {
"order": [],
"meta": {
"name": "Email",
"description": "General email settings.",
"depends_true": "messages|enabled"
},
"settings": {
"language": {
"name": "Email Language",
"required": false,
"requires_restart": false,
"depends_true": "method",
"type": "select",
"options": [
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default email language. Submit a PR on github if you'd like to translate."
},
"no_username": {
"name": "Use email addresses as username",
"required": false,
"requires_restart": false,
"depends_true": "method",
"type": "bool",
"value": false,
"description": "Use email address from invite form as username on Jellyfin."
},
"method": {
"name": "Email method",
@@ -443,12 +461,301 @@
}
}
},
"mailgun": {
"order": [],
"meta": {
"name": "Mailgun (Email)",
"description": "Mailgun API connection settings",
"depends_true": "email|method"
},
"settings": {
"api_url": {
"name": "API URL",
"required": false,
"requires_restart": false,
"type": "text",
"value": "https://api.mailgun.net..."
},
"api_key": {
"name": "API Key",
"required": false,
"requires_restart": false,
"type": "text",
"value": "your api key"
}
}
},
"smtp": {
"order": [],
"meta": {
"name": "SMTP (Email)",
"description": "SMTP Server connection settings.",
"depends_true": "email|method"
},
"settings": {
"username": {
"name": "Username",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Username for SMTP. Leave blank to user send from address as username."
},
"encryption": {
"name": "Encryption Method",
"required": false,
"requires_restart": false,
"type": "select",
"options": [
["ssl_tls", "SSL/TLS"],
["starttls", "STARTTLS"]
],
"value": "starttls",
"description": "Your email provider should provide different ports for each encryption method. Generally 465 for ssl_tls, 587 for starttls."
},
"server": {
"name": "Server address",
"required": false,
"requires_restart": false,
"type": "text",
"value": "smtp.jellyf.in",
"description": "SMTP Server address."
},
"port": {
"name": "Port",
"required": false,
"requires_restart": false,
"type": "number",
"value": 465
},
"password": {
"name": "Password",
"required": false,
"requires_restart": false,
"type": "password",
"value": "smtp password"
},
"ssl_cert": {
"name": "Path to custom SSL certificate",
"required": false,
"requires_restart": false,
"advanced": true,
"type": "text",
"value": "",
"description": "Use if your SMTP server's SSL Certificate is not trusted by the system."
}
}
},
"discord": {
"order": [],
"meta": {
"name": "Discord",
"description": "Settings for Discord invites/signup/notifications"
},
"settings": {
"enabled": {
"name": "Enabled",
"required": false,
"requires_restart": true,
"type": "bool",
"value": false,
"description": "Enable signup verification through Discord and the sending of notifications through it.\nSee the jfa-go wiki for setting up a bot."
},
"required": {
"name": "Require on sign-up",
"required": false,
"required_restart": true,
"depends_true": "enabled",
"type": "bool",
"value": false,
"description": "Require Discord connection on sign-up. See the jfa-go wiki for info on setting this up."
},
"token": {
"name": "API Token",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "",
"description": "Discord Bot API Token."
},
"start_command": {
"name": "Start command",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "!start",
"description": "Command to start the user verification process."
},
"channel": {
"name": "Channel to monitor",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "",
"description": "Only listen to commands in specified channel. Leave blank to monitor all."
},
"provide_invite": {
"name": "Provide server invite",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "bool",
"value": false,
"description": "Generate a one-time discord server invite for the account creation form. Required Bot permission \"Create instant invite\", you may need to re-add the bot to your server after."
},
"invite_channel": {
"name": "Invite channel",
"required": false,
"requires_restart": true,
"depends_true": "provide_invite",
"type": "text",
"value": "",
"description": "Channel to invite new users to."
},
"language": {
"name": "Language",
"required": false,
"requires_restart": false,
"depends_true": "enabled",
"type": "select",
"options": [
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default Discord message language. Visit weblate if you'd like to translate."
}
}
},
"telegram": {
"order": [],
"meta": {
"name": "Telegram",
"description": "Settings for Telegram signup/notifications. See the jfa-go wiki for info on setting this up."
},
"settings": {
"enabled": {
"name": "Enabled",
"required": false,
"requires_restart": true,
"type": "bool",
"value": false,
"description": "Enable signup verification through Telegram and the sending of notifications through it.\nSee the jfa-go wiki for setting up a bot."
},
"required": {
"name": "Require on sign-up",
"required": false,
"required_restart": true,
"depends_true": "enabled",
"type": "bool",
"value": false,
"description": "Require telegram connection on sign-up."
},
"token": {
"name": "API Token",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "",
"description": "Telegram Bot API Token."
},
"language": {
"name": "Language",
"required": false,
"requires_restart": false,
"depends_true": "enabled",
"type": "select",
"options": [
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default telegram message language. Visit weblate if you'd like to translate."
}
}
},
"matrix": {
"order": [],
"meta": {
"name": "Matrix",
"description": "Settings for Matrix invites/signup/notifications. See the jfa-go wiki for info on setting this up."
},
"settings": {
"enabled": {
"name": "Enabled",
"required": false,
"requires_restart": true,
"type": "bool",
"value": false,
"description": "Enable signup verification through Matrix and the sending of notifications through it.\nSee the jfa-go wiki for setting up a bot."
},
"required": {
"name": "Require on sign-up",
"required": false,
"required_restart": true,
"depends_true": "enabled",
"type": "bool",
"value": false,
"description": "Require Matrix connection on sign-up."
},
"homeserver": {
"name": "Home Server URL",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "",
"description": "Matrix Home server URL."
},
"token": {
"name": "Access Token",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "",
"description": "Matrix Bot API Token."
},
"user_id": {
"name": "Bot User ID",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "",
"description": "User ID of bot account (Example: @jfa-bot:riot.im)"
},
"topic": {
"name": "Chat topic",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "text",
"value": "Jellyfin notifications",
"description": "Topic of Matrix private chats."
},
"language": {
"name": "Language",
"required": false,
"requires_restart": false,
"depends_true": "enabled",
"type": "select",
"options": [
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default Matrix message language. Visit weblate if you'd like to translate."
}
}
},
"password_resets": {
"order": [],
"meta": {
"name": "Password Resets",
"description": "Settings for the password reset handler.",
"depends_true": "email|method"
"depends_true": "messages|enabled"
},
"settings": {
"enabled": {
@@ -468,6 +775,36 @@
"value": "/path/to/jellyfin",
"description": "Path to the folder Jellyfin puts password-reset files."
},
"link_reset": {
"name": "Use reset link instead of PIN (Required for Ombi)",
"required": false,
"requires_restart": true,
"depends_true": "enabled",
"type": "bool",
"value": false,
"description": "Send users a link to reset their password instead of a PIN. Must be enabled to reset Ombi password at the same time as the Jellyfin password."
},
"set_password": {
"name": "Set password through link",
"required": false,
"requires_restart": true,
"depends_true": "link_reset",
"type": "bool",
"value": false,
"description": "Instead of automatically setting the user's password to the PIN, allow them to set a new password through the reset link."
},
"language": {
"name": "Default reset link language",
"required": false,
"requires_restart": true,
"depends_true": "link_reset",
"type": "select",
"options": [
["en-us", "English (US)"]
],
"value": "en-us",
"description": "Default language for password reset success screen."
},
"email_html": {
"name": "Custom email (HTML)",
"required": false,
@@ -559,7 +896,7 @@
"meta": {
"name": "Notifications",
"description": "Notification related settings.",
"depends_true": "email|method"
"depends_true": "messages|enabled"
},
"settings": {
"enabled": {
@@ -612,96 +949,11 @@
}
}
},
"mailgun": {
"order": [],
"meta": {
"name": "Mailgun (Email)",
"description": "Mailgun API connection settings",
"depends_true": "email|method"
},
"settings": {
"api_url": {
"name": "API URL",
"required": false,
"requires_restart": false,
"type": "text",
"value": "https://api.mailgun.net..."
},
"api_key": {
"name": "API Key",
"required": false,
"requires_restart": false,
"type": "text",
"value": "your api key"
}
}
},
"smtp": {
"order": [],
"meta": {
"name": "SMTP (Email)",
"description": "SMTP Server connection settings.",
"depends_true": "email|method"
},
"settings": {
"username": {
"name": "Username",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Username for SMTP. Leave blank to user send from address as username."
},
"encryption": {
"name": "Encryption Method",
"required": false,
"requires_restart": false,
"type": "select",
"options": [
["ssl_tls", "SSL/TLS"],
["starttls", "STARTTLS"]
],
"value": "starttls",
"description": "Your email provider should provide different ports for each encryption method. Generally 465 for ssl_tls, 587 for starttls."
},
"server": {
"name": "Server address",
"required": false,
"requires_restart": false,
"type": "text",
"value": "smtp.jellyf.in",
"description": "SMTP Server address."
},
"port": {
"name": "Port",
"required": false,
"requires_restart": false,
"type": "number",
"value": 465
},
"password": {
"name": "Password",
"required": false,
"requires_restart": false,
"type": "password",
"value": "smtp password"
},
"ssl_cert": {
"name": "Path to custom SSL certificate",
"required": false,
"requires_restart": false,
"advanced": true,
"type": "text",
"value": "",
"description": "Use if your SMTP server's SSL Certificate is not trusted by the system."
}
}
},
"ombi": {
"order": [],
"meta": {
"name": "Ombi Integration",
"description": "Connect to Ombi to automatically create both Ombi and Jellyfin accounts for new users. You'll need to create a user template for this to work. Once enabled, refresh to see an option in settings for this."
"description": "Connect to Ombi to automatically create both Ombi and Jellyfin accounts for new users. You'll need to create a user template for this to work. Once enabled, refresh to see an option in settings for this. To handle password resets for Ombi & Jellyfin, enable \"Use reset link instead of PIN\"."
},
"settings": {
"enabled": {
@@ -735,9 +987,9 @@
"welcome_email": {
"order": [],
"meta": {
"name": "Welcome Emails",
"description": "Optionally send a welcome email to new users with the Jellyfin URL and their username.",
"depends_true": "email|method"
"name": "Welcome Message",
"description": "Optionally send a welcome message to new users with the Jellyfin URL and their username.",
"depends_true": "messages|enabled"
},
"settings": {
"enabled": {
@@ -844,14 +1096,14 @@
"requires_restart": false,
"type": "bool",
"value": true,
"depends_true": "email|method",
"depends_true": "messages|enabled",
"description": "Send an email when a user's account expires."
},
"subject": {
"name": "Email subject",
"required": false,
"requires_restart": false,
"depends_true": "email|method",
"depends_true": "messages|enabled",
"type": "text",
"value": "",
"description": "Subject of user expiry emails."
@@ -861,7 +1113,7 @@
"required": false,
"requires_restart": false,
"advanced": true,
"depends_true": "email|method",
"depends_true": "messages|enabled",
"type": "text",
"value": "",
"description": "Path to custom email html"
@@ -871,7 +1123,69 @@
"required": false,
"requires_restart": false,
"advanced": true,
"depends_true": "email|method",
"depends_true": "messages|enabled",
"type": "text",
"value": "",
"description": "Path to custom email in plain text"
}
}
},
"disable_enable": {
"order": [],
"meta": {
"name": "Account Disabling/Enabling",
"description": "Subject/email files for account disabling/enabling emails.",
"depends_true": "messages|enabled"
},
"settings": {
"subject_disabled": {
"name": "Email subject (Disabled)",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Subject of account disabling emails."
},
"subject_enabled": {
"name": "Email subject (Enabled)",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Subject of account enabling emails."
},
"disabled_html": {
"name": "Custom disabling email (HTML)",
"required": false,
"requires_restart": false,
"advanced": true,
"type": "text",
"value": "",
"description": "Path to custom email html"
},
"disabled_text": {
"name": "Custom disabling email (plaintext)",
"required": false,
"requires_restart": false,
"advanced": true,
"type": "text",
"value": "",
"description": "Path to custom email in plain text"
},
"enabled_html": {
"name": "Custom enabling email (HTML)",
"required": false,
"requires_restart": false,
"advanced": true,
"type": "text",
"value": "",
"description": "Path to custom email html"
},
"enabled_text": {
"name": "Custom enabling email (plaintext)",
"required": false,
"requires_restart": false,
"advanced": true,
"type": "text",
"value": "",
"description": "Path to custom email in plain text"
@@ -883,7 +1197,7 @@
"meta": {
"name": "Account Deletion",
"description": "Subject/email files for account deletion emails.",
"depends_true": "email|method"
"depends_true": "messages|enabled"
},
"settings": {
"subject": {
@@ -930,6 +1244,14 @@
"value": "",
"description": "Location of stored invites (json)."
},
"password_resets": {
"name": "Password Resets",
"required": false,
"requires_restart": true,
"type": "text",
"value": "",
"description": "Location of stored non-Jellyfin password resets (json)."
},
"emails": {
"name": "Email Addresses",
"required": false,
@@ -985,6 +1307,30 @@
"type": "text",
"value": "",
"description": "JSON file generated by program in settings, different from email_html/email_text. See wiki for more info."
},
"telegram_users": {
"name": "Telegram users",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Stores telegram user IDs and language preferences."
},
"matrix_users": {
"name": "Matrix users",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Stores matrix user IDs and language preferences."
},
"discord_users": {
"name": "Discord users",
"required": false,
"requires_restart": false,
"type": "text",
"value": "",
"description": "Stores discord user IDs and language preferences."
}
}
}

View File

@@ -1,541 +0,0 @@
package main
type Metadata struct{
Name string `json:"name"`
Description string `json:"description"`
}
type Config struct{
Order []string `json:"order"`
Jellyfin struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Username struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"username"`
} `json:"username" cfg:"username"`
Password struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"password"`
} `json:"password" cfg:"password"`
Server struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"server"`
} `json:"server" cfg:"server"`
PublicServer struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"public_server"`
} `json:"public_server" cfg:"public_server"`
Client struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"client"`
} `json:"client" cfg:"client"`
Version struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"version"`
} `json:"version" cfg:"version"`
Device struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"device"`
} `json:"device" cfg:"device"`
DeviceId struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"device_id"`
} `json:"device_id" cfg:"device_id"`
} `json:"jellyfin"`
Ui struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Theme struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Options []string `json:"options"`
Value string `json:"value" cfg:"theme"`
} `json:"theme" cfg:"theme"`
Host struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"host"`
} `json:"host" cfg:"host"`
Port struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value int `json:"value" cfg:"port"`
} `json:"port" cfg:"port"`
JellyfinLogin struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"jellyfin_login"`
} `json:"jellyfin_login" cfg:"jellyfin_login"`
AdminOnly struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"admin_only"`
} `json:"admin_only" cfg:"admin_only"`
Username struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"username"`
} `json:"username" cfg:"username"`
Password struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"password"`
} `json:"password" cfg:"password"`
Email struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"email"`
} `json:"email" cfg:"email"`
Debug struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"debug"`
} `json:"debug" cfg:"debug"`
ContactMessage struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"contact_message"`
} `json:"contact_message" cfg:"contact_message"`
HelpMessage struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"help_message"`
} `json:"help_message" cfg:"help_message"`
SuccessMessage struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"success_message"`
} `json:"success_message" cfg:"success_message"`
Bs5 struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"bs5"`
} `json:"bs5" cfg:"bs5"`
} `json:"ui"`
PasswordValidation struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Enabled struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"enabled"`
} `json:"enabled" cfg:"enabled"`
MinLength struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"min_length"`
} `json:"min_length" cfg:"min_length"`
Upper struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"upper"`
} `json:"upper" cfg:"upper"`
Lower struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"lower"`
} `json:"lower" cfg:"lower"`
Number struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"number"`
} `json:"number" cfg:"number"`
Special struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"special"`
} `json:"special" cfg:"special"`
} `json:"password_validation"`
Email struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
NoUsername struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"no_username"`
} `json:"no_username" cfg:"no_username"`
Use24H struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"use_24h"`
} `json:"use_24h" cfg:"use_24h"`
DateFormat struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"date_format"`
} `json:"date_format" cfg:"date_format"`
Message struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"message"`
} `json:"message" cfg:"message"`
Method struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Options []string `json:"options"`
Value string `json:"value" cfg:"method"`
} `json:"method" cfg:"method"`
Address struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"address"`
} `json:"address" cfg:"address"`
From struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"from"`
} `json:"from" cfg:"from"`
} `json:"email"`
PasswordResets struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Enabled struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"enabled"`
} `json:"enabled" cfg:"enabled"`
WatchDirectory struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"watch_directory"`
} `json:"watch_directory" cfg:"watch_directory"`
EmailHtml struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"email_html"`
} `json:"email_html" cfg:"email_html"`
EmailText struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"email_text"`
} `json:"email_text" cfg:"email_text"`
Subject struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"subject"`
} `json:"subject" cfg:"subject"`
} `json:"password_resets"`
InviteEmails struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Enabled struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"enabled"`
} `json:"enabled" cfg:"enabled"`
EmailHtml struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"email_html"`
} `json:"email_html" cfg:"email_html"`
EmailText struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"email_text"`
} `json:"email_text" cfg:"email_text"`
Subject struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"subject"`
} `json:"subject" cfg:"subject"`
UrlBase struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"url_base"`
} `json:"url_base" cfg:"url_base"`
} `json:"invite_emails"`
Notifications struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Enabled struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value bool `json:"value" cfg:"enabled"`
} `json:"enabled" cfg:"enabled"`
ExpiryHtml struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"expiry_html"`
} `json:"expiry_html" cfg:"expiry_html"`
ExpiryText struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"expiry_text"`
} `json:"expiry_text" cfg:"expiry_text"`
CreatedHtml struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"created_html"`
} `json:"created_html" cfg:"created_html"`
CreatedText struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"created_text"`
} `json:"created_text" cfg:"created_text"`
} `json:"notifications"`
Mailgun struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
ApiUrl struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"api_url"`
} `json:"api_url" cfg:"api_url"`
ApiKey struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"api_key"`
} `json:"api_key" cfg:"api_key"`
} `json:"mailgun"`
Smtp struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Encryption struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Options []string `json:"options"`
Value string `json:"value" cfg:"encryption"`
} `json:"encryption" cfg:"encryption"`
Server struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"server"`
} `json:"server" cfg:"server"`
Port struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value int `json:"value" cfg:"port"`
} `json:"port" cfg:"port"`
Password struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"password"`
} `json:"password" cfg:"password"`
} `json:"smtp"`
Files struct{
Order []string `json:"order"`
Meta Metadata `json:"meta"`
Invites struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"invites"`
} `json:"invites" cfg:"invites"`
Emails struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"emails"`
} `json:"emails" cfg:"emails"`
UserTemplate struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"user_template"`
} `json:"user_template" cfg:"user_template"`
UserConfiguration struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"user_configuration"`
} `json:"user_configuration" cfg:"user_configuration"`
UserDisplayprefs struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"user_displayprefs"`
} `json:"user_displayprefs" cfg:"user_displayprefs"`
CustomCss struct{
Name string `json:"name"`
Required bool `json:"required"`
Restart bool `json:"requires_restart"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value" cfg:"custom_css"`
} `json:"custom_css" cfg:"custom_css"`
} `json:"files"`
}

View File

@@ -30,15 +30,20 @@
}
}
@media screen and (max-width: 750px) {
@media screen and (max-width: 1000px) {
:root {
font-size: 0.9rem;
}
.table-responsive table {
min-width: 660px;
min-width: 800px;
}
}
.chip.btn:hover:not([disabled]):not(.textarea),
.chip.btn:focus:not([disabled]):not(.textarea) {
filter: brightness(var(--button-filter-brightness,95%));
}
.banner {
margin: calc(-1 * var(--spacing-4,1rem));
}
@@ -52,6 +57,11 @@
padding: var(--spacing-4,1rem);
}
.modal-content .banner {
margin-left: calc(-1 * var(--spacing-4,1rem) - 0.5%); /* Not sure why this is necessary */
margin-right: calc(-1 * var(--spacing-4,1rem) - 0.5%);
}
div.card:contains(section.banner.footer) {
padding-bottom: 0px;
}
@@ -96,6 +106,10 @@ div.card:contains(section.banner.footer) {
margin-right: 1rem;
}
.p-1 {
padding: 1rem;
}
.pb-1 {
padding-bottom: 1rem;
}
@@ -112,6 +126,14 @@ div.card:contains(section.banner.footer) {
text-align: right;
}
.ac {
text-align: center;
}
.w-100 {
width: 100%;
}
.inline-block {
display: inline-block;
}
@@ -153,6 +175,12 @@ div.card:contains(section.banner.footer) {
margin: 0.5rem;
}
p.sm,
span.sm:not(.heading) {
font-size: 0.75rem;
}
.col.sm {
margin: .25rem;
}
@@ -400,6 +428,7 @@ p.top {
.table-responsive {
overflow-x: auto;
font-size: 0.9rem;
}
#notification-box {
@@ -414,6 +443,10 @@ p.top {
margin-bottom: -0.5rem;
}
.dropdown-display.lg {
white-space: nowrap;
}
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
@@ -450,7 +483,53 @@ a:hover:not(.lang-link):not(.\~urge), a:active:not(.lang-link):not(.\~urge) {
color: var(--color-urge-200);
}
.link-center {
display: block;
text-align: center;
}
.search {
max-width: 15rem;
min-width: 10rem;
}
td.img-circle {
width: 32px;
height: 32px;
}
span.img-circle.lg {
width: 64px;
height: 64px;
}
span.shield.img-circle {
padding: 0.2rem;
}
img.img-circle {
border-radius: 50%;
vertical-align: middle;
}
.table td.sm {
padding-top: 0.1rem;
padding-bottom: 0.1rem;
}
.table-inline {
display: flex !important;
align-items: center;
}
div.card:contains(section.banner.footer) {
padding-bottom: 0px;
}
.card.sectioned {
padding: 0px;
}
.card.sectioned .section {
padding: var(--spacing-4, 1rem);
}

410
discord.go Normal file
View File

@@ -0,0 +1,410 @@
package main
import (
"fmt"
"strings"
dg "github.com/bwmarrin/discordgo"
)
type DiscordDaemon struct {
Stopped bool
ShutdownChannel chan string
bot *dg.Session
username string
tokens []string
verifiedTokens map[string]DiscordUser // Map of tokens to discord users.
channelID, channelName, inviteChannelID, inviteChannelName string
guildID string
serverChannelName, serverName string
users map[string]DiscordUser // Map of user IDs to users. Added to on first interaction, and loaded from app.storage.discord on start.
app *appContext
}
func newDiscordDaemon(app *appContext) (*DiscordDaemon, error) {
token := app.config.Section("discord").Key("token").String()
if token == "" {
return nil, fmt.Errorf("token was blank")
}
bot, err := dg.New("Bot " + token)
if err != nil {
return nil, err
}
dd := &DiscordDaemon{
Stopped: false,
ShutdownChannel: make(chan string),
bot: bot,
tokens: []string{},
verifiedTokens: map[string]DiscordUser{},
users: map[string]DiscordUser{},
app: app,
}
for _, user := range app.storage.discord {
dd.users[user.ID] = user
}
return dd, nil
}
// NewAuthToken generates an 8-character pin in the form "A1-2B-CD".
func (d *DiscordDaemon) NewAuthToken() string {
pin := genAuthToken()
d.tokens = append(d.tokens, pin)
return pin
}
func (d *DiscordDaemon) NewUnknownUser(channelID, userID, discrim, username string) DiscordUser {
user := DiscordUser{
ChannelID: channelID,
ID: userID,
Username: username,
Discriminator: discrim,
}
return user
}
func (d *DiscordDaemon) MustGetUser(channelID, userID, discrim, username string) DiscordUser {
if user, ok := d.users[userID]; ok {
return user
}
return d.NewUnknownUser(channelID, userID, discrim, username)
}
func (d *DiscordDaemon) run() {
d.bot.AddHandler(d.messageHandler)
d.bot.Identify.Intents = dg.IntentsGuildMessages | dg.IntentsDirectMessages | dg.IntentsGuildMembers | dg.IntentsGuildInvites
if err := d.bot.Open(); err != nil {
d.app.err.Printf("Discord: Failed to start daemon: %v", err)
return
}
// Wait for everything to populate, it's slow sometimes.
for d.bot.State == nil {
continue
}
for d.bot.State.User == nil {
continue
}
d.username = d.bot.State.User.Username
for d.bot.State.Guilds == nil {
continue
}
// Choose the last guild (server), for now we don't really support multiple anyway
d.guildID = d.bot.State.Guilds[len(d.bot.State.Guilds)-1].ID
guild, err := d.bot.Guild(d.guildID)
if err != nil {
d.app.err.Printf("Discord: Failed to get guild: %v", err)
}
d.serverChannelName = guild.Name
d.serverName = guild.Name
if channel := d.app.config.Section("discord").Key("channel").String(); channel != "" {
d.channelName = channel
d.serverChannelName += "/" + channel
}
if d.app.config.Section("discord").Key("provide_invite").MustBool(false) {
if invChannel := d.app.config.Section("discord").Key("invite_channel").String(); invChannel != "" {
d.inviteChannelName = invChannel
}
}
defer d.bot.Close()
<-d.ShutdownChannel
d.ShutdownChannel <- "Down"
return
}
// NewTempInvite creates an invite link, and returns the invite URL, as well as the URL for the server icon.
func (d *DiscordDaemon) NewTempInvite(ageSeconds, maxUses int) (inviteURL, iconURL string) {
var inv *dg.Invite
var err error
if d.inviteChannelName == "" {
d.app.err.Println("Discord: Cannot create invite without channel specified in settings.")
return
}
if d.inviteChannelID == "" {
channels, err := d.bot.GuildChannels(d.guildID)
if err != nil {
d.app.err.Printf("Discord: Couldn't get channel list: %v", err)
return
}
found := false
for _, channel := range channels {
// channel, err := d.bot.Channel(ch.ID)
// if err != nil {
// d.app.err.Printf("Discord: Couldn't get channel: %v", err)
// return
// }
if channel.Name == d.inviteChannelName {
d.inviteChannelID = channel.ID
found = true
break
}
}
if !found {
d.app.err.Printf("Discord: Couldn't find invite channel \"%s\"", d.inviteChannelName)
return
}
}
// channel, err := d.bot.Channel(d.inviteChannelID)
// if err != nil {
// d.app.err.Printf("Discord: Couldn't get invite channel: %v", err)
// return
// }
inv, err = d.bot.ChannelInviteCreate(d.inviteChannelID, dg.Invite{
// Guild: d.bot.State.Guilds[len(d.bot.State.Guilds)-1],
// Channel: channel,
// Inviter: d.bot.State.User,
MaxAge: ageSeconds,
MaxUses: maxUses,
Temporary: false,
})
if err != nil {
d.app.err.Printf("Discord: Failed to create invite: %v", err)
return
}
inviteURL = "https://discord.gg/" + inv.Code
guild, err := d.bot.Guild(d.guildID)
if err != nil {
d.app.err.Printf("Discord: Failed to get guild: %v", err)
return
}
iconURL = guild.IconURL()
return
}
// Returns the user(s) roughly corresponding to the username (if they are in the guild).
// if no discriminator (#xxxx) is given in the username and there are multiple corresponding users, a list of all matching users is returned.
func (d *DiscordDaemon) GetUsers(username string) []*dg.Member {
members, err := d.bot.GuildMembers(
d.guildID,
"",
1000,
)
if err != nil {
d.app.err.Printf("Discord: Failed to get members: %v", err)
return nil
}
hasDiscriminator := strings.Contains(username, "#")
var users []*dg.Member
for _, member := range members {
if hasDiscriminator {
if member.User.Username+"#"+member.User.Discriminator == username {
return []*dg.Member{member}
}
}
if strings.Contains(member.User.Username, username) {
users = append(users, member)
}
}
return users
}
func (d *DiscordDaemon) NewUser(ID string) (user DiscordUser, ok bool) {
u, err := d.bot.User(ID)
if err != nil {
d.app.err.Printf("Discord: Failed to get user: %v", err)
return
}
user.ID = ID
user.Username = u.Username
user.Contact = true
user.Discriminator = u.Discriminator
channel, err := d.bot.UserChannelCreate(ID)
if err != nil {
d.app.err.Printf("Discord: Failed to create DM channel: %v", err)
return
}
user.ChannelID = channel.ID
ok = true
return
}
func (d *DiscordDaemon) Shutdown() {
d.Stopped = true
d.ShutdownChannel <- "Down"
<-d.ShutdownChannel
close(d.ShutdownChannel)
}
func (d *DiscordDaemon) messageHandler(s *dg.Session, m *dg.MessageCreate) {
if m.GuildID != "" && d.channelName != "" {
if d.channelID == "" {
channel, err := s.Channel(m.ChannelID)
if err != nil {
d.app.err.Printf("Discord: Couldn't get channel, will monitor all: %v", err)
d.channelName = ""
}
if channel.Name == d.channelName {
d.channelID = channel.ID
}
}
if d.channelID != m.ChannelID {
d.app.debug.Printf("Discord: Ignoring message as not in specified channel")
return
}
}
if m.Author.ID == s.State.User.ID {
return
}
sects := strings.Split(m.Content, " ")
if len(sects) == 0 {
return
}
lang := d.app.storage.lang.chosenTelegramLang
if user, ok := d.users[m.Author.ID]; ok {
if _, ok := d.app.storage.lang.Telegram[user.Lang]; ok {
lang = user.Lang
}
}
switch msg := sects[0]; msg {
case d.app.config.Section("discord").Key("start_command").MustString("!start"):
d.commandStart(s, m, lang)
case "!lang":
d.commandLang(s, m, sects, lang)
default:
d.commandPIN(s, m, sects, lang)
}
}
func (d *DiscordDaemon) commandStart(s *dg.Session, m *dg.MessageCreate, lang string) {
channel, err := s.UserChannelCreate(m.Author.ID)
if err != nil {
d.app.err.Printf("Discord: Failed to create private channel with \"%s\": %v", m.Author.Username, err)
return
}
user := d.MustGetUser(channel.ID, m.Author.ID, m.Author.Discriminator, m.Author.Username)
d.users[m.Author.ID] = user
content := d.app.storage.lang.Telegram[lang].Strings.get("startMessage") + "\n"
content += d.app.storage.lang.Telegram[lang].Strings.template("languageMessage", tmpl{"command": "!lang"})
_, err = s.ChannelMessageSend(channel.ID, content)
if err != nil {
d.app.err.Printf("Discord: Failed to send message to \"%s\": %v", m.Author.Username, err)
return
}
}
func (d *DiscordDaemon) commandLang(s *dg.Session, m *dg.MessageCreate, sects []string, lang string) {
if len(sects) == 1 {
list := "!lang <lang>\n"
for code := range d.app.storage.lang.Telegram {
list += fmt.Sprintf("%s: %s\n", code, d.app.storage.lang.Telegram[code].Meta.Name)
}
_, err := s.ChannelMessageSendReply(
m.ChannelID,
list,
m.Reference(),
)
if err != nil {
d.app.err.Printf("Discord: Failed to send message to \"%s\": %v", m.Author.Username, err)
}
return
}
if _, ok := d.app.storage.lang.Telegram[sects[1]]; ok {
var user DiscordUser
for jfID, user := range d.app.storage.discord {
if user.ID == m.Author.ID {
user.Lang = sects[1]
d.app.storage.discord[jfID] = user
if err := d.app.storage.storeDiscordUsers(); err != nil {
d.app.err.Printf("Failed to store Discord users: %v", err)
}
break
}
}
d.users[m.Author.ID] = user
}
}
func (d *DiscordDaemon) commandPIN(s *dg.Session, m *dg.MessageCreate, sects []string, lang string) {
if _, ok := d.users[m.Author.ID]; ok {
channel, err := s.Channel(m.ChannelID)
if err != nil {
d.app.err.Printf("Discord: Failed to get channel: %v", err)
return
}
if channel.Type != dg.ChannelTypeDM {
d.app.debug.Println("Discord: Ignoring message as not a DM")
return
}
} else {
d.app.debug.Println("Discord: Ignoring message as user was not found")
return
}
tokenIndex := -1
for i, token := range d.tokens {
if sects[0] == token {
tokenIndex = i
break
}
}
if tokenIndex == -1 {
_, err := s.ChannelMessageSend(
m.ChannelID,
d.app.storage.lang.Telegram[lang].Strings.get("invalidPIN"),
)
if err != nil {
d.app.err.Printf("Discord: Failed to send message to \"%s\": %v", m.Author.Username, err)
}
return
}
_, err := s.ChannelMessageSend(
m.ChannelID,
d.app.storage.lang.Telegram[lang].Strings.get("pinSuccess"),
)
if err != nil {
d.app.err.Printf("Discord: Failed to send message to \"%s\": %v", m.Author.Username, err)
}
d.verifiedTokens[sects[0]] = d.users[m.Author.ID]
d.tokens[len(d.tokens)-1], d.tokens[tokenIndex] = d.tokens[tokenIndex], d.tokens[len(d.tokens)-1]
d.tokens = d.tokens[:len(d.tokens)-1]
}
func (d *DiscordDaemon) SendDM(message *Message, userID ...string) error {
channels := make([]string, len(userID))
for i, id := range userID {
channel, err := d.bot.UserChannelCreate(id)
if err != nil {
return err
}
channels[i] = channel.ID
}
return d.Send(message, channels...)
}
func (d *DiscordDaemon) Send(message *Message, channelID ...string) error {
msg := ""
var embeds []*dg.MessageEmbed
if message.Markdown != "" {
msg, embeds = StripAltText(message.Markdown, true)
} else {
msg = message.Text
}
for _, id := range channelID {
var err error
if len(embeds) != 0 {
_, err = d.bot.ChannelMessageSendComplex(
id,
&dg.MessageSend{
Content: msg,
Embed: embeds[0],
},
)
if err != nil {
return err
}
for i := 1; i < len(embeds); i++ {
_, err := d.bot.ChannelMessageSendEmbed(id, embeds[i])
if err != nil {
return err
}
}
} else {
_, err := d.bot.ChannelMessageSend(
id,
msg,
)
if err != nil {
return err
}
}
}
return nil
}

482
email.go
View File

@@ -9,8 +9,10 @@ import (
"fmt"
"html/template"
"io"
"io/fs"
"net/smtp"
"os"
"strconv"
"strings"
"sync"
textTemplate "text/template"
@@ -18,14 +20,23 @@ import (
"github.com/gomarkdown/markdown"
"github.com/gomarkdown/markdown/html"
"github.com/itchyny/timefmt-go"
jEmail "github.com/jordan-wright/email"
"github.com/knz/strtime"
"github.com/mailgun/mailgun-go/v4"
)
var renderer = html.NewRenderer(html.RendererOptions{Flags: html.Smartypants})
// implements email sending, right now via smtp or mailgun.
type emailClient interface {
send(fromName, fromAddr string, email *Email, address ...string) error
type EmailClient interface {
Send(fromName, fromAddr string, message *Message, address ...string) error
}
type DummyClient struct{}
func (dc *DummyClient) Send(fromName, fromAddr string, email *Message, address ...string) error {
fmt.Printf("FROM: %s <%s>\nTO: %s\nTEXT: %s\n", fromName, fromAddr, strings.Join(address, ", "), email.Text)
return nil
}
// Mailgun client implements emailClient.
@@ -33,7 +44,7 @@ type Mailgun struct {
client *mailgun.MailgunImpl
}
func (mg *Mailgun) send(fromName, fromAddr string, email *Email, address ...string) error {
func (mg *Mailgun) Send(fromName, fromAddr string, email *Message, address ...string) error {
message := mg.client.NewMessage(
fmt.Sprintf("%s <%s>", fromName, fromAddr),
email.Subject,
@@ -59,7 +70,7 @@ type SMTP struct {
tlsConfig *tls.Config
}
func (sm *SMTP) send(fromName, fromAddr string, email *Email, address ...string) error {
func (sm *SMTP) Send(fromName, fromAddr string, email *Message, address ...string) error {
server := fmt.Sprintf("%s:%d", sm.server, sm.port)
from := fmt.Sprintf("%s <%s>", fromName, fromAddr)
var wg sync.WaitGroup
@@ -85,36 +96,37 @@ func (sm *SMTP) send(fromName, fromAddr string, email *Email, address ...string)
return err
}
// Emailer contains the email sender, email content, and methods to construct message content.
// Emailer contains the email sender, translations, and methods to construct messages.
type Emailer struct {
fromAddr, fromName string
lang emailLang
sender emailClient
sender EmailClient
}
// Email stores content.
type Email struct {
Subject string `json:"subject"`
HTML string `json:"html"`
Text string `json:"text"`
// Message stores content.
type Message struct {
Subject string `json:"subject"`
HTML string `json:"html"`
Text string `json:"text"`
Markdown string `json:"markdown"`
}
func (emailer *Emailer) formatExpiry(expiry time.Time, tzaware bool, datePattern, timePattern string) (d, t, expiresIn string) {
d, _ = strtime.Strftime(expiry, datePattern)
t, _ = strtime.Strftime(expiry, timePattern)
d = timefmt.Format(expiry, datePattern)
t = timefmt.Format(expiry, timePattern)
currentTime := time.Now()
if tzaware {
currentTime = currentTime.UTC()
}
_, _, days, hours, minutes, _ := timeDiff(expiry, currentTime)
if days != 0 {
expiresIn += fmt.Sprintf("%dd ", days)
expiresIn += strconv.Itoa(days) + "d "
}
if hours != 0 {
expiresIn += fmt.Sprintf("%dh ", hours)
expiresIn += strconv.Itoa(hours) + "h "
}
if minutes != 0 {
expiresIn += fmt.Sprintf("%dm ", minutes)
expiresIn += strconv.Itoa(minutes) + "m "
}
expiresIn = strings.TrimSuffix(expiresIn, " ")
return
@@ -145,6 +157,8 @@ func NewEmailer(app *appContext) *Emailer {
}
} else if method == "mailgun" {
emailer.NewMailgun(app.config.Section("mailgun").Key("api_url").String(), app.config.Section("mailgun").Key("api_key").String())
} else if method == "dummy" {
emailer.sender = &DummyClient{}
}
return emailer
}
@@ -165,6 +179,20 @@ func (emailer *Emailer) NewMailgun(url, key string) {
// NewSMTP returns an SMTP emailClient.
func (emailer *Emailer) NewSMTP(server string, port int, username, password string, sslTLS bool, certPath string) (err error) {
// x509.SystemCertPool is unavailable on windows
if PLATFORM == "windows" {
emailer.sender = &SMTP{
auth: smtp.PlainAuth("", username, password, server),
server: server,
port: port,
sslTLS: sslTLS,
tlsConfig: &tls.Config{
InsecureSkipVerify: false,
ServerName: server,
},
}
return
}
rootCAs, err := x509.SystemCertPool()
if rootCAs == nil || err != nil {
rootCAs = x509.NewCertPool()
@@ -194,7 +222,7 @@ type templ interface {
Execute(wr io.Writer, data interface{}) error
}
func (emailer *Emailer) construct(app *appContext, section, keyFragment string, data map[string]interface{}) (html, text string, err error) {
func (emailer *Emailer) construct(app *appContext, section, keyFragment string, data map[string]interface{}) (html, text, markdown string, err error) {
var tpl templ
if substituteStrings == "" {
data["jellyfin"] = "Jellyfin"
@@ -202,14 +230,30 @@ func (emailer *Emailer) construct(app *appContext, section, keyFragment string,
data["jellyfin"] = substituteStrings
}
var keys []string
if app.config.Section("email").Key("plaintext").MustBool(false) {
keys = []string{"text"}
text = ""
plaintext := app.config.Section("email").Key("plaintext").MustBool(false)
if plaintext {
if telegramEnabled || discordEnabled {
keys = []string{"text"}
text, markdown = "", ""
} else {
keys = []string{"text"}
text = ""
}
} else {
keys = []string{"html", "text"}
if telegramEnabled || discordEnabled {
keys = []string{"html", "text", "markdown"}
} else {
keys = []string{"html", "text"}
}
}
for _, key := range keys {
filesystem, fpath := app.GetPath(section, keyFragment+key)
var filesystem fs.FS
var fpath string
if key == "markdown" {
filesystem, fpath = app.GetPath(section, keyFragment+"text")
} else {
filesystem, fpath = app.GetPath(section, keyFragment+key)
}
if key == "html" {
tpl, err = template.ParseFS(filesystem, fpath)
} else {
@@ -218,15 +262,28 @@ func (emailer *Emailer) construct(app *appContext, section, keyFragment string,
if err != nil {
return
}
// For constructTemplate, if "md" is found in data it's used in stead of "text".
foundMarkdown := false
if key == "markdown" {
_, foundMarkdown = data["md"]
if foundMarkdown {
data["plaintext"], data["md"] = data["md"], data["plaintext"]
}
}
var tplData bytes.Buffer
err = tpl.Execute(&tplData, data)
if err != nil {
return
}
if foundMarkdown {
data["plaintext"], data["md"] = data["md"], data["plaintext"]
}
if key == "html" {
html = tplData.String()
} else {
} else if key == "text" {
text = tplData.String()
} else {
markdown = tplData.String()
}
}
return
@@ -247,7 +304,7 @@ func (emailer *Emailer) confirmationValues(code, username, key string, app *appC
template[v] = "{" + v + "}"
}
} else {
message := app.config.Section("email").Key("message").String()
message := app.config.Section("messages").Key("message").String()
inviteLink := app.config.Section("invite_emails").Key("url_base").String()
inviteLink = fmt.Sprintf("%s/%s?key=%s", inviteLink, code, key)
template["helloUser"] = emailer.lang.Strings.template("helloUser", tmpl{"username": username})
@@ -257,23 +314,22 @@ func (emailer *Emailer) confirmationValues(code, username, key string, app *appC
return template
}
func (emailer *Emailer) constructConfirmation(code, username, key string, app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructConfirmation(code, username, key string, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("email_confirmation").Key("subject").MustString(emailer.lang.EmailConfirmation.get("title")),
}
var err error
template := emailer.confirmationValues(code, username, key, app, noSub)
if app.storage.customEmails.EmailConfirmation.Enabled {
content := app.storage.customEmails.EmailConfirmation.Content
for _, v := range app.storage.customEmails.EmailConfirmation.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.EmailConfirmation.Content,
app.storage.customEmails.EmailConfirmation.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "email_confirmation", "email_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "email_confirmation", "email_", template)
}
if err != nil {
return nil, err
@@ -281,17 +337,17 @@ func (emailer *Emailer) constructConfirmation(code, username, key string, app *a
return email, nil
}
func (emailer *Emailer) constructTemplate(subject, md string, app *appContext) (*Email, error) {
email := &Email{Subject: subject}
renderer := html.NewRenderer(html.RendererOptions{Flags: html.Smartypants})
func (emailer *Emailer) constructTemplate(subject, md string, app *appContext) (*Message, error) {
email := &Message{Subject: subject}
html := markdown.ToHTML([]byte(md), nil, renderer)
text := stripMarkdown(md)
message := app.config.Section("email").Key("message").String()
message := app.config.Section("messages").Key("message").String()
var err error
email.HTML, email.Text, err = emailer.construct(app, "template_email", "email_", map[string]interface{}{
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "template_email", "email_", map[string]interface{}{
"text": template.HTML(html),
"plaintext": text,
"message": message,
"md": md,
})
if err != nil {
return nil, err
@@ -302,7 +358,7 @@ func (emailer *Emailer) constructTemplate(subject, md string, app *appContext) (
func (emailer *Emailer) inviteValues(code string, invite Invite, app *appContext, noSub bool) map[string]interface{} {
expiry := invite.ValidTill
d, t, expiresIn := emailer.formatExpiry(expiry, false, app.datePattern, app.timePattern)
message := app.config.Section("email").Key("message").String()
message := app.config.Section("messages").Key("message").String()
inviteLink := app.config.Section("invite_emails").Key("url_base").String()
inviteLink = fmt.Sprintf("%s/%s", inviteLink, code)
template := map[string]interface{}{
@@ -329,23 +385,22 @@ func (emailer *Emailer) inviteValues(code string, invite Invite, app *appContext
return template
}
func (emailer *Emailer) constructInvite(code string, invite Invite, app *appContext, noSub bool) (*Email, error) {
email := &Email{
Subject: app.config.Section("email_confirmation").Key("subject").MustString(emailer.lang.InviteEmail.get("title")),
func (emailer *Emailer) constructInvite(code string, invite Invite, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("invite_emails").Key("subject").MustString(emailer.lang.InviteEmail.get("title")),
}
template := emailer.inviteValues(code, invite, app, noSub)
var err error
if app.storage.customEmails.InviteEmail.Enabled {
content := app.storage.customEmails.InviteEmail.Content
for _, v := range app.storage.customEmails.InviteEmail.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.InviteEmail.Content,
app.storage.customEmails.InviteEmail.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "invite_emails", "email_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "invite_emails", "email_", template)
}
if err != nil {
return nil, err
@@ -369,23 +424,22 @@ func (emailer *Emailer) expiryValues(code string, invite Invite, app *appContext
return template
}
func (emailer *Emailer) constructExpiry(code string, invite Invite, app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructExpiry(code string, invite Invite, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: emailer.lang.InviteExpiry.get("title"),
}
var err error
template := emailer.expiryValues(code, invite, app, noSub)
if app.storage.customEmails.InviteExpiry.Enabled {
content := app.storage.customEmails.InviteExpiry.Content
for _, v := range app.storage.customEmails.InviteExpiry.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.InviteExpiry.Content,
app.storage.customEmails.InviteExpiry.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "notifications", "expiry_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "notifications", "expiry_", template)
}
if err != nil {
return nil, err
@@ -424,23 +478,22 @@ func (emailer *Emailer) createdValues(code, username, address string, invite Inv
return template
}
func (emailer *Emailer) constructCreated(code, username, address string, invite Invite, app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructCreated(code, username, address string, invite Invite, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: emailer.lang.UserCreated.get("title"),
}
template := emailer.createdValues(code, username, address, invite, app, noSub)
var err error
if app.storage.customEmails.UserCreated.Enabled {
content := app.storage.customEmails.UserCreated.Content
for _, v := range app.storage.customEmails.UserCreated.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.UserCreated.Content,
app.storage.customEmails.UserCreated.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "notifications", "created_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "notifications", "created_", template)
}
if err != nil {
return nil, err
@@ -450,18 +503,24 @@ func (emailer *Emailer) constructCreated(code, username, address string, invite
func (emailer *Emailer) resetValues(pwr PasswordReset, app *appContext, noSub bool) map[string]interface{} {
d, t, expiresIn := emailer.formatExpiry(pwr.Expiry, true, app.datePattern, app.timePattern)
message := app.config.Section("email").Key("message").String()
message := app.config.Section("messages").Key("message").String()
template := map[string]interface{}{
"someoneHasRequestedReset": emailer.lang.PasswordReset.get("someoneHasRequestedReset"),
"ifItWasYou": emailer.lang.PasswordReset.get("ifItWasYou"),
"ifItWasNotYou": emailer.lang.Strings.get("ifItWasNotYou"),
"pinString": emailer.lang.PasswordReset.get("pin"),
"link_reset": false,
"message": "",
"username": pwr.Username,
"date": d,
"time": t,
"expiresInMinutes": expiresIn,
}
linkResetEnabled := app.config.Section("password_resets").Key("link_reset").MustBool(false)
if linkResetEnabled {
template["ifItWasYou"] = emailer.lang.PasswordReset.get("ifItWasYouLink")
} else {
template["ifItWasYou"] = emailer.lang.PasswordReset.get("ifItWasYou")
}
if noSub {
template["helloUser"] = emailer.lang.Strings.get("helloUser")
template["codeExpiry"] = emailer.lang.PasswordReset.get("codeExpiry")
@@ -472,29 +531,43 @@ func (emailer *Emailer) resetValues(pwr PasswordReset, app *appContext, noSub bo
} else {
template["helloUser"] = emailer.lang.Strings.template("helloUser", tmpl{"username": pwr.Username})
template["codeExpiry"] = emailer.lang.PasswordReset.template("codeExpiry", tmpl{"date": d, "time": t, "expiresInMinutes": expiresIn})
template["pin"] = pwr.Pin
inviteLink := app.config.Section("invite_emails").Key("url_base").String()
if linkResetEnabled {
if inviteLink != "" {
// Strip /invite form end of this URL, ik its ugly.
template["link_reset"] = true
pinLink := fmt.Sprintf("%s/reset?pin=%s", strings.TrimPrefix(inviteLink, "/invite"), pwr.Pin)
template["pin"] = pinLink
// Only used in html email.
template["pin_code"] = pwr.Pin
} else {
app.info.Println("Password Reset link disabled as no URL Base provided. Set in Settings > Invite Emails.")
template["pin"] = pwr.Pin
}
} else {
template["pin"] = pwr.Pin
}
template["message"] = message
}
return template
}
func (emailer *Emailer) constructReset(pwr PasswordReset, app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructReset(pwr PasswordReset, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("password_resets").Key("subject").MustString(emailer.lang.PasswordReset.get("title")),
}
template := emailer.resetValues(pwr, app, noSub)
var err error
if app.storage.customEmails.PasswordReset.Enabled {
content := app.storage.customEmails.PasswordReset.Content
for _, v := range app.storage.customEmails.PasswordReset.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.PasswordReset.Content,
app.storage.customEmails.PasswordReset.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "password_resets", "email_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "password_resets", "email_", template)
}
if err != nil {
return nil, err
@@ -504,9 +577,9 @@ func (emailer *Emailer) constructReset(pwr PasswordReset, app *appContext, noSub
func (emailer *Emailer) deletedValues(reason string, app *appContext, noSub bool) map[string]interface{} {
template := map[string]interface{}{
"yourAccountWasDeleted": emailer.lang.UserDeleted.get("yourAccountWasDeleted"),
"reasonString": emailer.lang.UserDeleted.get("reason"),
"message": "",
"yourAccountWas": emailer.lang.UserDeleted.get("yourAccountWasDeleted"),
"reasonString": emailer.lang.Strings.get("reason"),
"message": "",
}
if noSub {
empty := []string{"reason"}
@@ -515,28 +588,27 @@ func (emailer *Emailer) deletedValues(reason string, app *appContext, noSub bool
}
} else {
template["reason"] = reason
template["message"] = app.config.Section("email").Key("message").String()
template["message"] = app.config.Section("messages").Key("message").String()
}
return template
}
func (emailer *Emailer) constructDeleted(reason string, app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructDeleted(reason string, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("deletion").Key("subject").MustString(emailer.lang.UserDeleted.get("title")),
}
var err error
template := emailer.deletedValues(reason, app, noSub)
if app.storage.customEmails.UserDeleted.Enabled {
content := app.storage.customEmails.UserDeleted.Content
for _, v := range app.storage.customEmails.UserDeleted.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.UserDeleted.Content,
app.storage.customEmails.UserDeleted.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "deletion", "email_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "deletion", "email_", template)
}
if err != nil {
return nil, err
@@ -544,44 +616,146 @@ func (emailer *Emailer) constructDeleted(reason string, app *appContext, noSub b
return email, nil
}
func (emailer *Emailer) welcomeValues(username string, app *appContext, noSub bool) map[string]interface{} {
func (emailer *Emailer) disabledValues(reason string, app *appContext, noSub bool) map[string]interface{} {
template := map[string]interface{}{
"welcome": emailer.lang.WelcomeEmail.get("welcome"),
"youCanLoginWith": emailer.lang.WelcomeEmail.get("youCanLoginWith"),
"jellyfinURLString": emailer.lang.WelcomeEmail.get("jellyfinURL"),
"usernameString": emailer.lang.Strings.get("username"),
"message": "",
"yourAccountWas": emailer.lang.UserDisabled.get("yourAccountWasDisabled"),
"reasonString": emailer.lang.Strings.get("reason"),
"message": "",
}
if noSub {
empty := []string{"jellyfinURL", "username"}
empty := []string{"reason"}
for _, v := range empty {
template[v] = "{" + v + "}"
}
} else {
template["reason"] = reason
template["message"] = app.config.Section("messages").Key("message").String()
}
return template
}
func (emailer *Emailer) constructDisabled(reason string, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("disable_enable").Key("subject_disabled").MustString(emailer.lang.UserDisabled.get("title")),
}
var err error
template := emailer.disabledValues(reason, app, noSub)
if app.storage.customEmails.UserDisabled.Enabled {
content := templateEmail(
app.storage.customEmails.UserDisabled.Content,
app.storage.customEmails.UserDisabled.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "disable_enable", "disabled_", template)
}
if err != nil {
return nil, err
}
return email, nil
}
func (emailer *Emailer) enabledValues(reason string, app *appContext, noSub bool) map[string]interface{} {
template := map[string]interface{}{
"yourAccountWas": emailer.lang.UserEnabled.get("yourAccountWasEnabled"),
"reasonString": emailer.lang.Strings.get("reason"),
"message": "",
}
if noSub {
empty := []string{"reason"}
for _, v := range empty {
template[v] = "{" + v + "}"
}
} else {
template["reason"] = reason
template["message"] = app.config.Section("messages").Key("message").String()
}
return template
}
func (emailer *Emailer) constructEnabled(reason string, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("disable_enable").Key("subject_enabled").MustString(emailer.lang.UserEnabled.get("title")),
}
var err error
template := emailer.enabledValues(reason, app, noSub)
if app.storage.customEmails.UserEnabled.Enabled {
content := templateEmail(
app.storage.customEmails.UserEnabled.Content,
app.storage.customEmails.UserEnabled.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "disable_enable", "enabled_", template)
}
if err != nil {
return nil, err
}
return email, nil
}
func (emailer *Emailer) welcomeValues(username string, expiry time.Time, app *appContext, noSub bool, custom bool) map[string]interface{} {
template := map[string]interface{}{
"welcome": emailer.lang.WelcomeEmail.get("welcome"),
"youCanLoginWith": emailer.lang.WelcomeEmail.get("youCanLoginWith"),
"jellyfinURLString": emailer.lang.WelcomeEmail.get("jellyfinURL"),
"usernameString": emailer.lang.Strings.get("username"),
"message": "",
"yourAccountWillExpire": "",
}
if noSub {
empty := []string{"jellyfinURL", "username", "yourAccountWillExpire"}
for _, v := range empty {
template[v] = "{" + v + "}"
}
} else {
template["jellyfinURL"] = app.config.Section("jellyfin").Key("public_server").String()
template["username"] = username
template["message"] = app.config.Section("email").Key("message").String()
template["message"] = app.config.Section("messages").Key("message").String()
exp := app.formatDatetime(expiry)
if !expiry.IsZero() {
if custom {
template["yourAccountWillExpire"] = exp
} else if !expiry.IsZero() {
template["yourAccountWillExpire"] = emailer.lang.WelcomeEmail.template("yourAccountWillExpire", tmpl{
"date": exp,
})
}
}
}
return template
}
func (emailer *Emailer) constructWelcome(username string, app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructWelcome(username string, expiry time.Time, app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("welcome_email").Key("subject").MustString(emailer.lang.WelcomeEmail.get("title")),
}
var err error
template := emailer.welcomeValues(username, app, noSub)
var template map[string]interface{}
if app.storage.customEmails.WelcomeEmail.Enabled {
content := app.storage.customEmails.WelcomeEmail.Content
for _, v := range app.storage.customEmails.WelcomeEmail.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
template = emailer.welcomeValues(username, expiry, app, noSub, true)
} else {
template = emailer.welcomeValues(username, expiry, app, noSub, false)
}
if noSub {
template["yourAccountWillExpire"] = emailer.lang.WelcomeEmail.template("yourAccountWillExpire", tmpl{
"date": "{yourAccountWillExpire}",
})
}
if app.storage.customEmails.WelcomeEmail.Enabled {
content := templateEmail(
app.storage.customEmails.WelcomeEmail.Content,
app.storage.customEmails.WelcomeEmail.Variables,
app.storage.customEmails.WelcomeEmail.Conditionals,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "welcome_email", "email_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "welcome_email", "email_", template)
}
if err != nil {
return nil, err
@@ -596,28 +770,27 @@ func (emailer *Emailer) userExpiredValues(app *appContext, noSub bool) map[strin
"message": "",
}
if !noSub {
template["message"] = app.config.Section("email").Key("message").String()
template["message"] = app.config.Section("messages").Key("message").String()
}
return template
}
func (emailer *Emailer) constructUserExpired(app *appContext, noSub bool) (*Email, error) {
email := &Email{
func (emailer *Emailer) constructUserExpired(app *appContext, noSub bool) (*Message, error) {
email := &Message{
Subject: app.config.Section("user_expiry").Key("subject").MustString(emailer.lang.UserExpired.get("title")),
}
var err error
template := emailer.userExpiredValues(app, noSub)
if app.storage.customEmails.UserExpired.Enabled {
content := app.storage.customEmails.UserExpired.Content
for _, v := range app.storage.customEmails.UserExpired.Variables {
replaceWith, ok := template[v[1:len(v)-1]]
if ok {
content = strings.ReplaceAll(content, v, replaceWith.(string))
}
}
content := templateEmail(
app.storage.customEmails.UserExpired.Content,
app.storage.customEmails.UserExpired.Variables,
nil,
template,
)
email, err = emailer.constructTemplate(email.Subject, content, app)
} else {
email.HTML, email.Text, err = emailer.construct(app, "user_expiry", "email_", template)
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "user_expiry", "email_", template)
}
if err != nil {
return nil, err
@@ -626,6 +799,53 @@ func (emailer *Emailer) constructUserExpired(app *appContext, noSub bool) (*Emai
}
// calls the send method in the underlying emailClient.
func (emailer *Emailer) send(email *Email, address ...string) error {
return emailer.sender.send(emailer.fromName, emailer.fromAddr, email, address...)
func (emailer *Emailer) send(email *Message, address ...string) error {
return emailer.sender.Send(emailer.fromName, emailer.fromAddr, email, address...)
}
func (app *appContext) sendByID(email *Message, ID ...string) error {
for _, id := range ID {
var err error
if tgChat, ok := app.storage.telegram[id]; ok && tgChat.Contact && telegramEnabled {
err = app.telegram.Send(email, tgChat.ChatID)
if err != nil {
return err
}
}
if dcChat, ok := app.storage.discord[id]; ok && dcChat.Contact && discordEnabled {
err = app.discord.Send(email, dcChat.ChannelID)
if err != nil {
return err
}
}
if mxChat, ok := app.storage.matrix[id]; ok && mxChat.Contact && matrixEnabled {
err = app.matrix.Send(email, mxChat.RoomID)
if err != nil {
return err
}
}
if address, ok := app.storage.emails[id]; ok && address.Contact && emailEnabled {
err = app.email.send(email, address.Addr)
if err != nil {
return err
}
}
if err != nil {
return err
}
}
return nil
}
func (app *appContext) getAddressOrName(jfID string) string {
if dcChat, ok := app.storage.discord[jfID]; ok && dcChat.Contact && discordEnabled {
return dcChat.Username + "#" + dcChat.Discriminator
}
if tgChat, ok := app.storage.telegram[jfID]; ok && tgChat.Contact && telegramEnabled {
return "@" + tgChat.Username
}
if addr, ok := app.storage.emails[jfID]; ok {
return addr.Addr
}
return ""
}

View File

@@ -1 +0,0 @@
`scripts/embed.py [internal/external]` will copy the respective file into the main directory. If internal, `//go:embed` is used to embed the `data/` directory in the binary. If external, `os.DirFS` is used to access the `data/` directory, which should be placed next to the executable.

44
exit.go Normal file
View File

@@ -0,0 +1,44 @@
package main
import (
"html/template"
"log"
"os"
"path/filepath"
"time"
"github.com/pkg/browser"
)
// Exit dumps the last 100 lines of output to a crash file in /tmp (or equivalent), and generates a prettier HTML file containing it that is opened in the browser if possible.
func Exit(err interface{}) {
tmpl, err2 := template.ParseFS(localFS, "html/crash.html", "html/header.html")
if err2 != nil {
log.Fatalf("Failed to load template: %v", err)
}
logCache := lineCache.String()
sanitized := sanitizeLog(logCache)
data := map[string]interface{}{
"Log": logCache,
"SanitizedLog": sanitized,
}
if err != nil {
data["Err"] = err
}
fpath := filepath.Join(temp, "jfa-go-crash-"+time.Now().Local().Format("2006-01-02T15:04:05"))
err2 = os.WriteFile(fpath+".txt", []byte(logCache), 0666)
if err2 != nil {
log.Fatalf("Failed to write crash dump file: %v", err2)
}
log.Printf("\n------\nA crash report has been saved to \"%s\".\n------", fpath+".txt")
f, err2 := os.OpenFile(fpath+".html", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
if err2 != nil {
log.Fatalf("Failed to open crash dump file: %v", err2)
}
defer f.Close()
err2 = tmpl.Execute(f, data)
if err2 != nil {
log.Fatalf("Failed to execute template: %v", err2)
}
browser.OpenFile(fpath + ".html")
}

View File

@@ -1,3 +1,5 @@
// +build external
package main
import (

37
go.mod
View File

@@ -4,48 +4,59 @@ go 1.16
replace github.com/hrfee/jfa-go/docs => ./docs
replace github.com/hrfee/jfa-go/mediabrowser => ./mediabrowser
replace github.com/hrfee/jfa-go/common => ./common
replace github.com/hrfee/jfa-go/ombi => ./ombi
replace github.com/hrfee/jfa-go/logger => ./logger
replace github.com/hrfee/jfa-go/linecache => ./linecache
require (
github.com/bwmarrin/discordgo v0.23.2
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/evanw/esbuild v0.8.50 // indirect
github.com/emersion/go-autostart v0.0.0-20210130080809-00ed301c8e9a
github.com/fatih/color v1.10.0
github.com/fsnotify/fsnotify v1.4.9
github.com/getlantern/systray v1.1.0
github.com/gin-contrib/pprof v1.3.0
github.com/gin-contrib/static v0.0.0-20200916080430-d45d9a37d28e
github.com/gin-gonic/gin v1.6.3
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.3 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
github.com/golang/protobuf v1.4.3 // indirect
github.com/gomarkdown/markdown v0.0.0-20210208175418-bda154fe17d8
github.com/gomarkdown/markdown v0.0.0-20210408062403-ad838ccf8cdd
github.com/google/uuid v1.1.2 // indirect
github.com/hrfee/jfa-go/common v0.0.0-20210105184019-fdc97b4e86cc
github.com/hrfee/jfa-go/docs v0.0.0-20201112212552-b6f3cd7c1f71
github.com/hrfee/jfa-go/mediabrowser v0.0.0-20201112212552-b6f3cd7c1f71
github.com/hrfee/jfa-go/linecache v0.0.0-00010101000000-000000000000 // indirect
github.com/hrfee/jfa-go/logger v0.0.0-00010101000000-000000000000
github.com/hrfee/jfa-go/ombi v0.0.0-20201112212552-b6f3cd7c1f71
github.com/jordan-wright/email v4.0.1-0.20200917010138-e1c00e156980+incompatible
github.com/knz/strtime v0.0.0-20200924090105-187c67f2bf5e
github.com/hrfee/mediabrowser v0.3.4
github.com/itchyny/timefmt-go v0.1.2
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible
github.com/lithammer/shortuuid/v3 v3.0.4
github.com/mailgun/mailgun-go/v4 v4.3.0
github.com/mailgun/mailgun-go/v4 v4.5.1
github.com/mailru/easyjson v0.7.7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16
github.com/pkg/browser v0.0.0-20210606212950-a7b7a6107d32 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14
github.com/swaggo/gin-swagger v1.3.0
github.com/swaggo/swag v1.7.0 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
github.com/ugorji/go v1.2.0 // indirect
github.com/writeas/go-strip-markdown v2.0.1+incompatible
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b // indirect
golang.org/x/tools v0.1.0 // indirect
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect
golang.org/x/sys v0.0.0-20210611083646-a4fc73990273 // indirect
golang.org/x/tools v0.1.3 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/ini.v1 v1.62.0
)

115
go.sum
View File

@@ -11,6 +11,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/bwmarrin/discordgo v0.23.2 h1:BzrtTktixGHIu9Tt7dEE6diysEF9HWnXeHuoJEt2fH4=
github.com/bwmarrin/discordgo v0.23.2/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M=
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
@@ -28,12 +30,12 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk=
github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/emersion/go-autostart v0.0.0-20210130080809-00ed301c8e9a h1:M88ob4TyDnEqNuL3PgsE/p3bDujfspnulR+0dQWNYZs=
github.com/emersion/go-autostart v0.0.0-20210130080809-00ed301c8e9a/go.mod h1:buzQsO8HHkZX2Q45fdfGH1xejPjuDQaXH8btcYMFzPM=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanw/esbuild v0.8.50 h1:97YxSC9Ni9zu82601vI93cSUS0C+WUcPPNIARuGcQtI=
github.com/evanw/esbuild v0.8.50/go.mod h1:y2AFBAGVelPqPodpdtxWWqe6n2jYf5FrsJbligmRmuw=
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ=
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=
@@ -44,6 +46,20 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY=
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So=
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A=
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 h1:guBYzEaLz0Vfc/jv0czrr2z7qyzTOGC9hiQ0VC+hKjk=
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7/go.mod h1:zx/1xUUeYPy3Pcmet8OSXLbF47l+3y6hIPpyLWoR9oc=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 h1:micT5vkcr9tOVk1FiH8SWKID8ultN44Z+yzd2y/Vyb0=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 h1:XYzSdCbkzOC0FDNrgJqGRo8PCMFOBFL9py72DRs7bmc=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f h1:wrYrQttPS8FHIRSlsrcuKazukx/xqO/PpLZzZXsF+EA=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
github.com/getlantern/systray v1.1.0 h1:U0wCEqseLi2ok1fE6b88gJklzriavPJixZysZPkZd/Y=
github.com/getlantern/systray v1.1.0/go.mod h1:AecygODWIsBquJCJFop8MEQcJbWFfw/1yWbVabNgpCM=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/gzip v0.0.1 h1:ezvKOL6jH+jlzdHNE4h9h8q8uMpDQjyl0NN0Jd7jozc=
@@ -62,9 +78,6 @@ github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmC
github.com/gin-gonic/gin v1.6.2/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/go-chi/chi v4.0.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec=
github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
@@ -77,6 +90,8 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9
github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM=
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
github.com/go-openapi/spec v0.19.14/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA=
@@ -86,8 +101,9 @@ github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY=
github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng=
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
@@ -99,6 +115,10 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU=
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
@@ -115,8 +135,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/gomarkdown/markdown v0.0.0-20210208175418-bda154fe17d8 h1:nWU6p08f1VgIalT6iZyqXi4o5cZsz4X6qa87nusfcsc=
github.com/gomarkdown/markdown v0.0.0-20210208175418-bda154fe17d8/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
github.com/gomarkdown/markdown v0.0.0-20210408062403-ad838ccf8cdd h1:0b8AqsWQb6A0jjx80UXLG/uMTXQkGD0IGuXWqsrNz1M=
github.com/gomarkdown/markdown v0.0.0-20210408062403-ad838ccf8cdd/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -130,8 +150,16 @@ github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/jordan-wright/email v4.0.1-0.20200917010138-e1c00e156980+incompatible h1:CL0ooBNfbNyJTJATno+m0h+zM5bW6v7fKlboKUGP/dI=
github.com/jordan-wright/email v4.0.1-0.20200917010138-e1c00e156980+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/hrfee/mediabrowser v0.3.4 h1:D2FTnuRDXUUAHW80L1kamhVUKNifm8peZVVPNe0yWmA=
github.com/hrfee/mediabrowser v0.3.4/go.mod h1:PnHZbdxmbv1wCVdAQyM7nwPwpVj9fdKx2EcET7sAk+U=
github.com/itchyny/timefmt-go v0.1.2 h1:q0Xa4P5it6K6D7ISsbLAMwx1PnWlixDcJL6/sFs93Hs=
github.com/itchyny/timefmt-go v0.1.2/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A=
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
@@ -142,8 +170,6 @@ github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/knz/strtime v0.0.0-20200924090105-187c67f2bf5e h1:ViPE0JEOvtw5I0EGUiFSr2VNKGNU+3oBT+oHbDXHbxk=
github.com/knz/strtime v0.0.0-20200924090105-187c67f2bf5e/go.mod h1:4ZxfWkxwtc7dBeifERVVWRy9F9rTU9p0yCDgeCtlius=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
@@ -157,14 +183,16 @@ github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/lithammer/shortuuid/v3 v3.0.4 h1:uj4xhotfY92Y1Oa6n6HUiFn87CdoEHYUlTy0+IgbLrs=
github.com/lithammer/shortuuid/v3 v3.0.4/go.mod h1:RviRjexKqIzx/7r1peoAITm6m7gnif/h+0zmolKJjzw=
github.com/mailgun/mailgun-go/v4 v4.3.0 h1:9nAF7LI3k6bfDPbMZQMMl63Q8/vs+dr1FUN8eR1XMhk=
github.com/mailgun/mailgun-go/v4 v4.3.0/go.mod h1:fWuBI2iaS/pSSyo6+EBpHjatQO3lV8onwqcRy7joSJI=
github.com/mailgun/mailgun-go/v4 v4.5.1 h1:XrQQ/ZgqFvINRKy+eBqowLl7k3pQO6OCLpKphliMOFs=
github.com/mailgun/mailgun-go/v4 v4.5.1/go.mod h1:FJlF9rI5cQT+mrwujtJjPMbIVy3Ebor9bKTVsJ0QU40=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16 h1:ZtO5uywdd5dLDCud4r0r55eP4j9FuUNpl60Gmntcop4=
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
@@ -181,9 +209,12 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pkg/browser v0.0.0-20210606212950-a7b7a6107d32 h1:K3WnH8Ka32vWygzmjKEhz1zAVqckNoWDqX3azMxuiSA=
github.com/pkg/browser v0.0.0-20210606212950-a7b7a6107d32/go.mod h1:yvwcBfzEX4m+eTgxPBbNYytaWFv4PSQzBaeYjxp8Iik=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
@@ -196,6 +227,8 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
@@ -217,6 +250,8 @@ github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+t
github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc=
github.com/swaggo/swag v1.7.0 h1:5bCA/MTLQoIqDXXyHfOpMeDvL9j68OY/udlK4pQoo4E=
github.com/swaggo/swag v1.7.0/go.mod h1:BdPIL73gvS9NBsdi7M1JOxLvlbfvNRaBP8m6WT6Aajo=
github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
@@ -236,10 +271,12 @@ github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
github.com/writeas/go-strip-markdown v2.0.1+incompatible h1:IIqxTM5Jr7RzhigcL6FkrCNfXkvbR+Nbu1ls48pXYcw=
github.com/writeas/go-strip-markdown v2.0.1+incompatible/go.mod h1:Rsyu10ZhbEK9pXdk8V6MVnZmTzRG0alMNLMwa0J01fE=
github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5 h1:dPmz1Snjq0kmkz159iL7S6WzdahUTHnHB5M56WFVifs=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/dl v0.0.0-20190829154251-82a15e2f2ead h1:jeP6FgaSLNTMP+Yri3qjlACywQLye+huGLmNGhBzm6k=
golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -252,8 +289,9 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -268,18 +306,22 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A=
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -291,26 +333,27 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43 h1:SgQ6LNaYJU0JIuEHv9+s6EbhSCwYeAf5Yvj6lpYlqAE=
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04 h1:cEhElsAv9LUt9ZUUocxzWe05oFLVd+AA2nstydTeI8g=
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b h1:ggRgirZABFolTmi3sn6Ivd9SipZwLedQ5wR0aAKnFxU=
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210531080801-fdfd190a6549 h1:OL5GcZ2XPkte3dpfuFQ9o884vrE3BZQhajdntNMruv4=
golang.org/x/sys v0.0.0-20210531080801-fdfd190a6549/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210611083646-a4fc73990273 h1:faDu4veV+8pcThn4fewv6TVlNCezafGoC1gM/mxQLbQ=
golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -322,8 +365,10 @@ golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201120155355-20be4ac4bd6e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@@ -5,7 +5,10 @@
<script>
window.URLBase = "{{ .urlBase }}";
window.notificationsEnabled = {{ .notifications }};
window.emailEnabled = {{ .email_enabled }};
window.emailEnabled = {{ .emailEnabled }};
window.telegramEnabled = {{ .telegramEnabled }};
window.discordEnabled = {{ .discordEnabled }};
window.matrixEnabled = {{ .matrixEnabled }};
window.ombiEnabled = {{ .ombiEnabled }};
window.usernameEnabled = {{ .username }};
window.langFile = JSON.parse({{ .language }});
@@ -40,11 +43,24 @@
</div>
<div id="modal-about" class="modal">
<div class="modal-content content card">
<span class="heading">{{ .strings.aboutProgram }} <span class="modal-close">&times;</span></span>
<img src="{{ .urlBase }}/banner.svg" class="mt-1" alt="jfa-go banner">
<img src="{{ .urlBase }}/banner.svg" class="banner header" alt="jfa-go banner">
<span class="heading"><span class="modal-close">&times;</span></span>
<p><i class="icon ri-github-fill"></i><a href="https://github.com/hrfee/jfa-go">jfa-go</a></p>
<p>{{ .strings.version }} <span class="code monospace">{{ .version }}</span></p>
<p>{{ .strings.commitNoun }} <span class="code monospace">{{ .commit }}</span></p>
<div class="dropdown" tabindex="0">
<span class="button ~info dropdown-button">
<i class="ri-hand-heart-line mr-half"></i>
{{ .strings.donate }}
<span class="ml-1 chev"></span>
</span>
<div class="dropdown-display">
<div class="card ~neutral !low">
<a href="https://github.com/sponsors/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">GitHub</a>
<a href="https://ko-fi.com/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">Ko-fi</a>
</div>
</div>
</div>
<p><a href="https://github.com/hrfee/jfa-go/blob/main/LICENSE">Available under the MIT License.</a></p>
<pre class="monospace">{{ .license }}</pre>
</div>
@@ -99,23 +115,41 @@
<form class="modal-content card" id="form-extend-expiry" href="">
<span class="heading"><span id="header-extend-expiry"></span> <span class="modal-close">&times;</span></span>
<div class="content mt-half">
<label class="label supra" for="extend-expiry-days">{{ .strings.inviteDays }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-days">
<option>0</option>
</select>
<div class="row">
<div class="col">
<label class="label supra" for="extend-expiry-months">{{ .strings.inviteMonths }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-months">
<option>0</option>
</select>
</div>
</div>
<div class="col">
<label class="label supra" for="extend-expiry-days">{{ .strings.inviteDays }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-days">
<option>0</option>
</select>
</div>
</div>
</div>
<label class="label supra" for="extend-expiry-hours">{{ .strings.inviteHours }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-hours">
<option>0</option>
</select>
</div>
<label class="label supra" for="extend-expiry-minutes">{{ .strings.inviteMinutes }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-minutes">
<option>0</option>
</select>
<div class="row">
<div class="col">
<label class="label supra" for="extend-expiry-hours">{{ .strings.inviteHours }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-hours">
<option>0</option>
</select>
</div>
</div>
<div class="col">
<label class="label supra" for="extend-expiry-minutes">{{ .strings.inviteMinutes }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="extend-expiry-minutes">
<option>0</option>
</select>
</div>
</div>
</div>
<label>
<input type="submit" class="unfocused">
@@ -125,25 +159,31 @@
</form>
</div>
<div id="modal-announce" class="modal">
<form class="modal-content card" id="form-announce" href="">
<form class="modal-content wide card" id="form-announce" href="">
<span class="heading"><span id="header-announce"></span> <span class="modal-close">&times;</span></span>
<div class="content mt-half">
<label class="label supra" for="announce-subject"> {{ .strings.subject }}</label>
<input type="text" id="announce-subject" class="input ~neutral !normal mb-1 mt-half">
<label class="label supra" for="textarea-announce">{{ .strings.message }}</label>
<textarea id="textarea-announce" class="textarea full-width ~neutral !normal mt-half monospace"></textarea>
<p class="support mt-half mb-1">{{ .strings.markdownSupported }}</p>
<label>
<input type="submit" class="unfocused">
<span class="button ~urge !normal full-width center supra submit">{{ .strings.submit }}</span>
</label>
<div class="row">
<div class="col flex-col content mt-half">
<label class="label supra" for="announce-subject"> {{ .strings.subject }}</label>
<input type="text" id="announce-subject" class="input ~neutral !normal mb-1 mt-half">
<label class="label supra" for="textarea-announce">{{ .strings.message }}</label>
<textarea id="textarea-announce" class="textarea full-width ~neutral !normal mt-half monospace"></textarea>
<p class="support mt-half mb-1">{{ .strings.markdownSupported }}</p>
<label>
<input type="submit" class="unfocused">
<span class="button ~urge !normal full-width center supra submit">{{ .strings.submit }}</span>
</label>
</div>
<div class="col card ~neutral !low">
<span class="subheading supra">{{ .strings.preview }}</span>
<div class="mt-half" id="announce-preview"></div>
</div>
</div>
</form>
</div>
<div id="modal-customize" class="modal">
<div class="modal-content card">
<span class="heading">{{ .strings.customizeEmails }} <span class="modal-close">&times;</span></span>
<p class="content">{{ .strings.customizeEmailsDescription }}</p>
<span class="heading">{{ .strings.customizeMessages }} <span class="modal-close">&times;</span></span>
<p class="content">{{ .strings.customizeMessagesDescription }}</p>
<div class="table-responsive">
<table class="table">
<thead>
@@ -165,6 +205,8 @@
<div class="col flex-col content mt-half">
<span class="label supra" for="editor-variables" id="label-editor-variables">{{ .strings.variables }}</span>
<div id="editor-variables"></div>
<span class="label supra" for="editor-conditionals" id="label-editor-conditionals">{{ .strings.conditionals }}</span>
<div id="editor-conditionals"></div>
<label class="label supra" for="textarea-editor">{{ .strings.message }}</label>
<textarea id="textarea-editor" class="textarea full-width flex-auto ~neutral !normal mt-half monospace"></textarea>
<p class="support mt-half mb-1">{{ .strings.markdownSupported }}</p>
@@ -269,6 +311,49 @@
<span class="button ~urge !normal full-width center" id="update-update">{{ .strings.update }}</span>
</div>
</div>
{{ if .telegramEnabled }}
<div id="modal-telegram" class="modal">
<div class="modal-content card">
<span class="heading mb-1">{{ .strings.linkTelegram }}</span>
<p class="content mb-1">{{ .strings.sendPIN }}</p>
<h1 class="ac" id="telegram-pin"></h1>
<a class="subheading link-center" id="telegram-link" target="_blank">
<span class="shield ~info mr-1">
<span class="icon">
<i class="ri-telegram-line"></i>
</span>
</span>
&#64;<span id="telegram-username">
</a>
<span class="button ~info !normal full-width center mt-1" id="telegram-waiting">{{ .strings.success }}</span>
</div>
</div>
{{ end }}
{{ if .discordEnabled }}
<div id="modal-discord" class="modal">
<div class="modal-content card">
<span class="heading mb-1"><span id="discord-header"></span><span class="modal-close">&times;</span></span>
<p class="content mb-1" id="discord-description"></p>
<div class="row">
<input type="search" class="col sm field ~neutral !normal input" id="discord-search" placeholder="user#1234">
</div>
<table class="table"><tbody id="discord-list"></tbody></table>
</div>
</div>
{{ end }}
<div id="modal-matrix" class="modal">
<form class="modal-content card" id="form-matrix" href="">
<span class="heading">{{ .strings.linkMatrix }}</span>
<p class="content">{{ .strings.linkMatrixDescription }}</p>
<input type="text" class="field input ~neutral !high mt-half mb-1" placeholder="{{ .strings.matrixHomeServer }}" id="matrix-homeserver">
<input type="text" class="field input ~neutral !high mt-half mb-1" placeholder="{{ .strings.username }}" id="matrix-user">
<input type="password" class="field input ~neutral !high mt-half mb-1" placeholder="{{ .strings.password }}" id="matrix-password">
<label>
<input type="submit" class="unfocused">
<span class="button ~urge !normal full-width center supra submit">{{ .strings.submit }}</span>
</label>
</form>
</div>
<div id="notification-box"></div>
<span class="dropdown" tabindex="0" id="lang-dropdown">
<span class="button ~urge dropdown-button">
@@ -276,7 +361,16 @@
<span class="ml-1 chev"></span>
</span>
<div class="dropdown-display">
<div class="card ~neutral !low" id="lang-list">
<div class="card ~neutral !low">
<label class="switch pb-1">
<input type="radio" name="lang-time" id="lang-12h">
<span>{{ .strings.time12h }}</span>
</label>
<label class="switch pb-1">
<input type="radio" name="lang-time" id="lang-24h">
<span>{{ .strings.time24h }}</span>
</label>
<div id="lang-list"></div>
</div>
</div>
</span>
@@ -316,23 +410,41 @@
</label>
</div>
<div id="inv-duration">
<label class="label supra" for="create-days">{{ .strings.inviteDays }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-days">
<option>0</option>
</select>
<div class="row">
<div class="col">
<label class="label supra" for="create-months">{{ .strings.inviteMonths }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-months">
<option>0</option>
</select>
</div>
</div>
<div class="col">
<label class="label supra" for="create-days">{{ .strings.inviteDays }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-days">
<option>0</option>
</select>
</div>
</div>
</div>
<label class="label supra" for="create-hours">{{ .strings.inviteHours }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-hours">
<option>0</option>
</select>
</div>
<label class="label supra" for="create-minutes">{{ .strings.inviteMinutes }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-minutes">
<option>0</option>
</select>
<div class="row">
<div class="col">
<label class="label supra" for="create-hours">{{ .strings.inviteHours }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-hours">
<option>0</option>
</select>
</div>
</div>
<div class="col">
<label class="label supra" for="create-minutes">{{ .strings.inviteMinutes }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="create-minutes">
<option>0</option>
</select>
</div>
</div>
</div>
</div>
<div id="user-expiry" class="unfocused">
@@ -343,27 +455,47 @@
<span class="ml-half">{{ .strings.enabled }} </span>
</label>
</div>
<label class="label supra" for="user-days">{{ .strings.inviteDays }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-days">
<option>0</option>
</select>
<div class="row">
<div class="col">
<label class="label supra" for="user-months">{{ .strings.inviteMonths }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-months">
<option>0</option>
</select>
</div>
</div>
<div class="col">
<label class="label supra" for="user-days">{{ .strings.inviteDays }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-days">
<option>0</option>
</select>
</div>
</div>
</div>
<label class="label supra" for="user-hours">{{ .strings.inviteHours }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-hours">
<option>0</option>
</select>
</div>
<label class="label supra" for="user-minutes">{{ .strings.inviteMinutes }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-minutes">
<option>0</option>
</select>
<div class="row">
<div class="col">
<label class="label supra" for="user-hours">{{ .strings.inviteHours }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-hours">
<option>0</option>
</select>
</div>
</div>
<div class="col">
<label class="label supra" for="user-minutes">{{ .strings.inviteMinutes }}</label>
<div class="select ~neutral !normal mb-1 mt-half">
<select id="user-minutes">
<option>0</option>
</select>
</div>
</div>
</div>
</div>
<label class="label supra" for="create-label"> {{ .strings.label }}</label>
<input type="text" id="create-label" class="input ~neutral !normal mb-1 mt-half">
<div class="col">
<label class="label supra" for="create-label"> {{ .strings.label }}</label>
<input type="text" id="create-label" class="input ~neutral !normal mb-1 mt-half">
</div>
</div>
<div class="card ~neutral !normal col">
<label class="label supra" for="create-uses">{{ .strings.inviteNumberOfUses }}</label>
@@ -383,7 +515,14 @@
<div id="create-send-to-container">
<label class="label supra">{{ .strings.inviteSendToEmail }}</label>
<div class="flex-expand mb-1 mt-half">
{{ if .discordEnabled }}
<input type="text" id="create-send-to" class="input ~neutral !normal mr-1" placeholder="example@example.com | user#1234">
<span id="create-send-to-search" class="button ~neutral !normal mr-1">
<i class="icon ri-search-2-line" title="{{ .strings.search }}"></i>
</span>
{{ else }}
<input type="email" id="create-send-to" class="input ~neutral !normal mr-1" placeholder="example@example.com">
{{ end }}
<label for="create-send-to-enabled" class="button ~neutral !normal">
<input type="checkbox" id="create-send-to-enabled" aria-label="Send to address enabled">
</label>
@@ -406,6 +545,7 @@
<span class="col sm button ~info !normal center mb-half" id="accounts-announce">{{ .strings.announce }}</span>
<span class="col sm button ~urge !normal center mb-half" id="accounts-modify-user">{{ .strings.modifySettings }}</span>
<span class="col sm button ~warning !normal center mb-half" id="accounts-extend-expiry">{{ .strings.extendExpiry }}</span>
<span class="col sm button ~positive !normal center mb-half" id="accounts-disable-enable">{{ .strings.disable }}</span>
<span class="col sm button ~critical !normal center mb-half" id="accounts-delete-user">{{ .quantityStrings.deleteUser.Singular }}</span>
</div>
</div>
@@ -416,6 +556,15 @@
<th><input type="checkbox" value="" id="accounts-select-all"></th>
<th>{{ .strings.username }}</th>
<th>{{ .strings.emailAddress }}</th>
{{ if .telegramEnabled }}
<th>Telegram</th>
{{ end }}
{{ if .matrixEnabled }}
<th>Matrix</th>
{{ end }}
{{ if .discordEnabled }}
<th>Discord</th>
{{ end }}
<th>{{ .strings.expiry }}</th>
<th>{{ .strings.lastActiveTime }}</th>
</tr>

49
html/crash.html Normal file
View File

@@ -0,0 +1,49 @@
<!doctype html>
<html lang="en">
<head>
<link inline rel="stylesheet" type="text/css" href="bundle.css">
{{ template "header.html" . }}
<title>Crash report</title>
</head>
<body>
<div class="page-container">
<div class="row">
<div class="col">
<div class="card ~critical sectioned">
<section class="section ~critical">
<span class="heading">Crash report for jfa-go</span>
{{ if .Err }}
<div class="monospace pre-line mt-1 mb-1">
Error: {{ .Err }}
</div>
{{ end }}
<a class="button ~critical mb-1" target="_blank" href="https://github.com/hrfee/jfa-go/issues/new/choose">Create an Issue</a>
</section>
<section class="section ~neutral !low">
<div class="flex-expand">
<span class="subheading">Full Log</span>
<span class="button ~urge ml-half" id="copy-log">Copy</span>
</div>
<div class="row mb-1">
<label class="col mr-1">
<span class="button ~neutral !high supra full-width center" id="button-log-normal">Normal</span>
</label>
<label class="col mr-1">
<span class="button ~neutral !normal supra full-width center" id="button-log-sanitized">Sanitized</span>
</label>
</div>
<div id="log-normal">
<pre class="monospace pre-line">{{ .Log }}</pre>
</div>
<div id="log-sanitized" class="unfocused">
<p class="subheading">An attempt has been made to remove sensitive info, but make sure to check yourself.</p>
<pre class="monospace pre-line">{{ .SanitizedLog }}</pre>
</div>
</section>
</div>
</div>
</div>
</div>
<script inline src="crash.js"></script>
</body>
</html>

View File

@@ -5,13 +5,30 @@
window.invalidPassword = "{{ .strings.reEnterPasswordInvalid }}";
window.URLBase = "{{ .urlBase }}";
window.code = "{{ .code }}";
window.language = "{{ .langName }}";
window.messages = JSON.parse({{ .notifications }});
window.confirmation = {{ .confirmation }};
window.userExpiryEnabled = {{ .userExpiry }};
window.userExpiryMonths = {{ .userExpiryMonths }};
window.userExpiryDays = {{ .userExpiryDays }};
window.userExpiryHours = {{ .userExpiryHours }};
window.userExpiryMinutes = {{ .userExpiryMinutes }};
window.userExpiryMessage = {{ .userExpiryMessage }};
window.telegramEnabled = {{ .telegramEnabled }};
window.telegramRequired = {{ .telegramRequired }};
window.telegramPIN = "{{ .telegramPIN }}";
window.discordEnabled = {{ .discordEnabled }};
window.discordRequired = {{ .discordRequired }};
window.discordPIN = "{{ .discordPIN }}";
window.discordInviteLink = {{ .discordInviteLink }};
window.discordServerName = "{{ .discordServerName }}";
window.matrixEnabled = {{ .matrixEnabled }};
window.matrixRequired = {{ .matrixRequired }};
window.matrixUserID = "{{ .matrixUser }}";
</script>
{{ if .passwordReset }}
<script src="js/pwr.js" type="module"></script>
{{ else }}
<script src="js/form.js" type="module"></script>
{{ end }}
{{ end }}

View File

@@ -3,7 +3,13 @@
<head>
<link rel="stylesheet" type="text/css" href="css/bundle.css">
{{ template "header.html" . }}
<title>{{ .strings.pageTitle }}</title>
<title>
{{ if .passwordReset }}
{{ .strings.passwordReset }}
{{ else }}
{{ .strings.pageTitle }}
{{ end }}
</title>
</head>
<body class="max-w-full overflow-x-hidden section">
<div id="modal-success" class="modal">
@@ -19,6 +25,53 @@
<p class="content mb-1">{{ .strings.confirmationRequiredMessage }}</p>
</div>
</div>
{{ if .telegramEnabled }}
<div id="modal-telegram" class="modal">
<div class="modal-content card">
<span class="heading mb-1">{{ .strings.linkTelegram }}</span>
<p class="content mb-1">{{ .strings.sendPIN }}</p>
<h1 class="ac">{{ .telegramPIN }}</h1>
<a class="subheading link-center" href="{{ .telegramURL }}" target="_blank">
<span class="shield ~info mr-1">
<span class="icon">
<i class="ri-telegram-line"></i>
</span>
</span>
&#64;{{ .telegramUsername }}
</a>
<span class="button ~info !normal full-width center mt-1" id="telegram-waiting">{{ .strings.success }}</span>
</div>
</div>
{{ end }}
{{ if .discordEnabled }}
<div id="modal-discord" class="modal">
<div class="modal-content card">
<span class="heading mb-1">{{ .strings.linkDiscord }}</span>
<p class="content mb-1"> {{ .discordSendPINMessage }}</p>
<h1 class="ac">{{ .discordPIN }}</h1>
<a id="discord-invite"></a>
<span class="button ~info !normal full-width center mt-1" id="discord-waiting">{{ .strings.success }}</span>
</div>
</div>
{{ end }}
{{ if .matrixEnabled }}
<div id="modal-matrix" class="modal">
<div class="modal-content card">
<span class="heading mb-1">{{ .strings.linkMatrix }}</span>
<p class="content mb-1"> {{ .strings.matrixEnterUser }}</p>
<input type="text" class="input ~neutral !high" placeholder="@user:riot.im" id="matrix-userid">
<div class="subheading link-center mt-1">
<span class="shield ~info mr-1">
<span class="icon">
<i class="ri-chat-3-line"></i>
</span>
</span>
{{ .matrixUser }}
</div>
<span class="button ~info !normal full-width center mt-1" id="matrix-send">{{ .strings.submit }}</span>
</div>
</div>
{{ end }}
<span class="dropdown" tabindex="0" id="lang-dropdown">
<span class="button ~urge dropdown-button">
<i class="ri-global-line"></i>
@@ -29,11 +82,24 @@
</div>
</div>
</span>
<div id="notification-box"></div>
<div class="page-container">
<div class="card ~neutral !low">
<div class="row baseline">
<span class="col heading">{{ .strings.createAccountHeader }}</span>
<span class="col subheading"> {{ .helpMessage }}</span>
<span class="col heading">
{{ if .passwordReset }}
{{ .strings.passwordReset }}
{{ else }}
{{ .strings.createAccountHeader }}
{{ end }}
</span>
<span class="col subheading">
{{ if .passwordReset }}
{{ .strings.enterYourPassword }}
{{ else }}
{{ .helpMessage }}
{{ end }}
</span>
</div>
<div class="row">
<div class="col">
@@ -41,6 +107,7 @@
<aside class="col aside sm ~warning" id="user-expiry-message"></aside>
{{ end }}
<form class="card ~neutral !normal" id="form-create" href="">
{{ if not .passwordReset }}
<label class="label supra">
{{ .strings.username }}
<input type="text" class="input ~neutral !high mt-half mb-1" placeholder="{{ .strings.username }}" id="create-username" aria-label="{{ .strings.username }}">
@@ -48,7 +115,38 @@
<label class="label supra" for="create-email">{{ .strings.emailAddress }}</label>
<input type="email" class="input ~neutral !high mt-half mb-1" placeholder="{{ .strings.emailAddress }}" id="create-email" aria-label="{{ .strings.emailAddress }}" value="{{ .email }}">
{{ if .telegramEnabled }}
<span class="button ~info !normal full-width center mb-1" id="link-telegram">{{ .strings.linkTelegram }}</span>
{{ end }}
{{ if .discordEnabled }}
<span class="button ~info !normal full-width center mb-1" id="link-discord">{{ .strings.linkDiscord }}</span>
{{ end }}
{{ if .matrixEnabled }}
<span class="button ~info !normal full-width center mb-1" id="link-matrix">{{ .strings.linkMatrix }}</span>
{{ end }}
{{ if or (.telegramEnabled) (or .discordEnabled .matrixEnabled) }}
<div id="contact-via" class="unfocused">
<label class="row switch pb-1">
<input type="radio" name="contact-via" value="email"><span>Contact through Email</span>
</label>
{{ if .telegramEnabled }}
<label class="row switch pb-1">
<input type="radio" name="contact-via" value="telegram" id="contact-via-telegram"><span>Contact through Telegram</span>
</label>
{{ end }}
{{ if .discordEnabled }}
<label class="row switch pb-1">
<input type="radio" name="contact-via" value="discord" id="contact-via-discord"><span>Contact through Discord</span>
</label>
{{ end }}
{{ if .matrixEnabled }}
<label class="row switch pb-1">
<input type="radio" name="contact-via" value="matrix" id="contact-via-matrix"><span>Contact through Matrix</span>
</label>
{{ end }}
</div>
{{ end }}
{{ end }}
<label class="label supra" for="create-password">{{ .strings.password }}</label>
<input type="password" class="input ~neutral !high mt-half mb-1" placeholder="{{ .strings.password }}" id="create-password" aria-label="{{ .strings.password }}">
@@ -56,7 +154,13 @@
<input type="password" class="input ~neutral !high mt-half mb-1" placeholder="{{ .strings.password }}" id="create-reenter-password" aria-label="{{ .strings.reEnterPassword }}">
<label>
<input type="submit" class="unfocused">
<span class="button ~urge !normal full-width center supra submit">{{ .strings.createAccountButton }}</span>
<span class="button ~urge !normal full-width center supra submit">
{{ if .passwordReset }}
{{ .strings.reset }}
{{ else }}
{{ .strings.createAccountButton }}
{{ end }}
</span>
</label>
</form>
</div>
@@ -81,4 +185,3 @@
{{ template "form-base" . }}
</body>
</html>

45
html/password-reset.html Normal file
View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en" class="{{ .cssClass }}">
<head>
<link rel="stylesheet" type="text/css" href="css/bundle.css">
{{ template "header.html" . }}
<title>{{ .strings.passwordReset }} - jfa-go</title>
</head>
<body class="section">
{{ if .success }}
<div id="notification-box">
<span id="copy-notification" class="unfocused">{{ .strings.copied }}</span>
</div>
{{ end }}
<div class="page-container">
<div class="card ~neutral !normal mb-1">
<span class="heading mb-1">
{{ if .success }}
{{ .strings.passwordReset }}
{{ else }}
{{ .strings.resetFailed }}
{{ end }}
</span>
<p class="content mb-1">
{{ if .success }}
{{ if .ombiEnabled }}
{{ .strings.youCanLoginOmbi }}
{{ else }}
{{ .strings.youCanLogin }}
{{ end }}
{{ else }}
{{ .strings.tryAgain }}
{{ end }}
</p>
{{ if .success }}
<aside class="aside ~warning">
{{ .strings.changeYourPassword }}
</aside>
<span class="button ~urge !normal full-width center supra p-1 mt-1" id="pin" title="{{ .strings.copy }}">{{ .pin }}</span>
{{ end }}
</div>
<i class="content">{{ .contactMessage }}</i>
</div>
<script src="{{ .urlBase }}/js/pwr-pin.js" type="module"></script>
</body>
</html>

View File

@@ -249,8 +249,8 @@
</label>
<label class="row switch">
<input type="checkbox" id="email-no_username"><span>{{ .lang.Email.useEmailAsUsername }}</span>
<p class="support mb-1">{{ .lang.Email.useEmailAsUsernameNotice }}</p>
</label>
<p class="support mb-1">{{ .lang.Email.useEmailAsUsernameNotice }}</p>
<label class="label">
<span class="mt-half">{{ .lang.Email.fromAddress }}</span>
<input type="email" class="input ~neutral !normal mt-half mb-1" id="email-address" placeholder="mail@jellyf.in">
@@ -266,10 +266,10 @@
</label>
<div>
<label class="row switch pb-1">
<input type="radio" name="email-24h" value="true" checked><span>{{ .lang.Email.time24h }}</span>
<input type="radio" name="email-24h" value="true" checked><span>{{ .lang.Strings.time24h }}</span>
</label>
<label class="row switch pb-1">
<input type="radio" name="email-24h" value="false"><span>{{ .lang.Email.time12h }}</span>
<input type="radio" name="email-24h" value="false"><span>{{ .lang.Strings.time12h }}</span>
</label>
</div>
</div>
@@ -376,7 +376,18 @@
<input type="text" class="input ~neutral !normal mt-half" id="password_resets-watch_directory" placeholder="/config/jellyfin">
<p class="support mb-1">{{ .lang.PasswordResets.pathToJellyfinNotice }}</p>
</label>
<label class="label">
<label class="switch">
<input type="checkbox" id="password_resets-link_reset"><span>{{ .lang.PasswordResets.resetLinks }}</span>
<p class="support mb-1">{{ .lang.PasswordResets.resetLinksNotice }}</p>
</label>
<label class="row label">
<p class="mt-half">{{ .lang.PasswordResets.resetLinksLanguage }}</p>
<div class="select ~neutral !normal mt-half mb-1">
<select id="password_resets-language">
</select>
</div>
</label>
<label class="row label">
<span class="mt-half">{{ .lang.Strings.emailSubject }}</span>
<input type="text" class="input ~neutral !normal mt-half mb-1" id="password_resets-subject" placeholder="{{ .emailLang.PasswordReset.title }}">
</label>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 66 KiB

BIN
images/discord/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
images/discord/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
images/discord/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
images/discord/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
images/discord/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
images/discord/6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
images/discord/7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
images/discord/8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
images/matrix/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

BIN
images/matrix/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
images/matrix/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
images/matrix/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
images/tg-settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/tg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -1,3 +1,5 @@
// +build !external
package main
import (
@@ -11,7 +13,7 @@ const binaryType = "internal"
//go:embed data data/html data/web data/web/css data/web/js
var loFS embed.FS
//go:embed lang/common lang/admin lang/email lang/form lang/setup
//go:embed lang/common lang/admin lang/email lang/form lang/setup lang/pwreset lang/telegram
var laFS embed.FS
var langFS rewriteFS

View File

@@ -42,7 +42,7 @@ func (rt *inviteDaemon) run() {
}
}
func (rt *inviteDaemon) shutdown() {
func (rt *inviteDaemon) Shutdown() {
rt.Stopped = true
rt.ShutdownChannel <- "Down"
<-rt.ShutdownChannel

90
lang.go
View File

@@ -1,11 +1,9 @@
package main
import (
"strings"
)
type langMeta struct {
Name string `json:"name"`
// Language to fall back on if strings are missing. Defaults to en-us.
Fallback string `json:"fallback,omitempty"`
}
type quantityString struct {
@@ -61,6 +59,23 @@ type formLang struct {
validationStringsJSON string
}
type pwrLangs map[string]pwrLang
func (ls *pwrLangs) getOptions() [][2]string {
opts := make([][2]string, len(*ls))
i := 0
for key, lang := range *ls {
opts[i] = [2]string{key, lang.Meta.Name}
i++
}
return opts
}
type pwrLang struct {
Meta langMeta `json:"meta"`
Strings langSection `json:"strings"`
}
type emailLangs map[string]emailLang
func (ls *emailLangs) getOptions() [][2]string {
@@ -80,6 +95,8 @@ type emailLang struct {
InviteExpiry langSection `json:"inviteExpiry"`
PasswordReset langSection `json:"passwordReset"`
UserDeleted langSection `json:"userDeleted"`
UserDisabled langSection `json:"userDisabled"`
UserEnabled langSection `json:"userEnabled"`
InviteEmail langSection `json:"inviteEmail"`
WelcomeEmail langSection `json:"welcomeEmail"`
EmailConfirmation langSection `json:"emailConfirmation"`
@@ -119,14 +136,50 @@ func (ls *setupLangs) getOptions() [][2]string {
return opts
}
type telegramLangs map[string]telegramLang
type telegramLang struct {
Meta langMeta `json:"meta"`
Strings langSection `json:"strings"`
}
func (ts *telegramLangs) getOptions() [][2]string {
opts := make([][2]string, len(*ts))
i := 0
for key, lang := range *ts {
opts[i] = [2]string{key, lang.Meta.Name}
i++
}
return opts
}
type langSection map[string]string
type tmpl map[string]string
func templateString(text string, vals tmpl) string {
for key, val := range vals {
text = strings.ReplaceAll(text, "{"+key+"}", val)
start, previousEnd := -1, -1
out := ""
for i := range text {
if text[i] == '{' {
start = i
continue
}
if start != -1 && text[i] == '}' {
varName := text[start+1 : i]
val, ok := vals[varName]
if !ok {
start = -1
continue
}
out += text[previousEnd+1:start] + val
previousEnd = i
start = -1
}
}
return text
if previousEnd != len(text)-1 {
out += text[previousEnd+1:]
}
return out
}
func (el langSection) template(field string, vals tmpl) string {
@@ -136,10 +189,27 @@ func (el langSection) template(field string, vals tmpl) string {
func (el langSection) format(field string, vals ...string) string {
text := el.get(field)
for _, val := range vals {
text = strings.Replace(text, "{n}", val, 1)
start, previous := -1, -3
out := ""
val := 0
for i := range text {
if i == len(text)-2 { // Check if there's even enough space for a {n}
break
}
if text[i:i+3] == "{n}" {
start = i
out += text[previous+3:start] + vals[val]
previous = start
val++
if val == len(vals) {
break
}
}
}
return text
if previous+2 != len(text)-1 {
out += text[previous+3:]
}
return out
}
func (el langSection) get(field string) string {

View File

@@ -32,7 +32,7 @@
"modifySettings": "Einstellungen ändern",
"modifySettingsDescription": "Wende Einstellungen von einem bestehenden Profil an, oder beziehe sie direkt von einem Benutzer.",
"applyHomescreenLayout": "Startbildschirmlayout anwenden",
"sendDeleteNotificationEmail": "Benachrichtigungs-E-Mail senden",
"sendDeleteNotificationEmail": "Benachrichtigung senden",
"sendDeleteNotifiationExample": "Dein Konto wurde gelöscht.",
"settingsRestartRequired": "Neustart erforderlich",
"settingsRestartRequiredDescription": "Ein Neustart ist notwendig, um einige Einstellungen anzuwenden, die du geändert hast. Jetzt oder später neu starten?",
@@ -55,7 +55,6 @@
"inviteNoUsersCreated": "Noch keine!",
"inviteUsersCreated": "Erstellte Benutzer",
"inviteNoProfile": "Kein Profil",
"copy": "Kopieren",
"inviteDateCreated": "Erstellt",
"inviteRemainingUses": "Verbleibende Verwendungen",
"inviteNoInvites": "Keine",
@@ -70,12 +69,38 @@
"preview": "Vorschau",
"reset": "Zurücksetzen",
"edit": "Bearbeiten",
"customizeEmails": "E-Mails anpassen",
"customizeEmailsDescription": "Wenn du jfa-go's E-Mail-Vorlagen nicht benutzen willst, kannst du deinen eigenen unter Verwendung von Markdown erstellen.",
"customizeMessages": "E-Mails anpassen",
"customizeMessagesDescription": "Wenn du jfa-go's E-Mail-Vorlagen nicht benutzen willst, kannst du deinen eigenen unter Verwendung von Markdown erstellen.",
"announce": "Ankündigen",
"subject": "E-Mail-Betreff",
"subject": "Betreff",
"message": "Nachricht",
"markdownSupported": "Markdown wird unterstützt."
"markdownSupported": "Markdown wird unterstützt.",
"advancedSettings": "Erweiterte Einstellungen",
"search": "Suchen",
"userExpiry": "Benutzer Ablaufdatum",
"inviteDuration": "Invite Dauer",
"enabled": "Aktiviert",
"userExpiryDescription": "Eine bestimmte Zeit nach der Anmeldung wird jfa-go das Konto löschen/deaktivieren. Du kannst dieses Verhalten in den Einstellungen ändern.",
"disabled": "Deaktiviert",
"admin": "Admin",
"download": "Herunterladen",
"update": "Aktualisieren",
"updates": "Aktualisierungen",
"expiry": "Ablaufdatum",
"extendExpiry": "Ablaufdatum verlängern",
"reEnable": "Wieder aktivieren",
"disable": "Deaktivieren",
"donate": "Spenden",
"conditionals": "Bedingungen",
"contactThrough": "Kontakt über:",
"sendPIN": "Bitte den Benutzer, die unten stehende PIN an den Bot zu senden.",
"inviteMonths": "Monate",
"add": "Hinzufügen",
"select": "Auswählen",
"searchDiscordUser": "Gib den Discord-Benutzername ein, um den Benutzer zu finden.",
"findDiscordUser": "Suche Discord-Benutzer",
"linkMatrixDescription": "Gib den Benutzernamen und das Passwort des Benutzers ein, der als Bot verwendet werden soll. Nach dem Absenden wird die App neu gestartet.",
"matrixHomeServer": "Adresse des Homeservers"
},
"notifications": {
"changedEmailAddress": "E-Mail-Adresse von {n} geändert.",
@@ -104,10 +129,18 @@
"errorFailureCheckLogs": "Fehlgeschlagen (überprüfe die Konsole/Logs)",
"errorPartialFailureCheckLogs": "Teilweiser Fehlschlag (überprüfe die Konsole/Logs)",
"errorUserCreated": "Fehler beim Erstellen des Benutzers {n}.",
"errorSendWelcomeEmail": "Fehler beim Senden der Willkommens-E-Mail (überprüfe die Konsole/Logs)",
"errorSendWelcomeEmail": "Fehler beim Senden der Willkommensnachricht (überprüfe die Konsole/Logs)",
"saveEmail": "E-Mail gespeichert.",
"errorSaveEmail": "Fehler beim Speichern der E-Mail.",
"sentAnnouncement": "Ankündigung gesendet."
"sentAnnouncement": "Ankündigung gesendet.",
"updateApplied": "Aktualisierung angewendet, bitte neu starten.",
"errorApplyUpdate": "Fehler beim Anwenden der Aktualisierung, versuche es manuell.",
"errorCheckUpdate": "Fehler beim Suchen nach Aktualisierungen.",
"updateAvailable": "Eine neue Aktualisierung ist verfügbar, überprüfe die Einstellungen.",
"noUpdatesAvailable": "Keinen neuen Aktualisierungen verfügbar.",
"updateAppliedRefresh": "Update angewendet, bitte aktualisieren.",
"telegramVerified": "Telegram-Konto verifiziert.",
"accountConnected": "Konto verbunden."
},
"quantityStrings": {
"modifySettingsFor": {
@@ -137,6 +170,30 @@
"announceTo": {
"singular": "{n} Benutzer mitteilen",
"plural": "{n} Benutzern mitteilen"
},
"extendExpiry": {
"singular": "Ablaufdatum für {n} Benutzer verlängern",
"plural": "Ablaufdatum für {n} Benutzer verlängern"
},
"extendedExpiry": {
"singular": "Ablaufdatum für {n} Benutzer verlängern.",
"plural": "Ablaufdatum für {n} Benutzer verlängern."
},
"disabledUser": {
"plural": "Benutzer {n} Deaktiviert.",
"singular": "Benutzer {n} Deaktiviert."
},
"enabledUser": {
"singular": "Benutzer {n} Aktiviert.",
"plural": "Benutzer {n} Aktiviert."
},
"disableUsers": {
"singular": "Benutzer {n} deaktivieren",
"plural": "Deaktiviere {n} Benutzer"
},
"reEnableUsers": {
"singular": "Benutzer {n} wieder aktivieren",
"plural": "Benutzer {n} wieder aktivieren"
}
}
}

View File

@@ -58,14 +58,39 @@
"inviteNoUsersCreated": "Τίποτα ακόμα!",
"inviteUsersCreated": "Δημιουργηθέντες χρήστες",
"inviteNoProfile": "Κανένα Προφίλ",
"copy": "Αντιγραφή",
"inviteDateCreated": "Δημιουργηθέντα",
"inviteRemainingUses": "Εναπομείναντες χρήσεις",
"inviteNoInvites": "Καμία",
"inviteExpiresInTime": "Λήγει σε {n}",
"notifyEvent": "Ενημέρωση όταν:",
"notifyInviteExpiry": "Στην λήξη",
"notifyUserCreation": "Στην δημιουργία χρήστη"
"notifyUserCreation": "Στην δημιουργία χρήστη",
"variables": "Μεταβλητές",
"preview": "Προεπισκόπηση",
"reset": "Επαναφορά",
"edit": "Επεξεργασία",
"customizeMessages": "Παραμετροποίηση Emails",
"advancedSettings": "Προχωρημένες Ρυθμίσεις",
"customizeMessagesDescription": "Αν δεν θέλετε να ζρησιμοποιήσετε τα πρότυπα email του jfa-go, μπορείτε να δημιουργήσετε τα δικά σας με χρήση Markdown.",
"updates": "Ενημερώσεις",
"update": "Ενημέρωση",
"download": "Λήψη",
"search": "Αναζήτηση",
"inviteDuration": "Διάρκεια Πρόσκλησης",
"enabled": "Ενεργοποιημένο",
"disabled": "Απενεργοποιημένο",
"admin": "Διαχειριστής",
"expiry": "Λήξη",
"userExpiry": "Λήξη Χρήστη",
"userExpiryDescription": "Μετά απο ένα καθορισμένο χρόνο μετά απο κάθε εγγραφή, το jfa-go θα διαγράφει/απενεργοποιεί τον λογαριασμό. Μπορείτε να αλλάξετε αυτή την συμπεριφορά στις ρυθμίσεις.",
"announce": "Ανακοίνωση",
"subject": "Θέμα Email",
"message": "Μήνυμα",
"extendExpiry": "Παράταση λήξης",
"markdownSupported": "Το Markdown υποστυρίζεται.",
"reEnable": "Επανα-ενεργοποίηση",
"disable": "Απενεργοποίηση",
"inviteMonths": "Μήνες"
},
"notifications": {
"changedEmailAddress": "Αλλαγή {n} διεύθυνσεων email.",
@@ -94,7 +119,15 @@
"errorFailureCheckLogs": "Αποτυχία (ελέγξτε κονσόλα/καταγραφές)",
"errorPartialFailureCheckLogs": "Μερική αποτυχία (ελέγξτε κονσόλα/καταγραφές)",
"errorUserCreated": "Αποτυχία δημιουργίας του χρήστη {n}.",
"errorSendWelcomeEmail": "Αποτυχία αποστολής email καλωσορίσματος (ελέγξτε κονσόλα/καταγραφές)"
"errorSendWelcomeEmail": "Αποτυχία αποστολής email καλωσορίσματος (ελέγξτε κονσόλα/καταγραφές)",
"saveEmail": "Το email αποθηκεύτηκε.",
"sentAnnouncement": "Ανακοίνωση εστάλη.",
"updateApplied": "Η ενημέρωση εφαρμόστηκε, παρακαλώ επανεκκινήστε.",
"errorSaveEmail": "Αποτυχία αποθήκευσης του email.",
"errorApplyUpdate": "Αποτυχία εγκατάστασης ενημέρωσης, προσπαθήστε χειροκίνητα.",
"errorCheckUpdate": "Αποτυχία ελέγχου για ενημερώσεις.",
"updateAvailable": "Μια νέα ενημέρωση είναι διαθέσιμη, ελέγξτε τις ρυθμίσεις.",
"noUpdatesAvailable": "Δεν υπάρχουν διαθέσιμες ενημερώσεις."
},
"quantityStrings": {
"modifySettingsFor": {
@@ -120,6 +153,34 @@
"appliedSettings": {
"singular": "Εφαρμογή ρυθμίσεων σε {n} χρήστη.",
"plural": "Εφαρμογή ρυθμίσεων σε {n} χρήστες."
},
"announceTo": {
"singular": "Ανακοίνωση σε {n} χρήστη",
"plural": "Ανακοίνωση σε {n} χρήστες"
},
"extendExpiry": {
"plural": "Επέκταση λήξης σε {n} χρήστες",
"singular": "Επέκταση λήξης σε {n} χρήστη"
},
"extendedExpiry": {
"singular": "Εκτεταμένη λήξη για {n} χρήστη.",
"plural": "Εκτεταμένη λήξη για {n} χρήστες."
},
"disableUsers": {
"singular": "Απενεργοποίηση {n} χρήστη",
"plural": "Απενεργοποίηση {n} χρηστών"
},
"reEnableUsers": {
"singular": "Εκ νέου ενεργοποίηση {n} χρήστη",
"plural": "Εκ νέου ενεργοποίηση {n} χρηστών"
},
"disabledUser": {
"singular": "Απενεργοποιήθηκε {n} χρήστης.",
"plural": "Απενεργοποιήθηκαν {n} χρήστες."
},
"enabledUser": {
"singular": "Εργοποιήθηκε {n} χρήστης.",
"plural": "Εργοποιήθηκαν {n} χρήστες."
}
}
}

5
lang/admin/en-gb.json Normal file
View File

@@ -0,0 +1,5 @@
{
"meta": {
"name": "English (GB)"
}
}

View File

@@ -6,6 +6,7 @@
"invites": "Invites",
"accounts": "Accounts",
"settings": "Settings",
"inviteMonths": "Months",
"inviteDays": "Days",
"inviteHours": "Hours",
"inviteMinutes": "Minutes",
@@ -19,10 +20,14 @@
"create": "Create",
"apply": "Apply",
"delete": "Delete",
"add": "Add",
"select": "Select",
"name": "Name",
"date": "Date",
"enabled": "Enabled",
"disabled": "Disabled",
"reEnable": "Re-enable",
"disable": "Disable",
"admin": "Admin",
"updates": "Updates",
"update": "Update",
@@ -43,20 +48,23 @@
"unknown": "Unknown",
"label": "Label",
"announce": "Announce",
"subject": "Email Subject",
"subject": "Subject",
"message": "Message",
"variables": "Variables",
"conditionals": "Conditionals",
"preview": "Preview",
"reset": "Reset",
"edit": "Edit",
"donate": "Donate",
"contactThrough": "Contact through:",
"extendExpiry": "Extend expiry",
"customizeEmails": "Customize Emails",
"customizeEmailsDescription": "If you don't want to use jfa-go's email templates, you can create your own using Markdown.",
"customizeMessages": "Customize Messages",
"customizeMessagesDescription": "If you don't want to use jfa-go's message templates, you can create your own using Markdown.",
"markdownSupported": "Markdown is supported.",
"modifySettings": "Modify Settings",
"modifySettingsDescription": "Apply settings from an existing profile, or source them directly from a user.",
"applyHomescreenLayout": "Apply homescreen layout",
"sendDeleteNotificationEmail": "Send notification email",
"sendDeleteNotificationEmail": "Send notification message",
"sendDeleteNotifiationExample": "Your account has been deleted.",
"settingsRestart": "Restart",
"settingsRestarting": "Restarting…",
@@ -81,14 +89,18 @@
"inviteNoUsersCreated": "None yet!",
"inviteUsersCreated": "Created users",
"inviteNoProfile": "No Profile",
"copy": "Copy",
"inviteDateCreated": "Created",
"inviteRemainingUses": "Remaining uses",
"inviteNoInvites": "None",
"inviteExpiresInTime": "Expires in {n}",
"notifyEvent": "Notify on:",
"notifyInviteExpiry": "On expiry",
"notifyUserCreation": "On user creation"
"notifyUserCreation": "On user creation",
"sendPIN": "Ask the user to send the PIN below to the bot.",
"searchDiscordUser": "Start typing the Discord username to find the user.",
"findDiscordUser": "Find Discord user",
"linkMatrixDescription": "Enter the username and password of the user to use as a bot. Once submitted, the app will restart.",
"matrixHomeServer": "Home server address"
},
"notifications": {
"changedEmailAddress": "Changed email address of {n}.",
@@ -99,6 +111,9 @@
"sentAnnouncement": "Announcement sent.",
"setOmbiDefaults": "Stored ombi defaults.",
"updateApplied": "Update applied, please restart.",
"updateAppliedRefresh": "Update applied, please refresh.",
"telegramVerified": "Telegram account verified.",
"accountConnected": "Account connected.",
"errorConnection": "Couldn't connect to jfa-go.",
"error401Unauthorized": "Unauthorized. Try refreshing the page.",
"errorSettingsAppliedNoHomescreenLayout": "Settings were applied, but applying homescreen layout may have failed.",
@@ -121,7 +136,7 @@
"errorFailureCheckLogs": "Failed (check console/logs)",
"errorPartialFailureCheckLogs": "Partial failure (check console/logs)",
"errorUserCreated": "Failed to create user {n}.",
"errorSendWelcomeEmail": "Failed to send welcome email (check console/logs)",
"errorSendWelcomeEmail": "Failed to send welcome message (check console/logs)",
"errorApplyUpdate": "Failed to apply update, try manually.",
"errorCheckUpdate": "Failed to check for update.",
"updateAvailable": "A new update is available, check settings.",
@@ -136,6 +151,14 @@
"singular": "Delete {n} user",
"plural": "Delete {n} users"
},
"disableUsers": {
"singular": "Disable {n} user",
"plural": "Disable {n} users"
},
"reEnableUsers": {
"singular": "Re-enable {n} user",
"plural": "Re-enable {n} users"
},
"addUser": {
"singular": "Add user",
"plural": "Add users"
@@ -148,6 +171,14 @@
"singular": "Deleted {n} user.",
"plural": "Deleted {n} users."
},
"disabledUser": {
"singular": "Disabled {n} user.",
"plural": "Disabled {n} users."
},
"enabledUser": {
"singular": "Enabled {n} user.",
"plural": "Enabled {n} users."
},
"announceTo": {
"singular": "Announce to {n} user",
"plural": "Announce to {n} users"

188
lang/admin/es-es.json Normal file
View File

@@ -0,0 +1,188 @@
{
"meta": {
"name": "Español(ES)"
},
"strings": {
"invites": "Invitaciones",
"accounts": "Cuentas",
"settings": "Ajustes",
"inviteMonths": "Meses",
"inviteDays": "Días",
"inviteHours": "Horas",
"inviteMinutes": "Minutos",
"inviteNumberOfUses": "Números de usos",
"inviteDuration": "Duración de invitación",
"warning": "Advertencia",
"inviteInfiniteUsesWarning": "Las invitaciones con usos infinitos pueden usarse abusivamente",
"inviteSendToEmail": "Enviar a",
"login": "Acceso",
"logout": "Cerrar sesión",
"create": "Cerrar sesión",
"apply": "Aplicar",
"delete": "Eliminar",
"name": "Nombre",
"date": "Fecha",
"enabled": "Activado",
"disabled": "Desactivado",
"reEnable": "Reactivar",
"disable": "Desactivar",
"admin": "Administrador",
"updates": "Actualizaciones",
"update": "Actualizar",
"download": "Descargar",
"search": "Buscar",
"advancedSettings": "Ajustes avanzados",
"lastActiveTime": "Último activo",
"from": "De",
"user": "Usuario",
"expiry": "Expiración",
"userExpiry": "Caducidad del usuario",
"userExpiryDescription": "Una cantidad específica de tiempo después de cada registro, jfa-go eliminará/deshabilitará la cuenta. Puede cambiar este comportamiento en la configuración.",
"aboutProgram": "Acerca de",
"version": "Versión",
"commitNoun": "Cometer",
"newUser": "Nuevo usuario",
"profile": "Perfil",
"unknown": "Desconocido",
"label": "Etiqueta",
"announce": "Anunciar",
"subject": "Asunto del email",
"message": "Mensaje",
"variables": "Variables",
"preview": "Previsualizar",
"reset": "Reiniciar",
"edit": "Editar",
"extendExpiry": "Extender el vencimiento",
"customizeMessages": "Personalizar emails",
"customizeMessagesDescription": "Si no desea utilizar las plantillas de correo electrónico de jfa-go, puede crear las suyas propias con Markdown.",
"markdownSupported": "Se admite Markdown.",
"modifySettings": "Modificar configuración",
"modifySettingsDescription": "Aplique la configuración de un perfil existente u obténgalos directamente de un usuario.",
"applyHomescreenLayout": "Aplicar el diseño de la pantalla de inicio",
"sendDeleteNotificationEmail": "Enviar notificación a correo",
"sendDeleteNotifiationExample": "Tu cuenta ha sido eliminada.",
"settingsRestart": "Reiniciar",
"settingsRestarting": "Reiniciando…",
"settingsRestartRequired": "Reinicio necesario",
"settingsRestartRequiredDescription": "Es necesario reiniciar para aplicar algunas configuraciones que cambió. ¿Reiniciar ahora o más tarde?",
"settingsApplyRestartLater": "Aplicar, reiniciar más tarde",
"settingsApplyRestartNow": "Aplicar, reiniciar más tarde",
"settingsApplied": "Se aplicó la configuración.",
"settingsRefreshPage": "Actualiza la página en unos segundos.",
"settingsRequiredOrRestartMessage": "Nota: {n} indica un campo obligatorio, {n} indica que los cambios requieren un reinicio.",
"settingsSave": "Guardar",
"ombiUserDefaults": "Valores predeterminados de usuario de Ombi",
"ombiUserDefaultsDescription": "Cree un usuario Ombi y configúrelo, luego selecciónelo a continuación. Sus configuraciones / permisos se almacenarán y aplicarán a los nuevos usuarios de Ombi creados por jfa-go",
"userProfiles": "Perfiles de usuario",
"userProfilesDescription": "Los perfiles se aplican a los usuarios cuando crean una cuenta. Un perfil incluye los derechos de acceso a la biblioteca y el diseño de la pantalla de inicio.",
"userProfilesIsDefault": "Defecto",
"userProfilesLibraries": "Bibliotecas",
"addProfile": "Agregar perfil",
"addProfileDescription": "Cree un usuario de Jellyfin y configúrelo, luego selecciónelo a continuación. Cuando este perfil se aplica a una invitación, se crearán nuevos usuarios con la configuración.",
"addProfileNameOf": "Nombre de perfil",
"addProfileStoreHomescreenLayout": "Diseño de la pantalla de inicio de la tienda",
"inviteNoUsersCreated": "¡Ninguno todavía!",
"inviteUsersCreated": "Usuarios creados",
"inviteNoProfile": "Sin perfil",
"inviteDateCreated": "Creado",
"inviteRemainingUses": "Usos restantes",
"inviteNoInvites": "Ninguno",
"inviteExpiresInTime": "Caduca en {n}",
"notifyEvent": "Notificar en:",
"notifyInviteExpiry": "Al vencimiento",
"notifyUserCreation": "Sobre la creación de usuarios",
"conditionals": "Condicionales",
"donate": "Donar"
},
"notifications": {
"changedEmailAddress": "Se cambió la dirección de correo electrónico de {n}.",
"userCreated": "Usuario {n} creado.",
"createProfile": "Perfil creado {n}.",
"saveSettings": "Se guardaron las configuraciones",
"saveEmail": "Correo electrónico guardado.",
"sentAnnouncement": "Anuncio enviado.",
"setOmbiDefaults": "Valores predeterminados de ombi almacenados.",
"updateApplied": "Actualización aplicada, por favor reinicie.",
"errorConnection": "No se pudo conectar a jfa-go.",
"error401Unauthorized": "No autorizado. Intente actualizar la página.",
"errorSettingsAppliedNoHomescreenLayout": "Se aplicó la configuración, pero es posible que no se haya aplicado el diseño de la pantalla de inicio.",
"errorHomescreenAppliedNoSettings": "Se aplicó el diseño de la pantalla de inicio, pero es posible que no se haya aplicado la configuración.",
"errorSettingsFailed": "La aplicación falló.",
"errorLoginBlank": "El nombre de usuario y/o la contraseña se dejaron en blanco.",
"errorUnknown": "Error desconocido.",
"errorSaveEmail": "No se pudo guardar el correo electrónico.",
"errorBlankFields": "Los campos se dejaron en blanco",
"errorDeleteProfile": "No se pudo borrar el perfil {n}",
"errorLoadProfiles": "No se pudieron cargar los perfiles.",
"errorCreateProfile": "No se pudo crear el perfil {n}",
"errorSetDefaultProfile": "No se pudo establecer el perfil predeterminado.",
"errorLoadUsers": "No se pudieron cargar los usuarios.",
"errorSaveSettings": "No se pudo guardar la configuración.",
"errorLoadSettings": "No se pudo cargar la configuración.",
"errorSetOmbiDefaults": "No se pudieron almacenar los valores predeterminados de ombi.",
"errorLoadOmbiUsers": "No se pudieron cargar los usuarios de ombi.",
"errorChangedEmailAddress": "No se pudo cambiar la dirección de correo electrónico de {n}.",
"errorFailureCheckLogs": "Fallido (ver consola / registros)",
"errorPartialFailureCheckLogs": "Fallo parcial (ver consola / registros)",
"errorUserCreated": "No se pudo crear el usuario {n}.",
"errorSendWelcomeEmail": "No se pudo enviar el correo electrónico de bienvenida (verifique la consola / registros)",
"errorApplyUpdate": "No se pudo aplicar la actualización, intente manualmente.",
"errorCheckUpdate": "No se pudo comprobar la actualización.",
"updateAvailable": "Hay una nueva actualización disponible, verifique la configuración.",
"noUpdatesAvailable": "No hay nuevas actualizaciones disponibles."
},
"quantityStrings": {
"modifySettingsFor": {
"singular": "Modificar la configuración de {n} usuario",
"plural": "Modificar la configuración de {n} usuarios"
},
"deleteNUsers": {
"singular": "Eliminar {n} usuario",
"plural": "Eliminar {n} usuarios"
},
"disableUsers": {
"singular": "Deshabilitar {n} usuario",
"plural": "Inhabilitar {n} usuarios"
},
"reEnableUsers": {
"singular": "Reactivar {n} usuario",
"plural": "Reactivar {n} usuarios"
},
"addUser": {
"singular": "Agregar usuario",
"plural": "Agregar usuarios"
},
"deleteUser": {
"singular": "Borrar usuario",
"plural": "Borrar usuarios"
},
"deletedUser": {
"singular": "Usuario eliminado {n}.",
"plural": "Usuarios eliminados {n}."
},
"disabledUser": {
"singular": "Usuario deshabilitado {n}.",
"plural": "Usuarios deshabilitados {n}."
},
"enabledUser": {
"singular": "Usuario {n} habilitado.",
"plural": "Usuarios {n} habilitados."
},
"announceTo": {
"singular": "Anunciar al usuario {n}",
"plural": "Anunciar a los usuarios {n}"
},
"appliedSettings": {
"singular": "Se aplicó la configuración al usuario {n}.",
"plural": "Se aplicó la configuración a los usuarios {n}."
},
"extendExpiry": {
"singular": "Extender la expiración para el usuario {n}",
"plural": "Extender la expiración para los usuarios {n}"
},
"extendedExpiry": {
"singular": "Caducidad extendida para el usuario {n}.",
"plural": "Caducidad extendida para los usuarios {n}."
}
}
}

View File

@@ -7,6 +7,7 @@
"invites": "Invitations",
"accounts": "Comptes",
"settings": "Réglages",
"inviteMonths": "Mois",
"inviteDays": "Jours",
"inviteHours": "Heures",
"inviteMinutes": "Minutes",
@@ -33,7 +34,7 @@
"modifySettings": "Modifier les paramètres",
"modifySettingsDescription": "Appliquez les paramètres à partir d'un profil existant ou obtenez-les directement auprès d'un utilisateur.",
"applyHomescreenLayout": "Appliquer la disposition de l'écran d'accueil",
"sendDeleteNotificationEmail": "Envoyer un e-mail de notification",
"sendDeleteNotificationEmail": "Envoyer un message de notification",
"sendDeleteNotifiationExample": "Votre compte a été supprimé.",
"settingsRestartRequired": "Redémarrage nécessaire",
"settingsRestartRequiredDescription": "Un redémarrage est nécessaire pour appliquer certains paramètres que vous avez modifiés. Redémarrer maintenant ou plus tard ?",
@@ -56,7 +57,6 @@
"inviteNoUsersCreated": "Aucun pour l'instant !",
"inviteUsersCreated": "Utilisateurs créer",
"inviteNoProfile": "Aucun profil",
"copy": "Copier",
"inviteDateCreated": "Créer",
"inviteRemainingUses": "Utilisations restantes",
"inviteNoInvites": "Aucune",
@@ -68,15 +68,34 @@
"settingsRestarting": "Redémarrage…",
"settingsRestart": "Redémarrer",
"announce": "Annoncer",
"subject": "Sujet du courriel",
"subject": "Sujet",
"message": "Message",
"markdownSupported": "Markdown est pris en charge.",
"customizeEmailsDescription": "Si vous ne souhaitez pas utiliser les modèles d'e-mails de jfa-go, vous pouvez créer les vôtres à l'aide de Markdown.",
"customizeMessagesDescription": "Si vous ne souhaitez pas utiliser les modèles d'e-mails de jfa-go, vous pouvez créer les vôtres à l'aide de Markdown.",
"variables": "Variables",
"preview": "Aperçu",
"reset": "Réinitialiser",
"edit": "Éditer",
"customizeEmails": "Personnaliser les e-mails"
"customizeMessages": "Personnaliser les e-mails",
"inviteDuration": "Durée de l'invitation",
"enabled": "Activé",
"disabled": "Désactivé",
"reEnable": "Ré-activé",
"disable": "Désactivé",
"admin": "Administrateur",
"expiry": "Expiration",
"advancedSettings": "Paramètres avancés",
"userExpiry": "Expiration de l'utilisateur",
"updates": "Mises à jour",
"update": "Mise à jour",
"download": "Téléchargement",
"search": "Recherche",
"conditionals": "Conditions",
"userExpiryDescription": "Un laps de temps spécifié après chaque inscription, jfa-go supprimera / désactivera le compte. Vous pouvez modifier ce comportement dans les paramètres.",
"donate": "Faire un don",
"extendExpiry": "Prolonger l'expiration",
"contactThrough": "Contactez par :",
"sendPIN": "Demandez à l'utilisateur d'envoyer le code PIN ci-dessous au bot."
},
"notifications": {
"changedEmailAddress": "Adresse e-mail modifiée de {n}.",
@@ -105,10 +124,17 @@
"errorFailureCheckLogs": "Échec (vérifier la console / les journaux)",
"errorPartialFailureCheckLogs": "Panne partielle (vérifier la console / les journaux)",
"errorUserCreated": "Echec lors de la création de l'utilisateur {n}.",
"errorSendWelcomeEmail": "Echec lors de l'envoi du mail de bienvenue (vérifier la console/les journaux)",
"errorSendWelcomeEmail": "Echec lors de l'envoi du message de bienvenue (vérifier la console/les journaux)",
"sentAnnouncement": "Annonce envoyée.",
"saveEmail": "Email enregistré.",
"errorSaveEmail": "Échec de l'enregistrement de l'e-mail."
"errorSaveEmail": "Échec de l'enregistrement de l'e-mail.",
"updateApplied": "Mise à jour appliquée, veuillez redémarrer.",
"errorApplyUpdate": "Échec de l'application de la mise à jour, essayez manuellement.",
"errorCheckUpdate": "Échec de la vérification de la mise à jour.",
"updateAvailable": "Une nouvelle mise à jour est disponible, vérifiez les paramètres.",
"noUpdatesAvailable": "Aucune nouvelle mise à jour disponible.",
"telegramVerified": "Compte Telegram vérifié.",
"updateAppliedRefresh": "Mise à jour appliquée, veuillez actualiser."
},
"quantityStrings": {
"modifySettingsFor": {
@@ -138,6 +164,30 @@
"announceTo": {
"singular": "Annonce à {n} utilisateur",
"plural": "Annonce à {n} utilisateurs"
},
"enabledUser": {
"plural": "{n} utilisateurs activés.",
"singular": "{n} utilisateur activé."
},
"extendExpiry": {
"singular": "Prolonger l'expiration pour {n} utilisateur",
"plural": "Prolonger l'expiration pour {n} utilisateurs"
},
"extendedExpiry": {
"singular": "Expiration prolongée pour {n} utilisateur.",
"plural": "Expiration prolongée pour {n} utilisateurs."
},
"disableUsers": {
"singular": "Désactiver {n} utilisateur",
"plural": "Désactiver {n} utilisateurs"
},
"reEnableUsers": {
"singular": "Ré-activer {n} utilisateur",
"plural": "Ré-activer {n} utilisateurs"
},
"disabledUser": {
"singular": "{n} utilisateur désactivé.",
"plural": "{n} utilisateurs désactivés."
}
}
}

View File

@@ -58,7 +58,6 @@
"inviteNoUsersCreated": "Belum ada!",
"inviteUsersCreated": "Pengguna yang telah dibuat",
"inviteNoProfile": "Tidak ada profil",
"copy": "Salin",
"inviteDateCreated": "Dibuat",
"inviteRemainingUses": "Penggunaan yang tersisa",
"inviteNoInvites": "Tidak ada",
@@ -70,8 +69,8 @@
"preview": "Pratinjau",
"reset": "Setel ulang",
"edit": "Edit",
"customizeEmails": "Sesuaikan Email",
"customizeEmailsDescription": "Jika Anda tidak ingin menggunakan templat email jfa-go, Anda dapat membuatnya sendiri menggunakan Markdown.",
"customizeMessages": "Sesuaikan Email",
"customizeMessagesDescription": "Jika Anda tidak ingin menggunakan templat email jfa-go, Anda dapat membuatnya sendiri menggunakan Markdown.",
"announce": "Mengumumkan",
"subject": "Subjek Email",
"message": "Pesan",

View File

@@ -32,7 +32,7 @@
"modifySettings": "Instellingen aanpassen",
"modifySettingsDescription": "Pas instellingen van een bestaand profiel toe, of neem ze direct over van een gebruiker.",
"applyHomescreenLayout": "Sla startpagina indeling op",
"sendDeleteNotificationEmail": "Stuur meldingse-mail",
"sendDeleteNotificationEmail": "Stuur melding",
"sendDeleteNotifiationExample": "Je account is verwijderd.",
"settingsRestartRequired": "Herstart nodig",
"settingsRestartRequiredDescription": "Er is een herstart nodig om de wijzigingen door te voeren. Herstart nu of later?",
@@ -55,7 +55,6 @@
"inviteNoUsersCreated": "Nog geen!",
"inviteUsersCreated": "Aangemaakte gebruikers",
"inviteNoProfile": "Geen profiel",
"copy": "Kopiëer",
"inviteDateCreated": "Aangemaakt",
"inviteRemainingUses": "Resterend aantal keer te gebruiken",
"inviteNoInvites": "Geen",
@@ -68,14 +67,14 @@
"settingsRestarting": "Aan het herstarten…",
"announce": "Aankondiging",
"markdownSupported": "Markdown wordt ondersteund.",
"subject": "E-mailonderwerp",
"subject": "Onderwerp",
"message": "Bericht",
"variables": "Variabelen",
"customizeEmailsDescription": "Als je de e-mailsjablonen van jfa-go niet wilt gebruiken, kun je met gebruik van Markdown je eigen aanmaken.",
"customizeMessagesDescription": "Als je de e-mailsjablonen van jfa-go niet wilt gebruiken, kun je met gebruik van Markdown je eigen aanmaken.",
"preview": "Voorbeeld",
"reset": "Resetten",
"edit": "Bewerken",
"customizeEmails": "E-mails aanpassen",
"customizeMessages": "E-mails aanpassen",
"inviteDuration": "Geldigheidsduur uitnodiging",
"userExpiryDescription": "Een bepaalde tijd na elke aanmelding, wordt de account verwijderd/uitgeschakeld door jfa-go. Dit kan aangepast worden in de instellingen.",
"enabled": "Ingeschakeld",
@@ -88,7 +87,20 @@
"update": "Bijwerken",
"download": "Download",
"search": "Zoeken",
"advancedSettings": "Geavanceerde instellingen"
"advancedSettings": "Geavanceerde instellingen",
"inviteMonths": "Maanden",
"reEnable": "Opnieuw inschakelen",
"disable": "Uitschakelen",
"conditionals": "Voorwaarden",
"donate": "Doneer",
"contactThrough": "Stuur bericht via:",
"sendPIN": "Vraag de gebruiker om onderstaande pincode naar de bot te sturen.",
"add": "Voeg toe",
"searchDiscordUser": "Begin de Discord gebruikersnaam te typen om de gebruiker te vinden.",
"linkMatrixDescription": "Vul de gebruikersnaam en wachtwoord in van de gebruiker om als bot te gebruiken. De app start zodra ze zijn verstuurd.",
"select": "Selecteer",
"findDiscordUser": "Zoek Discord gebruiker",
"matrixHomeServer": "Adres home server"
},
"notifications": {
"changedEmailAddress": "E-mailadres van {n} gewijzigd.",
@@ -116,7 +128,7 @@
"errorChangedEmailAddress": "Wijzigen van e-mailadres van {n} mislukt.",
"errorFailureCheckLogs": "Mislukt (controleer console/logbestanden)",
"errorPartialFailureCheckLogs": "Gedeeltelijke fout (controleer console/logbestanden)",
"errorSendWelcomeEmail": "Versturen van welkomste-mail is mislukt (zie console/logs)",
"errorSendWelcomeEmail": "Versturen van welkomstbericht is mislukt (zie console/logs)",
"errorUserCreated": "Aanmaken van gebruiker {n} is mislukt.",
"sentAnnouncement": "Aankondiging verzonden.",
"saveEmail": "E-mail opgeslagen.",
@@ -125,7 +137,10 @@
"errorApplyUpdate": "Installatie van update mislukt, probeer handmatig.",
"errorCheckUpdate": "Controleren op update mislukt.",
"updateAvailable": "Er is een nieuwe update beschikbaar, kijk bij instellingen.",
"noUpdatesAvailable": "Geen nieuwe updates beschikbaar."
"noUpdatesAvailable": "Geen nieuwe updates beschikbaar.",
"telegramVerified": "Telegram-account goedgekeurd.",
"updateAppliedRefresh": "Update toegepast, ververs alsjeblieft.",
"accountConnected": "Account gekoppeld."
},
"quantityStrings": {
"modifySettingsFor": {
@@ -163,6 +178,22 @@
"extendedExpiry": {
"singular": "Verloop uitgesteld voor {n} gebruiker.",
"plural": "Verloop uitgesteld voor {n} gebruikers."
},
"disableUsers": {
"singular": "Schakel {n} gebruiker uit",
"plural": "Schakel {n} gebruikers uit"
},
"reEnableUsers": {
"singular": "Schakel {n} gebruiker opnieuw in",
"plural": "Schakel {n} gebruikers opnieuw in"
},
"disabledUser": {
"singular": "{n} gebruiker uitgeschakeld.",
"plural": "{n} gebruikers uitgeschakeld."
},
"enabledUser": {
"singular": "{n} gebruiker ingeschakeld.",
"plural": "{n} gebruikers ingeschakeld."
}
}
}

View File

@@ -33,7 +33,7 @@
"modifySettings": "Modificar configurações",
"modifySettingsDescription": "Aplique as configurações de um perfil existente ou obtenha-as diretamente de um usuário.",
"applyHomescreenLayout": "Aplicar layout na tela inicial",
"sendDeleteNotificationEmail": "Enviar email de notificação",
"sendDeleteNotificationEmail": "Enviar mensagem de notificação",
"sendDeleteNotifiationExample": "Sua conta foi deletada.",
"settingsRestartRequired": "Necessário reiniciar",
"settingsRestartRequiredDescription": "É necessário reiniciar para aplicar algumas configurações alteradas. Deseja reiniciar agora ou mais tarde?",
@@ -56,7 +56,6 @@
"inviteNoUsersCreated": "Nenhum ainda!",
"inviteUsersCreated": "Usuários criado",
"inviteNoProfile": "Sem Perfil",
"copy": "Copiar",
"inviteDateCreated": "Criado",
"inviteRemainingUses": "Uso restantes",
"inviteNoInvites": "Nenhum",
@@ -67,27 +66,40 @@
"settingsRestart": "Reiniciar",
"settingsRestarting": "Reiniciando…",
"announce": "Anunciar",
"subject": "Assunto do email",
"subject": "Assunto",
"message": "Mensagem",
"markdownSupported": "Suporte a Markdown.",
"customizeEmailsDescription": "Se não quiser usar os modelos de email do jfa-go, você pode criar o seu próprio usando o Markdown.",
"customizeMessagesDescription": "Se não quiser usar os modelos de email do jfa-go, você pode criar o seu próprio usando o Markdown.",
"variables": "Variáveis",
"preview": "Pre-visualizar",
"reset": "Reiniciar",
"edit": "Editar",
"customizeEmails": "Customizar Emails",
"customizeMessages": "Customizar Emails",
"disabled": "Desativado",
"userExpiryDescription": "Após um determinado período de tempo de cada inscrição, o jfa-go apagará/desabilitará a conta. Você pode alterar essa opção nas configurações.",
"inviteDuration": "Duração do Convite",
"enabled": "Habilitado",
"admin": "Admin",
"expiry": "Expiração",
"expiry": "Expira",
"userExpiry": "Vencimento do Usuário",
"extendExpiry": "Extender o vencimento",
"updates": "Atualizações",
"update": "Atualizar",
"download": "Download",
"search": "Procurar"
"search": "Procurar",
"advancedSettings": "Configurações Avançada",
"inviteMonths": "Meses",
"reEnable": "Reativar",
"disable": "Desativar",
"conditionals": "Condicionais",
"donate": "Doar",
"contactThrough": "Contato através:",
"sendPIN": "Peça ao usuário para enviar o PIN abaixo para o bot.",
"searchDiscordUser": "Digite o nome de usuário do Discord.",
"findDiscordUser": "Encontrar usuário Discord",
"add": "Adicionar",
"linkMatrixDescription": "Digite o nome de usuário e a senha para usar como bot. Depois de enviado, o aplicativo será reiniciado.",
"select": "Selecionar"
},
"notifications": {
"changedEmailAddress": "Endereço de e-mail alterado de {n}.",
@@ -116,7 +128,7 @@
"errorFailureCheckLogs": "Falha (verificar console/logs)",
"errorPartialFailureCheckLogs": "Falha parcial (verificar console/logs)",
"errorUserCreated": "Falha ao criar o usuário {n}.",
"errorSendWelcomeEmail": "Falha ao enviar e-mail de boas-vindas (verifique console/logs)",
"errorSendWelcomeEmail": "Falha ao enviar mensagem de boas-vindas (verifique console/logs)",
"sentAnnouncement": "Comunicado enviado.",
"saveEmail": "Email salvo.",
"errorSaveEmail": "Falha ao salvar o email.",
@@ -124,7 +136,10 @@
"errorApplyUpdate": "Falha ao aplicar a atualização, tente manualmente.",
"updateAvailable": "Uma nova atualização está disponível, verifique as configurações.",
"errorCheckUpdate": "Falha ao verificar atualizações.",
"noUpdatesAvailable": "Nenhuma atualização disponível."
"noUpdatesAvailable": "Nenhuma atualização disponível.",
"telegramVerified": "Conta do Telegram verificada.",
"updateAppliedRefresh": "Atualização instalada, atualize.",
"accountConnected": "Conta conectada."
},
"quantityStrings": {
"modifySettingsFor": {
@@ -162,6 +177,22 @@
"extendedExpiry": {
"plural": "Extender o vencimento para {n} usuários.",
"singular": "Extender vencimento para {n}."
},
"disableUsers": {
"singular": "Desativar {n} usuário",
"plural": "Desativar {n} usuários"
},
"reEnableUsers": {
"singular": "Reativar {n} usuário",
"plural": "Reativar {n} usuários"
},
"disabledUser": {
"singular": "{n} Usuário desativado.",
"plural": "{n} usuários desativado."
},
"enabledUser": {
"singular": "{n} Usuário habilitado.",
"plural": "{n} Usuários habilitado."
}
}
}

View File

@@ -37,8 +37,8 @@
"preview": "Förhandsvisning",
"reset": "Återställ",
"edit": "Redigera",
"customizeEmails": "Anpassa e-post",
"customizeEmailsDescription": "Om du inte vill använda jfa-go's e-postmallar, så kan du skapa dina egna med Markdown.",
"customizeMessages": "Anpassa e-post",
"customizeMessagesDescription": "Om du inte vill använda jfa-go's e-postmallar, så kan du skapa dina egna med Markdown.",
"markdownSupported": "Markdown stöds.",
"modifySettings": "Ändra inställningar",
"modifySettingsDescription": "Tillämpa inställningar från en befintlig profil eller kopiera dem direkt från en användare.",
@@ -68,7 +68,6 @@
"inviteNoUsersCreated": "Ingen än!",
"inviteUsersCreated": "Skapade användare",
"inviteNoProfile": "Ingen profil",
"copy": "Kopiera",
"inviteDateCreated": "Skapad",
"inviteRemainingUses": "Återstående användningar",
"inviteNoInvites": "Ingen",

View File

@@ -8,8 +8,19 @@
"password": "Passwort",
"emailAddress": "E-Mail-Adresse",
"submit": "Absenden",
"success": "Erfolg",
"success": "Erfolgreich",
"error": "Fehler",
"theme": "Thema"
"copy": "Kopieren",
"theme": "Thema",
"time24h": "24h-Format",
"time12h": "12h-Format",
"copied": "Kopiert",
"linkTelegram": "Link Telegram",
"contactEmail": "Kontakt über E-Mail",
"contactTelegram": "Kontakt über Telegram",
"linkDiscord": "Link Discord",
"linkMatrix": "Link Matrix",
"send": "Senden",
"contactDiscord": "Kontakt über Discord"
}
}

View File

@@ -10,6 +10,10 @@
"submit": "Καταχώρηση",
"success": "Επιτυχία",
"error": "Σφάλμα",
"theme": "Θέμα"
"copy": "Αντιγραφή",
"theme": "Θέμα",
"time24h": "24 Ώρες",
"time12h": "12 Ώρες",
"copied": "Αντιγράφηκε"
}
}

5
lang/common/en-gb.json Normal file
View File

@@ -0,0 +1,5 @@
{
"meta": {
"name": "English (GB)"
}
}

View File

@@ -8,8 +8,19 @@
"emailAddress": "Email Address",
"name": "Name",
"submit": "Submit",
"send": "Send",
"success": "Success",
"error": "Error",
"copy": "Copy",
"copied": "Copied",
"time24h": "24h Time",
"time12h": "12h Time",
"linkTelegram": "Link Telegram",
"contactEmail": "Contact through Email",
"contactTelegram": "Contact through Telegram",
"linkDiscord": "Link Discord",
"linkMatrix": "Link Matrix",
"contactDiscord": "Contact through Discord",
"theme": "Theme"
}
}

19
lang/common/es-es.json Normal file
View File

@@ -0,0 +1,19 @@
{
"meta": {
"name": "Español(ES)"
},
"strings": {
"username": "Nombre de usuario",
"password": "Contraseña",
"emailAddress": "Dirección de correo electrónico",
"name": "Nombre",
"submit": "Enviar",
"success": "Éxito",
"error": "Error",
"copy": "Copiar",
"copied": "Copiado",
"time24h": "24 horas",
"time12h": "24 horas",
"theme": "Tema"
}
}

View File

@@ -11,6 +11,13 @@
"submit": "Soumettre",
"success": "Succès",
"error": "Erreur",
"theme": "Thème"
"copy": "Copier",
"time24h": "Temps 24h",
"time12h": "Temps 12h",
"theme": "Thème",
"copied": "Copié",
"linkTelegram": "Lien Telegram",
"contactEmail": "Contact par e-mail",
"contactTelegram": "Contact par Telegram"
}
}

View File

@@ -10,6 +10,9 @@
"submit": "Submit",
"success": "Sukses",
"error": "Error",
"copy": "Salin",
"time24h": "Waktu 24 jam",
"time12h": "Waktu 12 jam",
"theme": "Tema"
}
}

View File

@@ -8,8 +8,19 @@
"password": "Wachtwoord",
"emailAddress": "E-mailadres",
"submit": "Verstuur",
"success": "Success",
"success": "Succes",
"error": "Fout",
"theme": "Thema"
"copy": "Kopiëer",
"theme": "Thema",
"time24h": "24u-formaat",
"time12h": "12u-formaat",
"copied": "Gekopieerd",
"linkTelegram": "Koppel Telegram",
"contactEmail": "Stuur e-mailbericht",
"contactTelegram": "Stuur Telegram-bericht",
"send": "Verstuur",
"linkDiscord": "Koppel Discord",
"linkMatrix": "Koppel Matrix",
"contactDiscord": "Stuur Discord bericht"
}
}

View File

@@ -10,6 +10,17 @@
"submit": "Enviar",
"success": "Sucesso",
"error": "Erro",
"theme": "Tema"
"copy": "Copiar",
"theme": "Tema",
"time24h": "Horário 24h",
"time12h": "Horário 12h",
"copied": "Copiado",
"linkTelegram": "Link do Telegram",
"contactEmail": "Contato por Email",
"contactTelegram": "Contato pelo Telegram",
"send": "Enviar",
"linkDiscord": "Link do Discord",
"linkMatrix": "Link do Matrix",
"contactDiscord": "Contato através do Discord"
}
}

View File

@@ -10,6 +10,9 @@
"submit": "Skicka",
"success": "Lyckades",
"error": "Fel",
"copy": "Kopiera",
"time24h": "24 timmarsklocka",
"time12h": "12 timmarsklocka",
"theme": "Tema"
}
}

View File

@@ -3,7 +3,8 @@
"name": "Deutsch (DE)"
},
"strings": {
"ifItWasNotYou": "Wenn du das nicht warst, ignoriere bitte diese E-Mail.",
"ifItWasNotYou": "Wenn du das nicht warst, ignoriere bitte dies.",
"reason": "Grund",
"helloUser": "Hallo {username},"
},
"userCreated": {
@@ -26,12 +27,12 @@
"ifItWasYou": "Wenn du das warst, gib die PIN unten in die Eingabeaufforderung ein.",
"codeExpiry": "Der Code wird am {date}, um {time} UTC ablaufen, was in {expiresInMinutes} ist.",
"pin": "PIN",
"name": "Passwortzurücksetzung"
"name": "Passwortzurücksetzung",
"ifItWasYouLink": "Wenn du das warst, klick auf den Link unten."
},
"userDeleted": {
"title": "Dein Konto wurde gelöscht - Jellyfin",
"yourAccountWasDeleted": "Dein Jellyfin-Konto wurde gelöscht.",
"reason": "Grund",
"name": "Benutzerlöschung"
},
"inviteEmail": {
@@ -48,12 +49,29 @@
"welcome": "Willkommen bei Jellyfin!",
"youCanLoginWith": "Du kannst dich mit den mit den untenstehenden Zugangsdaten anmelden",
"jellyfinURL": "URL",
"name": "Willkommens-E-Mail"
"name": "Willkommen",
"yourAccountWillExpire": "Dein Konto läuft am {date} ab."
},
"emailConfirmation": {
"title": "Bestätige deine E-Mail - Jellyfin",
"clickBelow": "Klicke den untenstehenden Link, um deine E-Mail-Adresse zu bestätigen, und fange an, Jellyfin zu benutzen.",
"confirmEmail": "E-Mail bestätigen",
"name": "Bestätigungs-E-Mail"
},
"userExpired": {
"name": "Benutzer Ablaufdatum",
"title": "Dein Konto ist abgelaufen - Jellyfin",
"yourAccountHasExpired": "Dein Konto ist abgelaufen.",
"contactTheAdmin": "Kontaktiere den Administrator für weitere Informationen."
},
"userDisabled": {
"name": "Benutzer deaktiviert",
"title": "Dein Konto wurde deaktiviert - Jellyfin",
"yourAccountWasDisabled": "Dein Konto wurde deaktiviert."
},
"userEnabled": {
"name": "Benutzer aktiviert",
"title": "Dein Konto wurde wieder freigeschaltet - Jellyfin",
"yourAccountWasEnabled": "Dein Konto wurde wieder aktiviert."
}
}

View File

@@ -4,31 +4,36 @@
},
"strings": {
"ifItWasNotYou": "Αν δεν ήσασταν εσείς, παρακαλώ αγνοήστε αυτό το email.",
"reason": "Λόγος",
"helloUser": "Γεία σου {username},"
},
"userCreated": {
"title": "Σημείωση: Δημιουργήθηκε χρήστης",
"aUserWasCreated": "Δημιουργήθηκε ένας χρήστης χρησιμοποιώντας τον κωδικό {code}.",
"time": "Ώρα",
"notificationNotice": "Σημείωση: Τα email ειδοποιήσεων μπορούν να ενεργοποιηθούν στον πίνακα ελέγχου διαχειριστή."
"notificationNotice": "Σημείωση: Τα email ειδοποιήσεων μπορούν να ενεργοποιηθούν στον πίνακα ελέγχου διαχειριστή.",
"name": "Δημιουργία χρήστη"
},
"inviteExpiry": {
"title": "Σημείωση: Η πρόσκληση έληξε",
"inviteExpired": "Η πρόσκληση έληξε.",
"expiredAt": "Ο κωδικός {code} έληξε στις {time}.",
"notificationNotice": "Σημείωση: Τα email ειδοποιήσεων μπορούν να ενεργοποιηθούν στον πίνακα ελέγχου διαχειριστή."
"notificationNotice": "Σημείωση: Τα email ειδοποιήσεων μπορούν να ενεργοποιηθούν στον πίνακα ελέγχου διαχειριστή.",
"name": "Λήξη πρόσκλησης"
},
"passwordReset": {
"title": "Ζητήθηκε επαναφορά κωδικού πρόσβασης - Jellyfin",
"someoneHasRequestedReset": "Κάποιος ζήτησε πρόσφατα επαναφορά κωδικού πρόσβασης στο Jellyfin.",
"ifItWasYou": "Εάν ήσασταν εσείς, εισαγάγετε το πιν στο πεδίο.",
"codeExpiry": "Ο κωδικός θα λήξει στις {date}, στις {time} UTC, το οποίο είναι σε {expiresInMinutes}.",
"pin": "PIN"
"pin": "PIN",
"name": "Επαναφορά κωδικού πρόσβασης",
"ifItWasYouLink": "Εάν ήσασταν εσείς, κάντε κλικ στον παρακάτω σύνδεσμο."
},
"userDeleted": {
"title": "Ο λογαριασμός σας διαγράφηκε - Jellyfin",
"yourAccountWasDeleted": "Ο λογαριασμός σας Jellyfin διαγράφηκε.",
"reason": "Λόγος"
"name": "Διαγραφή χρήστη"
},
"inviteEmail": {
"title": "Πρόσκληση - Jellyfin",
@@ -36,17 +41,37 @@
"youHaveBeenInvited": "Έχετε προσκληθεί στο Jellyfin.",
"toJoin": "Για να συμμετέχετε, ακολουθήστε τον παρακάτω σύνδεσμο.",
"inviteExpiry": "Αυτή η πρόσκληση θα λήξει στις {date} στις {time}, που είναι σε {expiresInMinutes}, οπότε ενεργήστε γρήγορα.",
"linkButton": "Ρυθμίστε τον λογαριασμό σας"
"linkButton": "Ρυθμίστε τον λογαριασμό σας",
"name": "Email πρόσκλησης"
},
"welcomeEmail": {
"title": "Καλώς ήλθατε στο Jellyfin",
"welcome": "Καλώς ήλθατε στο Jellyfin!",
"youCanLoginWith": "Μπορείτε να συνδεθείτε με τα παρακάτω στοιχεία",
"jellyfinURL": "URL"
"jellyfinURL": "URL",
"name": "Email καλωσορίσματος",
"yourAccountWillExpire": "Ο λογαριασμός σας θα λήξει στις {date}."
},
"emailConfirmation": {
"title": "Επιβεβαιώστε το email σας - Jellyfin",
"clickBelow": "Κάντε κλικ στον παρακάτω σύνδεσμο για να επιβεβαιώσετε τη διεύθυνση email σας και ξεκινήστε να χρησιμοποιείτε το Jellyfin.",
"confirmEmail": "Επιβεβαίωση Email"
"confirmEmail": "Επιβεβαίωση Email",
"name": "Email επιβεβαίωσης"
},
"userExpired": {
"name": "Λήξη Χρήστη",
"title": "Ο λογαριασμός σας έληξε - Jellyfin",
"yourAccountHasExpired": "Ο λογαριασμός σας έχει λήξει.",
"contactTheAdmin": "Επικοινωνήστε με τον διαχειριστή για περισσότερες πληροφορίες."
},
"userDisabled": {
"name": "Ο χρήστης απενεργοποιήθηκε",
"title": "Ο λογαριασμός σας έχει απενεργοποιηθεί - Jellyfin",
"yourAccountWasDisabled": "Ο λογαριασμός σας απενεργοποιήθηκε."
},
"userEnabled": {
"title": "Ο λογαριασμός σας έχει ενεργοποιηθεί ξανά - Jellyfin",
"name": "Ο χρήστης ενεργοποιήθηκε",
"yourAccountWasEnabled": "Ο λογαριασμός σας ενεργοποιήθηκε εκ νέου."
}
}

5
lang/email/en-gb.json Normal file
View File

@@ -0,0 +1,5 @@
{
"meta": {
"name": "English (GB)"
}
}

View File

@@ -3,8 +3,9 @@
"name": "English (US)"
},
"strings": {
"ifItWasNotYou": "If this wasn't you, please ignore this email.",
"helloUser": "Hi {username},"
"ifItWasNotYou": "If this wasn't you, please ignore this.",
"helloUser": "Hi {username},",
"reason": "Reason"
},
"userCreated": {
"name": "User creation",
@@ -25,14 +26,24 @@
"title": "Password reset requested - Jellyfin",
"someoneHasRequestedReset": "Someone has recently requested a password reset on Jellyfin.",
"ifItWasYou": "If this was you, enter the pin below into the prompt.",
"ifItWasYouLink": "If this was you, click the link below.",
"codeExpiry": "The code will expire on {date}, at {time} UTC, which is in {expiresInMinutes}.",
"pin": "PIN"
},
"userDeleted": {
"name": "User deletion",
"title": "Your account was deleted - Jellyfin",
"yourAccountWasDeleted": "Your Jellyfin account was deleted.",
"reason": "Reason"
"yourAccountWasDeleted": "Your Jellyfin account was deleted."
},
"userDisabled": {
"name": "User disabled",
"title": "Your account has been disabled - Jellyfin",
"yourAccountWasDisabled": "Your account was disabled."
},
"userEnabled": {
"name": "User enabled",
"title": "Your account has been re-enabled - Jellyfin",
"yourAccountWasEnabled": "Your account was re-enabled."
},
"inviteEmail": {
"name": "Invite email",
@@ -44,10 +55,11 @@
"linkButton": "Setup your account"
},
"welcomeEmail": {
"name": "Welcome email",
"name": "Welcome",
"title": "Welcome to Jellyfin",
"welcome": "Welcome to Jellyfin!",
"youCanLoginWith": "You can login with the details below",
"yourAccountWillExpire": "Your account will expire on {date}.",
"jellyfinURL": "URL"
},
"emailConfirmation": {

77
lang/email/es-es.json Normal file
View File

@@ -0,0 +1,77 @@
{
"meta": {
"name": "Español(ES)"
},
"strings": {
"ifItWasNotYou": "Si no fue usted, ignore este correo electrónico.",
"helloUser": "Hola {username},",
"reason": "Razón"
},
"userCreated": {
"name": "Creación de usuarios",
"title": "Noticia: Usuario creado",
"aUserWasCreated": "Se creó un usuario con el código {code}.",
"time": "Hora",
"notificationNotice": "Nota: los correos electrónicos de notificación se pueden alternar en el panel de administración."
},
"inviteExpiry": {
"name": "Vencimiento de la invitación",
"title": "Aviso: Invitación caducada",
"inviteExpired": "Invitación caducada.",
"expiredAt": "El código {code} venció a las {time}.",
"notificationNotice": "Nota: Los correos electrónicos de notificación se pueden alternar en el panel de administración."
},
"passwordReset": {
"name": "Restablecimiento de contraseña",
"title": "Solicitud de restablecimiento de contraseña - Jellyfin",
"someoneHasRequestedReset": "Alguien ha solicitado recientemente un restablecimiento de contraseña en Jellyfin.",
"ifItWasYou": "Si era usted, ingrese el pin a continuación en el mensaje.",
"ifItWasYouLink": "Si fue usted, haga clic en el enlace de abajo.",
"codeExpiry": "El código vencerá el {date}, a las {time} UTC, que está en {expiresInMinutes}.",
"pin": "PIN"
},
"userDeleted": {
"name": "Eliminación de usuario",
"title": "Su cuenta fue eliminada - Jellyfin",
"yourAccountWasDeleted": "Su cuenta de Jellyfin fue eliminada."
},
"userDisabled": {
"name": "Usuario deshabilitado",
"title": "Su cuenta ha sido deshabilitada - Jellyfin",
"yourAccountWasDisabled": "Su cuenta fue inhabilitada."
},
"userEnabled": {
"name": "Usuario habilitado",
"title": "Su cuenta ha sido reactivada - Jellyfin",
"yourAccountWasEnabled": "Su cuenta se volvió a habilitar."
},
"inviteEmail": {
"name": "Correo electrónico",
"title": "Invitar - Jellyfin",
"hello": "Hola",
"youHaveBeenInvited": "Has sido invitado a Jellyfin.",
"toJoin": "Para unirse, siga el enlace a continuación.",
"inviteExpiry": "Esta invitación vencerá el {date} a las {time}, que está en {expiresInMinutes}, así que regístrese cuanto antes.",
"linkButton": "Configurar tu cuenta"
},
"welcomeEmail": {
"name": "Correo de bienvenida",
"title": "Bienvenido a Jellyfin",
"welcome": "¡Bienvenido a Jellyfin!",
"youCanLoginWith": "Puede iniciar sesión con los detalles a continuación",
"yourAccountWillExpire": "Su cuenta vencerá el {date}.",
"jellyfinURL": "URL"
},
"emailConfirmation": {
"name": "Email de confirmación",
"title": "Confirma tu correo electrónico - Jellyfin",
"clickBelow": "Haga clic en el enlace de abajo para confirmar su dirección de correo electrónico y comenzar a usar Jellyfin.",
"confirmEmail": "Confirmar correo electrónico"
},
"userExpired": {
"name": "Caducidad del usuario",
"title": "Tu cuenta ha caducado - Jellyfin",
"yourAccountHasExpired": "Tu cuenta ha expirado.",
"contactTheAdmin": "Comuníquese con el administrador para obtener más información."
}
}

View File

@@ -4,7 +4,8 @@
"author": "https://github.com/Cornichon420"
},
"strings": {
"ifItWasNotYou": "Si ce n'était pas toi, tu peux ignorer ce mail.",
"ifItWasNotYou": "Si ce n'était pas toi, tu peux ignorer ceci.",
"reason": "Motif",
"helloUser": "Salut {username},"
},
"userCreated": {
@@ -27,12 +28,12 @@
"ifItWasYou": "Si c'était bien toi, renseigne le code PIN en dessous.",
"codeExpiry": "Ce code expirera le {date}, à {time} UTC, soit dans {expiresInMinutes}.",
"pin": "PIN",
"name": "Réinitialisation du mot de passe"
"name": "Réinitialisation du mot de passe",
"ifItWasYouLink": "Si c'était bien toi, clique sur le lien en dessous."
},
"userDeleted": {
"title": "Ton compte a été désactivé - Jellyfin",
"yourAccountWasDeleted": "Ton compte Jellyfin a été supprimé.",
"reason": "Motif",
"name": "Suppression de l'utilisateur"
},
"inviteEmail": {
@@ -40,7 +41,7 @@
"hello": "Salut",
"youHaveBeenInvited": "Tu as été invité à rejoindre Jellyfin.",
"toJoin": "Pour continuer, suis le lien en dessous.",
"inviteExpiry": "L'invitation expirera le {date}, à {time}, soit dans {expiresInMinutes}, alors fais vite !",
"inviteExpiry": "L'invitation expirera le {date}, à {time}, soit dans {expiresInMinutes}, alors fais vite.",
"linkButton": "Lien",
"name": "Courriel d'invitation"
},
@@ -49,12 +50,29 @@
"title": "Bienvenue sur Jellyfin",
"welcome": "Bienvenue sur Jellyfin !",
"jellyfinURL": "URL",
"name": "Courriel de bienvenue"
"name": "Bienvenue",
"yourAccountWillExpire": "Ton compte expirera le {date}."
},
"emailConfirmation": {
"title": "Confirmez votre adresse e-mail - Jellyfin",
"clickBelow": "Clique sur le lien ci-dessous pour confirmer ton adresse e-mail et commencer à utiliser Jellyfin.",
"confirmEmail": "Confirmer l'adresse e-mail",
"name": "Email de confirmation"
},
"userExpired": {
"contactTheAdmin": "Contacte l'administrateur pour plus d'informations.",
"name": "Utilisateur expiré",
"title": "Ton compte a expiré - Jellyfin",
"yourAccountHasExpired": "Ton compte a expiré."
},
"userDisabled": {
"name": "Utilisateur désactivé",
"title": "Ton compte a été désactivé - Jellyfin",
"yourAccountWasDisabled": "Ton compte a été désactivé."
},
"userEnabled": {
"name": "Utilisateur activé",
"title": "Ton compte a été ré-activé - Jellyfin",
"yourAccountWasEnabled": "Ton compte a été ré-activé."
}
}

View File

@@ -4,6 +4,7 @@
},
"strings": {
"ifItWasNotYou": "Jika ini bukan kamu, silahkan mengabaikan email ini.",
"reason": "Alasan",
"helloUser": "Halo {username},"
},
"userCreated": {
@@ -31,7 +32,6 @@
"userDeleted": {
"title": "Akun anda telah dihapus - Jellyfin",
"yourAccountWasDeleted": "Akun Jellyfin anda telah dihapus.",
"reason": "Alasan",
"name": "Penghapusan pengguna"
},
"inviteEmail": {

View File

@@ -4,7 +4,8 @@
},
"strings": {
"ifItWasNotYou": "Se non sei stato tu, puoi ignorare questa email.",
"helloUser": "Ciao {username},"
"helloUser": "Ciao {username},",
"reason": "Motivo"
},
"userCreated": {
"title": "Nota: Utente creato",
@@ -27,8 +28,7 @@
},
"userDeleted": {
"title": "Il tuo account è stato eliminato - Jellyfin",
"yourAccountWasDeleted": "Il tuo account di Jellyfin è stato eliminato.",
"reason": "Motivo"
"yourAccountWasDeleted": "Il tuo account di Jellyfin è stato eliminato."
},
"inviteEmail": {
"title": "Invita - Jellyfin",

View File

@@ -3,7 +3,8 @@
"name": "Nederlands (NL)"
},
"strings": {
"ifItWasNotYou": "Als jij dit niet was, negeer dan alsjeblieft deze email.",
"ifItWasNotYou": "Als jij dit niet was, negeer dit dan alsjeblieft.",
"reason": "Reden",
"helloUser": "Hoi {username},"
},
"userCreated": {
@@ -23,15 +24,15 @@
"passwordReset": {
"title": "Wachtwoordreset aangevraagd - Jellyfin",
"someoneHasRequestedReset": "Iemand heeft recentelijk een wachtwoordreset aangevraagd in Jellyfin.",
"ifItWasYou": "Als jij dit was, voor dan onderstaande PIN in.",
"ifItWasYou": "Als jij dit was, voer dan onderstaande PIN in.",
"codeExpiry": "De code verloopt op {date}, op {time} UTC, dat is over {expiresInMinutes}.",
"pin": "PIN",
"name": "Wachtwoordreset"
"name": "Wachtwoordreset",
"ifItWasYouLink": "Als jij dit was, klik dan op onderstaande link."
},
"userDeleted": {
"title": "Je account is verwijderd - Jellyfin",
"yourAccountWasDeleted": "Je Jellyfin account is verwijderd.",
"reason": "Reden",
"name": "Gebruiker verwijderd"
},
"inviteEmail": {
@@ -48,7 +49,8 @@
"welcome": "Welkom bij Jellyfin!",
"youCanLoginWith": "Je kunt inloggen met onderstaande gegevens",
"jellyfinURL": "URL",
"name": "Welkomste-mail"
"name": "Welkom",
"yourAccountWillExpire": "Je account verloopt op {date}."
},
"emailConfirmation": {
"title": "Bevestig je e-mailadres - Jellyfin",
@@ -61,5 +63,15 @@
"title": "Je account is verlopen - Jellyfin",
"yourAccountHasExpired": "Je account is verlopen.",
"contactTheAdmin": "Neem contact op met de beheerder voor meer info."
},
"userDisabled": {
"title": "Je account is uitgeschakeld - Jellyfin",
"name": "Gebruiker uitgeschakeld",
"yourAccountWasDisabled": "Je account is uitgeschakeld."
},
"userEnabled": {
"yourAccountWasEnabled": "Je account is opnieuw ingeschakeld.",
"name": "Gebruiker ingeschakeld",
"title": "Je account is opnieuw ingeschakeld - Jellyfin"
}
}

View File

@@ -3,7 +3,8 @@
"name": "Português (BR)"
},
"strings": {
"ifItWasNotYou": "Se não foi você, ignore este e-mail.",
"ifItWasNotYou": "Se não foi você, ignore.",
"reason": "Razão",
"helloUser": "Ola {username},"
},
"userCreated": {
@@ -26,12 +27,12 @@
"ifItWasYou": "Se foi você, insira o PIN abaixo.",
"codeExpiry": "O código irá expirar em {date}, ás {time}, que está em {expiresInMinutes}.",
"pin": "PIN",
"name": "Redefinir senha"
"name": "Redefinir senha",
"ifItWasYouLink": "Se foi você, clique no link abaixo."
},
"userDeleted": {
"title": "Sua conta foi excluída - Jellyfin",
"yourAccountWasDeleted": "Sua conta Jellyfin foi excluída.",
"reason": "Razão",
"name": "Exclusão do usuário"
},
"inviteEmail": {
@@ -48,7 +49,8 @@
"welcome": "Bem vindo ao Jellyfin!",
"youCanLoginWith": "Abaixo está os detalhes para fazer o login",
"jellyfinURL": "URL",
"name": "Email de Boas vindas"
"name": "Bem-vindo",
"yourAccountWillExpire": "Sua conta irá expirar em {date}."
},
"emailConfirmation": {
"title": "Confirme seu email - Jellyfin",
@@ -61,5 +63,15 @@
"title": "Sua conta expirou - Jellyfin",
"yourAccountHasExpired": "Sua conta expirou.",
"contactTheAdmin": "Entre em contato com administrador para mais informações."
},
"userDisabled": {
"name": "Usuário desativado",
"title": "Sua conta foi desativada - Jellyfin",
"yourAccountWasDisabled": "Sua conta foi desativada."
},
"userEnabled": {
"title": "Sua conta foi reativada - Jellyfin",
"name": "Usuário ativado",
"yourAccountWasEnabled": "Sua conta foi reativada."
}
}

View File

@@ -4,7 +4,8 @@
},
"strings": {
"ifItWasNotYou": "Om detta inte var du, ignorera det här e-postmeddelandet.",
"helloUser": "Hej {användarnamn},"
"helloUser": "Hej {username},",
"reason": "Anledning"
},
"userCreated": {
"name": "Användarskapande",
@@ -31,8 +32,7 @@
"userDeleted": {
"name": "Radering av användare",
"title": "Ditt konto raderades - Jellyfin",
"yourAccountWasDeleted": "Ditt Jellyfin-konto raderades.",
"reason": "Anledning"
"yourAccountWasDeleted": "Ditt Jellyfin-konto raderades."
},
"inviteEmail": {
"name": "Inbjudnings e-post",

View File

@@ -13,10 +13,14 @@
"reEnterPasswordInvalid": "Passwörter stimmen nicht überein.",
"createAccountButton": "Konto erstellen",
"passwordRequirementsHeader": "Passwortanforderungen",
"successHeader": "Erfolg!",
"successHeader": "Erfolgreich!",
"successContinueButton": "Weiter",
"confirmationRequired": "E-Mail-Bestätigung erforderlich",
"confirmationRequiredMessage": "Bitte überprüfe dein Posteingang und bestätige deine E-Mail-Adresse."
"confirmationRequiredMessage": "Bitte überprüfe dein Posteingang und bestätige deine E-Mail-Adresse.",
"yourAccountIsValidUntil": "Dein Konto wird bis zum {date} gültig sein.",
"sendPIN": "Sende die untenstehende PIN an den Bot und komm dann hierher zurück, um dein Konto zu verbinden.",
"sendPINDiscord": "Gib auf Discord {command} in {server_channel} ein und sende die untenstehende PIN als DM an den Bot.",
"matrixEnterUser": "Gib deine Benutzer-ID ein und drücke auf Absenden. Anschließend erhälst du ein PIN, die hier eingegeben wird um fortzufahren."
},
"validationStrings": {
"length": {
@@ -42,6 +46,13 @@
},
"notifications": {
"errorUserExists": "Benutzer existiert bereits.",
"errorInvalidCode": "Ungültiger Invite-Code."
"errorInvalidCode": "Ungültiger Invite-Code.",
"telegramVerified": "Telegram-Konto verifiziert.",
"errorTelegramVerification": "Verifizierung von Telegram erforderlich.",
"errorInvalidPIN": "PIN ist ungültig.",
"errorDiscordVerification": "Discord-Verifizierung erforderlich.",
"errorMatrixVerification": "Matrix-Verifizierung erforderlich.",
"errorUnknown": "Unbekannter Fehler.",
"verified": "Konto verifiziert."
}
}

View File

@@ -16,7 +16,8 @@
"successHeader": "Επιτυχία!",
"successContinueButton": "Συνέχεια",
"confirmationRequired": "Απαιτείται επιβεβαίωση Email",
"confirmationRequiredMessage": "Παρακαλώ ελέγξτε το email σας για να επιβεβαιώσετε την διεύθυνση σας ."
"confirmationRequiredMessage": "Παρακαλώ ελέγξτε το email σας για να επιβεβαιώσετε την διεύθυνση σας .",
"yourAccountIsValidUntil": "Ο λογαριασμός σου θα ισχύει μέχρι {date}."
},
"notifications": {
"errorUserExists": "Ο χρήστης υπάρχει ήδη.",

5
lang/form/en-gb.json Normal file
View File

@@ -0,0 +1,5 @@
{
"meta": {
"name": "English (GB)"
}
}

View File

@@ -17,11 +17,20 @@
"successContinueButton": "Continue",
"confirmationRequired": "Email confirmation required",
"confirmationRequiredMessage": "Please check your email inbox to verify your address.",
"yourAccountIsValidUntil": "Your account will be valid until {date}."
"yourAccountIsValidUntil": "Your account will be valid until {date}.",
"sendPIN": "Send the PIN below to the bot, then come back here to link your account.",
"sendPINDiscord": "Type {command} in {server_channel} on Discord, then send the PIN below via DM to the bot.",
"matrixEnterUser": "Enter your User ID, press submit, and a PIN will be sent to you. Enter it here to continue."
},
"notifications": {
"errorUserExists": "User already exists.",
"errorInvalidCode": "Invalid invite code."
"errorInvalidCode": "Invalid invite code.",
"errorTelegramVerification": "Telegram verification required.",
"errorDiscordVerification": "Discord verification required.",
"errorMatrixVerification": "Matrix verification required.",
"errorInvalidPIN": "PIN is invalid.",
"errorUnknown": "Unknown error.",
"verified": "Account verified."
},
"validationStrings": {
"length": {

48
lang/form/es-es.json Normal file
View File

@@ -0,0 +1,48 @@
{
"meta": {
"name": "Español (ES)"
},
"strings": {
"pageTitle": "Crear cuenta de Jellyfin",
"createAccountHeader": "Crear una cuenta",
"accountDetails": "Detalles",
"emailAddress": "Correo electrónico",
"username": "Nombre de usuario",
"password": "Contraseña",
"reEnterPassword": "Rescriba su contraseña",
"reEnterPasswordInvalid": "Las contraseñas no son coincidentes.",
"createAccountButton": "Crear una cuenta",
"passwordRequirementsHeader": "Requisitos de contraseña",
"successHeader": "¡Éxito!",
"successContinueButton": "Continuar",
"confirmationRequired": "Se requiere confirmación por correo electrónico",
"confirmationRequiredMessage": "Revise la bandeja de entrada de su correo electrónico para verificar su dirección.",
"yourAccountIsValidUntil": "Su cuenta será válida hasta el {date}."
},
"notifications": {
"errorUserExists": "El usuario ya existe.",
"errorInvalidCode": "Código de invitación no es válido."
},
"validationStrings": {
"length": {
"singular": "Debe tener al menos {n} carácter",
"plural": "Debe tener al menos {n} caracteres"
},
"uppercase": {
"singular": "Debe tener al menos {n} caracteres en mayúscula",
"plural": "Debe tener al menos {n} caracteres en mayúscula"
},
"lowercase": {
"singular": "Debe tener al menos {n} caracteres en minúscula",
"plural": "Debe tener al menos {n} caracteres en minúscula"
},
"number": {
"singular": "Debe tener al menos {n} número",
"plural": "Debe tener al menos {n} números"
},
"special": {
"singular": "Debe tener al menos {n} carácter especial",
"plural": "Debe tener al menos {n} caracteres especiales"
}
}
}

View File

@@ -17,7 +17,9 @@
"successHeader": "Succes!",
"successContinueButton": "Continuer",
"confirmationRequired": "Confirmation de l'adresse e-mail requise",
"confirmationRequiredMessage": "Veuillez vérifier votre boite de réception pour confirmer votre adresse e-mail."
"confirmationRequiredMessage": "Veuillez vérifier votre boite de réception pour confirmer votre adresse e-mail.",
"yourAccountIsValidUntil": "Votre compte sera valide jusqu'au {date}.",
"sendPIN": "Envoyez le code PIN ci-dessous au bot, puis revenez ici pour lier votre compte."
},
"validationStrings": {
"length": {
@@ -43,6 +45,9 @@
},
"notifications": {
"errorUserExists": "Utilisateur déjà existant.",
"errorInvalidCode": "Code dinvitation non valide."
"errorInvalidCode": "Code dinvitation non valide.",
"errorTelegramVerification": "Vérification Telegram requise.",
"errorInvalidPIN": "PIN Telegram invalide.",
"telegramVerified": "Compte Telegram vérifié."
}
}

View File

@@ -17,7 +17,10 @@
"successContinueButton": "Doorgaan",
"confirmationRequired": "Bevestiging van e-mailadres verplicht",
"confirmationRequiredMessage": "Controleer je e-mail inbox om je adres te bevestigen.",
"yourAccountIsValidUntil": "Je account zal geldig zijn tot {date}."
"yourAccountIsValidUntil": "Je account zal geldig zijn tot {date}.",
"sendPIN": "Stuur onderstaande pincode naar de bot, en kom daarna hier terug om je account te koppelen.",
"matrixEnterUser": "Voer je gebruikers ID in, druk op versturen, en er wordt je een pincode toegestuurd. Vul die hier in om door te gaan.",
"sendPINDiscord": "Typ {command} in {server_channel} op Discord, stuur daarna onderstaande pincode via DM naar de bot."
},
"validationStrings": {
"length": {
@@ -43,6 +46,13 @@
},
"notifications": {
"errorUserExists": "Gebruiker bestaat al.",
"errorInvalidCode": "Ongeldige uitnodigingscode."
"errorInvalidCode": "Ongeldige uitnodigingscode.",
"telegramVerified": "Telegram-account goedgekeurd.",
"errorTelegramVerification": "Telegram-verificatie nodig.",
"errorInvalidPIN": "Pincode is ongeldig.",
"errorDiscordVerification": "Discord-verificatie vereist.",
"errorUnknown": "Onbekende fout.",
"errorMatrixVerification": "Matrix-verificatie vereist.",
"verified": "Account geverifieerd."
}
}

View File

@@ -15,13 +15,23 @@
"passwordRequirementsHeader": "Requisitos da Senha",
"successHeader": "Sucesso!",
"successContinueButton": "Continuar",
"confirmationRequired": "Necessária confirmação de e-mail",
"confirmationRequired": "Confirmação por e-mail",
"confirmationRequiredMessage": "Verifique sua caixa de email para finalizar o cadastro.",
"yourAccountIsValidUntil": "Sua conta é válida até {data}."
"yourAccountIsValidUntil": "Sua conta é válida até {date}.",
"sendPIN": "Envie o PIN abaixo para o bot e volte aqui para vincular sua conta.",
"sendPINDiscord": "Digite {command} em {server_channel} no Discord e envie o PIN abaixo via DM para o bot.",
"matrixEnterUser": "Digite sua ID de usuário, pressione enviar e um PIN será enviado. E digite aqui para continuar."
},
"notifications": {
"errorUserExists": "Esse usuário já existe.",
"errorInvalidCode": "Código do convite invalido."
"errorInvalidCode": "Código do convite invalido.",
"telegramVerified": "Conta do Telegram verificada.",
"errorInvalidPIN": "PIN inválido.",
"errorTelegramVerification": "Requer a verificação do telegram.",
"errorDiscordVerification": "Necessária verificação pelo Discord.",
"errorMatrixVerification": "Necessária verificação Matrix.",
"errorUnknown": "Erro desconhecido.",
"verified": "Conta verificada."
},
"validationStrings": {
"length": {

View File

@@ -17,11 +17,15 @@
"successContinueButton": "Fortsätt",
"confirmationRequired": "E-postbekräftelse krävs",
"confirmationRequiredMessage": "Kontrollera din e-postkorg för att verifiera din adress.",
"yourAccountIsValidUntil": "Ditt konto är giltigt fram tills {date}."
"yourAccountIsValidUntil": "Ditt konto är giltigt fram tills {date}.",
"sendPIN": "Skicka PIN-koden nedan till botten, återvänd sedan till den här sidan för att länka ditt konto."
},
"notifications": {
"errorUserExists": "Användare finns redan.",
"errorInvalidCode": "Ogiltig inbjudningskod."
"errorInvalidCode": "Ogiltig inbjudningskod.",
"errorInvalidPIN": "Telegram-PIN är ogiltig.",
"errorTelegramVerification": "Telegram-verifiering krävs.",
"telegramVerified": "Telegram-konto verifierades."
},
"validationStrings": {
"length": {

13
lang/pwreset/de-DE.json Normal file
View File

@@ -0,0 +1,13 @@
{
"meta": {
"name": "Deutsch (DE)"
},
"strings": {
"passwordReset": "Passwort zurücksetzen",
"resetFailed": "Zurücksetzen des Passworts fehlgeschlagen",
"tryAgain": "Bitte versuche es erneut.",
"youCanLogin": "Du kannst dich nun mit dem unten stehenden Code als Passwort anmelden.",
"youCanLoginOmbi": "Du kannst dich jetzt bei Jellyfin und Ombi mit dem unten stehenden Code als Passwort anmelden.",
"changeYourPassword": "Achte darauf, dass du dein Passwort nach der Anmeldung änderst."
}
}

13
lang/pwreset/en-GB.json Normal file
View File

@@ -0,0 +1,13 @@
{
"meta": {
"name": ""
},
"strings": {
"passwordReset": "",
"resetFailed": "",
"tryAgain": "",
"youCanLogin": "",
"youCanLoginOmbi": "",
"changeYourPassword": ""
}
}

15
lang/pwreset/en-us.json Normal file
View File

@@ -0,0 +1,15 @@
{
"meta": {
"name": "English (US)"
},
"strings": {
"passwordReset": "Password reset",
"reset": "Reset",
"resetFailed": "Password reset failed",
"tryAgain": "Please try again.",
"youCanLogin": "You can now log in with the below code as your password.",
"youCanLoginOmbi": "You can now log in to Jellyfin & Ombi with the below code as your password.",
"changeYourPassword": "Make sure to change your password after you log in.",
"enterYourPassword": "Enter your new password below."
}
}

13
lang/pwreset/es-es.json Normal file
View File

@@ -0,0 +1,13 @@
{
"meta": {
"name": "Español (ES)"
},
"strings": {
"passwordReset": "Cambiar contraseña",
"resetFailed": "Error al cambiar contraseña",
"tryAgain": "Por favor intente nuevamente.",
"youCanLogin": "Ahora puedes logearte con el codigo como contraseña.",
"changeYourPassword": "Recuerda cambiar tu contraseña luego de iniciar sesión.",
"youCanLoginOmbi": "Ahora puede iniciar sesión en Jellyfin & Ombi con el siguiente código como contraseña."
}
}

13
lang/pwreset/pt-BR.json Normal file
View File

@@ -0,0 +1,13 @@
{
"meta": {
"name": "Português (BR)"
},
"strings": {
"passwordReset": "Redefinir senha",
"resetFailed": "Falha ao redefinir a senha",
"tryAgain": "Tente novamente.",
"youCanLogin": "Agora você pode fazer login com o código abaixo como senha.",
"youCanLoginOmbi": "Agora você pode fazer login no Jellyfin & Ombi com o código abaixo como senha.",
"changeYourPassword": "Certifique-se de alterar sua senha depois de fazer o login."
}
}

View File

@@ -31,9 +31,9 @@
"language": {
"title": "Sprache",
"description": "Gemeinschaftsübersetzungen sind für die meisten Teile von jfa-go verfügbar. Du kannst unten die Standardsprachen auswählen, aber Benutzer können dies immer noch ändern, wenn sie wollen. Wenn du helfen willst zu übersetzen, melde dich bei {n} an, um anzufangen, etwas beizutragen!",
"defaultAdminLang": "Standardsprache Admin",
"defaultFormLang": "Standardsprache Kontoerstellung",
"defaultEmailLang": "Standardsprache E-Mail"
"defaultAdminLang": "Admin Standardsprache",
"defaultFormLang": "Kontoerstellung Standardsprache",
"defaultEmailLang": "E-Mail Standardsprache"
},
"general": {
"title": "Allgemein",
@@ -82,8 +82,6 @@
"senderName": "Absendername",
"dateFormat": "Datumsformat",
"dateFormatNotice": "Datum folgt dem strftime-Format. Für weitere Informationen, besuche {n}.",
"time24h": "24h-Format",
"time12h": "12h-Format",
"encryption": "Verschlüsselung",
"mailgunApiURL": "API-URL"
},
@@ -103,7 +101,10 @@
"title": "Passwortzurücksetzungen",
"description": "Wenn ein Benutzer versucht sein Passwort zurückzusetzen, erstellt Jellyfin eine Datei namens 'passwordreset-*.json', welche eine PIN enthält. jfa-go liest die Datei und sendet die PIN an den Benutzer.",
"pathToJellyfin": "Pfad zum Jellyfin-Konfigurationsverzeichnis",
"pathToJellyfinNotice": "Wenn du nicht weißt, wo das ist, versuche dein Passwort in Jellyfin zurückzusetzen. Ein Popup mit '<Pfad zu Jellyfin>/passwordreset-*.json' wird angezeigt werden."
"pathToJellyfinNotice": "Wenn du nicht weißt, wo das ist, versuche dein Passwort in Jellyfin zurückzusetzen. Ein Popup mit '<Pfad zu Jellyfin>/passwordreset-*.json' wird angezeigt werden.",
"resetLinks": "Einen Link statt einer PIN senden",
"resetLinksNotice": "Wenn die Ombi-Integration aktiviert ist, verwende dies, um zurückgesetzte Passwörter von Jellyfin mit Ombi zu synchronisieren.",
"resetLinksLanguage": "Standardsprache für den Link zum Zurücksetzen des Passworts"
},
"passwordValidation": {
"title": "Passwortüberprüfung",
@@ -125,5 +126,12 @@
"successMessageNotice": "Wird angezeigt, wenn ein Benutzer sein Konto erstellt.",
"emailMessage": "E-Mailnachricht",
"emailMessageNotice": "Wird am Ende von E-Mails angezeigt."
},
"updates": {
"updateChannel": "Aktualisierungskanal",
"unstable": "Unstable",
"stable": "Stable",
"title": "Aktualisierungen",
"description": "Aktiviere, um informiert zu werden, wenn neue Aktualisierungen verfügbar sind. jfa-go wird {n} alle 30 Minuten überprüfen. Keine IP-Adressen oder personenbezogene Daten werden gesammelt."
}
}

View File

@@ -82,8 +82,6 @@
"senderName": "Ονομα αποστολέα",
"dateFormat": "Μορφή ημερομηνίας",
"dateFormatNotice": "Η ημερομηνία ακολουθεί τη μορφή strftime. Για περισσότερες πληροφορίες, επισκεφτείτε το {n}.",
"time24h": "24 Ώρες",
"time12h": "12 Ώρες",
"encryption": "Κρυπτογράφηση",
"mailgunApiURL": "Διεύθυνση API"
},
@@ -125,5 +123,12 @@
"successMessageNotice": "Εμφανίζεται όταν ένας χρήστης δημιουργεί τον λογαριασμό του.",
"emailMessage": "Μήνυμα Email",
"emailMessageNotice": "Εμφανίζεται στο κάτω μέρος των email."
},
"updates": {
"title": "Ενημερώσεις",
"description": "Ενεργοποίηση ειδοποίησης όταν είναι διαθέσιμες νέες ενημερώσεις. Το jfa-go θα ελέγχει {n} κάθε 30 λεπτά. Δεν συλλέγονται IP ή προσωπικές πληροφορίες.",
"updateChannel": "Κανάλι Ενημερώσεων",
"stable": "Σταθερό",
"unstable": "Ασταθές"
}
}

5
lang/setup/en-gb.json Normal file
View File

@@ -0,0 +1,5 @@
{
"meta": {
"name": "English (GB)"
}
}

View File

@@ -76,7 +76,7 @@
},
"ombi": {
"title": "Ombi",
"description": "By connecting to Ombi, both a Jellyfin and Ombi account will be created when a user joins through jfa-go. After setup if finished, go to Settings to set a default profile for new ombi users.",
"description": "By connecting to Ombi, both a Jellyfin and Ombi account will be created when a user joins through jfa-go. After setup is finished, go to Settings to set a default profile for new ombi users.",
"apiKeyNotice": "Find this in the first tab of Ombi settings."
},
"email": {
@@ -89,8 +89,6 @@
"senderName": "Sender Name",
"dateFormat": "Date Format",
"dateFormatNotice": "Date follows the strftime format. For more info, visit {n}.",
"time24h": "24h Time",
"time12h": "12h Time",
"encryption": "Encryption",
"mailgunApiURL": "API URL"
},
@@ -110,7 +108,10 @@
"title": "Password Resets",
"description": "When a user tries to reset their password, Jellyfin creates a file named 'passwordreset-*.json' which contains a PIN. jfa-go reads the file and sends the PIN to the user.",
"pathToJellyfin": "Path to Jellyfin configuration directory",
"pathToJellyfinNotice": "If you don't know where this is, try resetting your password in Jellyfin. A popup with '<path to jellyfin>/passwordreset-*.json' will appear."
"pathToJellyfinNotice": "If you don't know where this is, try resetting your password in Jellyfin. A popup with '<path to jellyfin>/passwordreset-*.json' will appear.",
"resetLinks": "Send a link instead of a PIN",
"resetLinksNotice": "If Ombi integration is enabled, use this to sync Jellyfin password resets with Ombi.",
"resetLinksLanguage": "Default reset link language"
},
"passwordValidation": {
"title": "Password Validation",

137
lang/setup/es-es.json Normal file
View File

@@ -0,0 +1,137 @@
{
"meta": {
"name": "Español(ES)"
},
"strings": {
"pageTitle": "Configuración - jfa-go",
"next": "Siguiente",
"back": "Volver",
"optional": "Opcional",
"serverType": "Tipo de servidor",
"disabled": "Desactivado",
"enabled": "Activado",
"port": "Puerto",
"message": "Mensaje",
"serverAddress": "Dirección del servidor",
"emailSubject": "Asunto",
"URL": "URL",
"apiKey": "Llave de autorización (API)"
},
"startPage": {
"welcome": "¡Bienvenido!",
"pressStart": "Deberá hacer algunas cosas para configurar jfa-go. Presione comenzar para continuar.",
"httpsNotice": "Asegúrese de acceder a esta página a través de HTTPS o bien desde una red privada.",
"start": "Empezar"
},
"endPage": {
"finished": "¡Terminado!",
"restartMessage": "Hay más opciones que puede configurar en la página de administración. Haga clic a continuación para reiniciar, luego actualice la página.",
"refreshPage": "Actualizar"
},
"language": {
"title": "Lenguaje",
"description": "Las traducciones de la comunidad están disponibles para la mayor parte de jfa-go. Puede elegir los idiomas predeterminados a continuación, pero los usuarios aún pueden cambiarlo si lo desean. Si quieres ayudar a traducir, regístrate en {n} para empezar a contribuir!",
"defaultAdminLang": "Idioma de administrador predeterminado",
"defaultFormLang": "Idioma de creación de cuenta predeterminado",
"defaultEmailLang": "Idioma de correo electrónico predeterminado"
},
"general": {
"title": "General",
"listenAddress": "Dirección de recibidor (Listen Address)",
"urlBase": "Base de URL",
"urlBaseNotice": "Solo es necesario si se usa un proxy inverso en un subdominio (por ejemplo, 'jellyf.in/accounts').",
"lightTheme": "Claro",
"darkTheme": "Oscuro",
"useHTTPS": "Usar HTTPS (Conexión segura SSL)",
"httpsPort": "Puerto HTTPS",
"useHTTPSNotice": "Solo se recomienda si no está utilizando un proxy inverso.",
"pathToCertificate": "Ruta al certificado",
"pathToKeyFile": "Ruta al archivo de claves"
},
"updates": {
"title": "Actualizaciones",
"description": "Habilite para recibir notificaciones cuando haya nuevas actualizaciones disponibles. jfa-go comprobará {n} cada 30 minutos. No se recopilan IP ni información de identificación personal.",
"updateChannel": "Actualizar canal",
"stable": "Estable",
"unstable": "Inestable"
},
"login": {
"title": "Iniciar sesión",
"description": "Para acceder a la página de administración, debe iniciar sesión con un método a continuación:",
"authorizeWithJellyfin": "Autorizar con Jellyfin/Emby: los detalles de inicio de sesión se comparten con Jellyfin, lo que permite a varios usuarios.",
"authorizeManual": "Nombre de usuario y contraseña: establezca manualmente el nombre de usuario y la contraseña.",
"adminOnly": "Solo usuarios administradores (recomendado)",
"emailNotice": "Su dirección de correo electrónico se puede utilizar para recibir notificaciones."
},
"jellyfinEmby": {
"title": "Jellyfin/Emby",
"description": "Se necesita una cuenta de administrador porque la API no permite la creación de usuarios mediante una clave de API. Debe crear una cuenta separada y marcar 'Permitir que este usuario administre el servidor'. Puede desactivar todo lo demás. Una vez hecho esto, ingrese los detalles de inicio de sesión aquí.",
"embyNotice": "El soporte de Emby es limitado y no admite el restablecimiento de contraseñas.",
"internal": "Interno",
"external": "Externo",
"replaceJellyfin": "Nombre del servidor",
"replaceJellyfinNotice": "Si se proporciona, reemplazará cualquier aparición de 'Jellyfin' en la aplicación.",
"addressExternalNotice": "Déjelo en blanco para usar la misma dirección.",
"testConnection": "Probar conexión"
},
"ombi": {
"title": "Ombi.",
"description": "Al conectarse a Ombi, se creará una cuenta de Jellyfin y Ombi cuando un usuario se una a través de jfa-go. Una vez finalizada la configuración, vaya a Configuración para establecer un perfil predeterminado para los nuevos usuarios de ombi.",
"apiKeyNotice": "Encuentra esto en la primera pestaña de la configuración de Ombi."
},
"email": {
"title": "Correo electrónico",
"description": "jfa-go puede enviar PIN de restablecimiento de contraseña y varias notificaciones por correo electrónico. Puede conectarse a un servidor SMTP o utilizar la {n} API.",
"method": "Método de envío",
"useEmailAsUsername": "Utilice direcciones de correo electrónico como nombre de usuario",
"useEmailAsUsernameNotice": "Si está habilitado, los nuevos usuarios iniciarán sesión en Jellyfin / Emby con su dirección de correo electrónico en lugar de un nombre de usuario.",
"fromAddress": "Dirección de envío",
"senderName": "Nombre del remitente",
"dateFormat": "Formato de fecha",
"dateFormatNotice": "La fecha sigue el formato strftime. Para obtener más información, visite {n}.",
"encryption": "Cifrado",
"mailgunApiURL": "URL de API"
},
"notifications": {
"title": "Notificaciones",
"description": "Si está habilitado, puede elegir (por invitación) recibir un correo electrónico cuando una invitación caduque o se cree un usuario. Si no eligió el método de inicio de sesión de Jellyfin, asegúrese de proporcionar su dirección de correo electrónico."
},
"welcomeEmails": {
"title": "Correos de bienvenida",
"description": "Si está habilitado, se enviará un correo electrónico a los nuevos usuarios con la URL de Jellyfin/Emby y su nombre de usuario."
},
"inviteEmails": {
"title": "Correos de invitación",
"description": "Si está habilitado, puede enviar invitaciones directamente a la dirección de correo electrónico de un usuario. Debido a que es posible que esté utilizando un proxy inverso, debe proporcionar la URL desde la que se accede a las invitaciones. Escriba su base de URL y agregue '/ invite'."
},
"passwordResets": {
"title": "Restablecimiento de contraseña",
"description": "Cuando un usuario intenta restablecer su contraseña, Jellyfin crea un archivo llamado 'passwordreset - *. Json' que contiene un PIN. jfa-go lee el archivo y envía el PIN al usuario.",
"pathToJellyfin": "Ruta al directorio de configuración de Jellyfin",
"pathToJellyfinNotice": "Si no sabe dónde está, intente restablecer su contraseña en Jellyfin. Aparecerá una ventana emergente con '<ruta a jellyfin>/passwordreset-. Json'.",
"resetLinks": "Envía un enlace en lugar de un PIN",
"resetLinksNotice": "Si la integración de Ombi está habilitada, utilícela para sincronizar los restablecimientos de contraseña de Jellyfin con Ombi.",
"resetLinksLanguage": "Enlace de restablecimiento predeterminado"
},
"passwordValidation": {
"title": "Validación de contraseña",
"description": "Si está habilitado, se mostrará un conjunto de requisitos de contraseña en la página de creación de la cuenta, como la longitud mínima, caracteres en mayúsculas/minúsculas, etc.",
"length": "Largo",
"uppercase": "Letras mayúsculas",
"lowercase": "Caracteres en minúscula",
"numbers": "Números",
"special": "Caracteres especiales (%, *, etc.)"
},
"helpMessages": {
"title": "Mensajes de ayuda",
"description": "Estos mensajes se mostrarán en la página de creación de la cuenta y en algunos correos electrónicos.",
"contactMessage": "Mensaje de contacto",
"contactMessageNotice": "Aparece en la parte inferior de todas las páginas excepto admin.",
"helpMessage": "Mensaje de ayuda",
"helpMessageNotice": "Aparece en la página de creación de cuenta.",
"successMessage": "Mensaje de éxito",
"successMessageNotice": "Se muestra cuando un usuario crea su cuenta.",
"emailMessage": "Mensaje de correo electrónico",
"emailMessageNotice": "Aparece en la parte inferior de los correos electrónicos."
}
}

View File

@@ -82,8 +82,6 @@
"senderName": "Nom de l'envoyeur",
"dateFormat": "Format de la date",
"dateFormatNotice": "La date suis le format srtftime. Pour plus d'informations, consultez {n}.",
"time24h": "Temps 24h",
"time12h": "Temps 12h",
"encryption": "Chiffrement",
"mailgunApiURL": "URL de l'API"
},
@@ -103,7 +101,10 @@
"title": "Réinitialisation de mot de passe",
"description": "Lorsqu'un utilisateur essaie de réinitialiser son mot de passe, Jellyfin créé un fichier nommé 'passwordreset-*.json' qui contient le code PIN. jfa-go lit le fichier et envoie le code PIN à l'utilisateur.",
"pathToJellyfin": "Chemin du dossier de configuration de Jellyfin",
"pathToJellyfinNotice": "Si vous ne savez pas où c'est, essayez de réinitialiser votre mot de passe dans Jellyfin. Une popup avec '<path to jellyfin>/passwordreset-*.json' apparaitra."
"pathToJellyfinNotice": "Si vous ne savez pas où c'est, essayez de réinitialiser votre mot de passe dans Jellyfin. Une popup avec '<path to jellyfin>/passwordreset-*.json' apparaitra.",
"resetLinks": "Envoyer un lien plutôt qu'un PIN",
"resetLinksNotice": "Si l'intégration est activée, utilisez ceci pour synchroniser les réinitialisations de mots de passe Jellyfin avec Ombi.",
"resetLinksLanguage": "Langue du lien de réinitialisation par défaut"
},
"passwordValidation": {
"title": "Validation du mot de passe",
@@ -125,5 +126,12 @@
"successMessageNotice": "S'affiche lorsqu'un utilisateur crée son compte.",
"emailMessage": "Message de l'e-mail",
"emailMessageNotice": "S'affiche au bas des e-mails."
},
"updates": {
"title": "Mises à jour",
"description": "Activez pour être averti lorsque de nouvelles mises à jour sont disponibles. jfa-go vérifiera {n} toutes les 30 minutes. Aucune adresse IP ou information personnellement identifiable n'est collectée.",
"updateChannel": "Mettre à jour la chaîne",
"stable": "Stable",
"unstable": "Instable"
}
}

View File

@@ -82,8 +82,6 @@
"senderName": "Nama Pengirim",
"dateFormat": "Format Tanggal",
"dateFormatNotice": "Tanggal mengikuti format strftime. Untuk info lebih lanjut, kunjungi {n}.",
"time24h": "Waktu 24 jam",
"time12h": "Waktu 12 jam",
"encryption": "Enkripsi",
"mailgunApiURL": "URL API"
},

Some files were not shown because too many files have changed in this diff Show More