32 Commits

Author SHA1 Message Date
Harvey Tindall
60dbfa2d1e messages: custom content described in customcontent.go, message tests
customcontent.go constains a structure with all the custom content,
methods for getting display names, subjects, etc., and a list of
variables, conditionals, and placeholder values. Tests for constructX
methods included in email_test.go, and all jfa-go tests can be run with
make INTERNAL=off test.
2025-08-30 14:21:26 +01:00
Harvey Tindall
94efe9f746 expiry: add "remind N days before"
new setting to send an email/message N days before a user is due to
expire. Multiple can be set.
2025-08-04 20:44:29 +01:00
Harvey Tindall
f063b970b4 config: migrate to new yaml format
config-base.yaml is almost identical to json version, except there's no "order" field, as
"sections" and "settings" fields are now lists themselves and so Go can
parse the correct order. As such, removed enumerate_config.py. Also,
rewrote scripts/generate_ini.py in Go as scripts/ini/. Config structure
in Go form is now in common/config.go, and is used by jfa-go and the ini
script. app.configBase is now untouched once read from config-base.yaml,
and instead copied to and patched in app.patchedConfig. Patching occurs
at program start and config modification, so GetConfig is now just a
couple of lines. Discord role patching still occurs in GetConfig, as the
available roles can change regularly. Also added new "Disabled" field to
sections, to avoid the nightmare of deleting from an array.
2024-08-26 15:43:28 +01:00
Harvey Tindall
baeb89b694 setup: add jellyseer, reference wiki for PWR
add jellyseerr section along with ombi, and add a warning about ombi.
A link to the PWR wiki page is given to explain the different methods.
2024-08-04 19:03:00 +01:00
Harvey Tindall
fbbb03a47d email: add new "expiry adjusted email"
just the email at this point. Also wrote up a little guide on adding new
emails on wiki.jfa-go.com.
2024-07-28 16:02:47 +01:00
Harvey Tindall
43e36ee6fc setup: Include proxy, test JF with it
Found on the 2nd page.
2023-10-19 17:19:52 +01:00
Harvey Tindall
3fa4b01115 setup: add user page
also sprinkled mentions of it throughout other relevant pages.
2023-06-26 21:29:49 +01:00
Harvey Tindall
5beeeb958b userpage: show expiry 2023-06-18 12:27:18 +01:00
Harvey Tindall
2fc2f1ddb3 lang: add patchable notifications to common 2023-06-16 18:29:49 +01:00
Harvey Tindall
726acb9c29 userpage: initial page
login, lang, and theme work. Currently only makes a request to a
hello-world type endpoint to verify auth works. Accessible at
/my/account.
2023-06-16 14:43:37 +01:00
Harvey Tindall
729fc7baf7 Setup: add messages, set password via link
Also changed some section names to use "messages" instead of "emails".
Since I haven't added Discord/Telegram/Matrix bot setup, I mentioned you
can do these later and linked to the setup guides. Sections related to
email mostly now depend on [messages]/enabled now too. Set password via
link has been added to password resets.
2021-06-23 15:44:48 +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
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
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
2451d69341 rewrite lang.go format and templateString
surprisingly not much faster than the originals.
2021-03-27 16:07:22 +00:00
Harvey Tindall
de92516d52 add updates section to setup 2021-03-20 18:00:01 +00:00
Harvey Tindall
1e9d184508 implement user expiry functionality
All works now, but i'll add a field on the accounts tab for users with
an expiry, as well as a 'disabled' badge.
2021-02-28 15:41:06 +00:00
Harvey Tindall
cc4e12c405 finish backend of custom emails
biggest bodge i've ever done but it works i guess.
2021-02-20 00:22:40 +00:00
Harvey Tindall
5c87d109a3 use descriptive variable names in email translations
in preparation for an email editor.
2021-02-19 17:50:50 +00:00
Harvey Tindall
456ef556b1 add inter-section dependency for settings
Currently used to hide all email sections when [email]/method is blank
(disabled).
2021-01-31 18:50:04 +00:00
Harvey Tindall
ee026714d4 Add optional email confirmation
If enabled, a confirmation email will be sent before the user can create
their account.
2021-01-30 19:19:12 +00:00
Harvey Tindall
3dd83bffbf Merge branch 'new-setup'
Merge new setup wizard

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

also fixes conflict in _post.
2021-01-27 22:06:44 +00:00
Harvey Tindall
7baea9101e Add general settings, ombi
host, port, theme, tls are included in general. Page theme changes with
setting. Fixed checkbox support messages. Split some cards into columns.
2021-01-27 21:35:41 +00:00
Harvey Tindall
8c871bc5fa Add ts to link setting dependance
Also make store each setting as classes in a settings object, to make it
easier to serialize on submitting. Also, added
"substitute_jellyfin_strings", "no_username" and welcome_email.
2021-01-26 22:57:29 +00:00
Harvey Tindall
bf1e6230dc split some strings into common file; use lang file to setup page 2021-01-25 21:26:54 +00:00
Harvey Tindall
8af1c13d7e Display error messages on form
two new strings need translating in lang/form.
2021-01-25 18:01:18 +00:00
Harvey Tindall
ea262ca60b add optional welcome email for new users
When enabled, an email with the server URL and username will be sent to
created users. Requested in #38.
2021-01-24 15:19:58 +00:00
Harvey Tindall
cd2ea2e579 reload email after lang is loaded
fixes #37.
2021-01-21 18:57:32 +00:00
Harvey Tindall
882a3467db fix language settings loading 2021-01-21 14:16:03 +00:00
Harvey Tindall
e834445b0b Restructure language loading to support incomplete translations
On startup, files are scanned and any missing values are replaced with
the english version.
2021-01-19 00:29:29 +00:00
Harvey Tindall
1aadd12006 move validationStrings out of strings in lang/form 2021-01-18 22:06:50 +00:00