1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

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.
This commit is contained in:
Harvey Tindall 2024-08-04 19:03:00 +01:00
parent 016263894f
commit baeb89b694
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
5 changed files with 54 additions and 10 deletions

View File

@ -246,6 +246,7 @@
<div class="card ~neutral @low mb-2 unfocused"> <div class="card ~neutral @low mb-2 unfocused">
<span class="heading">{{ .lang.Ombi.title }}</span> <span class="heading">{{ .lang.Ombi.title }}</span>
<p class="content my-2">{{ .lang.Ombi.description }}</p> <p class="content my-2">{{ .lang.Ombi.description }}</p>
<aside class="aside ~warning my-2" id="ombi-stability-warning">{{ .lang.Ombi.stabilityWarning }}</aside>
<label class="row switch pb-4"> <label class="row switch pb-4">
<input type="checkbox" class="mr-2" id="ombi-enabled"><span>{{ .lang.Strings.enabled }}</span> <input type="checkbox" class="mr-2" id="ombi-enabled"><span>{{ .lang.Strings.enabled }}</span>
</label> </label>
@ -258,6 +259,23 @@
<input type="text" class="input ~neutral @low mt-4" id="ombi-api_key"> <input type="text" class="input ~neutral @low mt-4" id="ombi-api_key">
<p class="support mb-2 mt-1">{{ .lang.Ombi.apiKeyNotice }}</p> <p class="support mb-2 mt-1">{{ .lang.Ombi.apiKeyNotice }}</p>
</label> </label>
<span class="heading">{{ .lang.Jellyseerr.title }}</span>
<p class="content my-2">{{ .lang.Jellyseerr.description }}</p>
<label class="row switch pb-4">
<input type="checkbox" class="mr-2" id="jellyseerr-enabled"><span>{{ .lang.Strings.enabled }}</span>
</label>
<label class="label">
<span class="mt-4">{{ .lang.Strings.serverAddress }}</span>
<input type="url" class="input ~neutral @low mt-4 mb-2" id="jellyseerr-server" placeholder="https://jellyseerr.jellyf.in:5055">
</label>
<label class="label">
<span class="mt-4">{{ .lang.Strings.apiKey }}</span>
<input type="text" class="input ~neutral @low mt-4" id="jellyseerr-api_key">
</label>
<label class="row switch pb-4">
<input type="checkbox" class="mr-2" id="jellyseerr-import_existing"><span>{{ .lang.Jellyseerr.importExisting }}</span>
<p class="support mb-2 mt-1">{{ .lang.Jellyseerr.importExistingDescription }}</p>
</label>
<section class="section ~neutral banner footer flex flex-row justify-between middle"> <section class="section ~neutral banner footer flex flex-row justify-between middle">
<span class="button ~neutral @low back">{{ .lang.Strings.back }}</span> <span class="button ~neutral @low back">{{ .lang.Strings.back }}</span>
<div> <div>
@ -423,6 +441,7 @@
<div id="password-resets" class="card ~neutral @low mb-2 unfocused related-to-email"> <div id="password-resets" class="card ~neutral @low mb-2 unfocused related-to-email">
<span class="heading">{{ .lang.PasswordResets.title }}</span> <span class="heading">{{ .lang.PasswordResets.title }}</span>
<p class="content my-2">{{ .lang.PasswordResets.description }}</p> <p class="content my-2">{{ .lang.PasswordResets.description }}</p>
<p class="content my-2" id="password_resets-more-info">{{ .lang.PasswordResets.moreInfo }}</p>
<label class="row switch pb-4"> <label class="row switch pb-4">
<input type="checkbox" class="mr-2" id="password_resets-enabled"><span>{{ .lang.Strings.enabled }}</span> <input type="checkbox" class="mr-2" id="password_resets-enabled"><span>{{ .lang.Strings.enabled }}</span>
</label> </label>
@ -541,4 +560,3 @@
<script src="js/setup.js" type="module"></script> <script src="js/setup.js" type="module"></script>
</body> </body>
</html> </html>

View File

@ -122,6 +122,7 @@ type setupLang struct {
Login langSection `json:"login"` Login langSection `json:"login"`
JellyfinEmby langSection `json:"jellyfinEmby"` JellyfinEmby langSection `json:"jellyfinEmby"`
Ombi langSection `json:"ombi"` Ombi langSection `json:"ombi"`
Jellyseerr langSection `json:"jellyseerr"`
Email langSection `json:"email"` Email langSection `json:"email"`
Messages langSection `json:"messages"` Messages langSection `json:"messages"`
Notifications langSection `json:"notifications"` Notifications langSection `json:"notifications"`

View File

@ -47,7 +47,7 @@
"title": "General", "title": "General",
"listenAddress": "Listen Address", "listenAddress": "Listen Address",
"urlBase": "URL Base", "urlBase": "URL Base",
"urlBaseNotice": "Only needed if using a reverse proxy on a subdomain (e.g 'jellyf.in/accounts').", "urlBaseNotice": "Only needed if using a reverse proxy on a subfolder (e.g 'jellyf.in/accounts').",
"lightTheme": "Light", "lightTheme": "Light",
"darkTheme": "Dark", "darkTheme": "Dark",
"useHTTPS": "Use HTTPS", "useHTTPS": "Use HTTPS",
@ -94,7 +94,13 @@
"ombi": { "ombi": {
"title": "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 is 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." "apiKeyNotice": "Find this in the first tab of Ombi settings.",
"stabilityWarning": "Warning: Ombi integration is unstable, and can cause issues. Jellyseerr is recommended instead. See {n} for more info."
},
"jellyseerr": {
"title": "Jellyseerr",
"description": "Jellyseerr is an alternative to Ombi, and integrates with jfa-go slightly better. Again, after setup is finished, go to Settings to create a profile and add a template for new Jellyseerr accounts.",
"importExistingDescription": "If enabled, your existing users will have contact details and preferences from jfa-go synchronized."
}, },
"messages": { "messages": {
"title": "Messages", "title": "Messages",
@ -134,6 +140,7 @@
"passwordResets": { "passwordResets": {
"title": "Password Resets", "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. If you enabled the \"User Page\" feature, a reset can also be performed there, given a username, email, or contact method.", "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. If you enabled the \"User Page\" feature, a reset can also be performed there, given a username, email, or contact method.",
"moreInfo": "More information about the different ways of resetting passwords can be found on {n}.",
"pathToJellyfin": "Path to Jellyfin configuration directory", "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. This is not necessary if you only want to use self-service password resets through the \"User Page\".", "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. This is not necessary if you only want to use self-service password resets through the \"User Page\".",
"resetLinks": "Send a link instead of a PIN", "resetLinks": "Send a link instead of a PIN",

View File

@ -152,16 +152,20 @@ func (st *Storage) loadLangSetup(filesystems ...fs.FS) error {
loadedLangs[fsIndex][lang.Meta.Fallback+".json"] = true loadedLangs[fsIndex][lang.Meta.Fallback+".json"] = true
patchLang(&lang.Strings, &fallback.Strings, &english.Strings) patchLang(&lang.Strings, &fallback.Strings, &english.Strings)
patchLang(&lang.StartPage, &fallback.StartPage, &english.StartPage) patchLang(&lang.StartPage, &fallback.StartPage, &english.StartPage)
patchLang(&lang.EndPage, &fallback.EndPage, &english.EndPage)
patchLang(&lang.General, &fallback.General, &english.General)
patchLang(&lang.Updates, &fallback.Updates, &english.Updates) patchLang(&lang.Updates, &fallback.Updates, &english.Updates)
patchLang(&lang.Proxy, &fallback.Proxy, &english.Proxy) patchLang(&lang.Proxy, &fallback.Proxy, &english.Proxy)
patchLang(&lang.EndPage, &fallback.EndPage, &english.EndPage)
patchLang(&lang.Language, &fallback.Language, &english.Language) patchLang(&lang.Language, &fallback.Language, &english.Language)
patchLang(&lang.Login, &fallback.Login, &english.Login) patchLang(&lang.Login, &fallback.Login, &english.Login)
patchLang(&lang.JellyfinEmby, &fallback.JellyfinEmby, &english.JellyfinEmby) patchLang(&lang.JellyfinEmby, &fallback.JellyfinEmby, &english.JellyfinEmby)
patchLang(&lang.Ombi, &fallback.Ombi, &english.Ombi)
patchLang(&lang.Jellyseerr, &fallback.Jellyseerr, &english.Jellyseerr)
patchLang(&lang.Email, &fallback.Email, &english.Email) patchLang(&lang.Email, &fallback.Email, &english.Email)
patchLang(&lang.Messages, &fallback.Messages, &english.Messages) patchLang(&lang.Messages, &fallback.Messages, &english.Messages)
patchLang(&lang.Notifications, &fallback.Notifications, &english.Notifications) patchLang(&lang.Notifications, &fallback.Notifications, &english.Notifications)
patchLang(&lang.UserPage, &fallback.UserPage, &english.UserPage) patchLang(&lang.UserPage, &fallback.UserPage, &english.UserPage)
patchLang(&lang.WelcomeEmails, &fallback.WelcomeEmails, &english.WelcomeEmails)
patchLang(&lang.PasswordResets, &fallback.PasswordResets, &english.PasswordResets) patchLang(&lang.PasswordResets, &fallback.PasswordResets, &english.PasswordResets)
patchLang(&lang.InviteEmails, &fallback.InviteEmails, &english.InviteEmails) patchLang(&lang.InviteEmails, &fallback.InviteEmails, &english.InviteEmails)
patchLang(&lang.PasswordValidation, &fallback.PasswordValidation, &english.PasswordValidation) patchLang(&lang.PasswordValidation, &fallback.PasswordValidation, &english.PasswordValidation)
@ -171,16 +175,20 @@ func (st *Storage) loadLangSetup(filesystems ...fs.FS) error {
if (lang.Meta.Fallback != "" && err != nil) || lang.Meta.Fallback == "" { if (lang.Meta.Fallback != "" && err != nil) || lang.Meta.Fallback == "" {
patchLang(&lang.Strings, &english.Strings) patchLang(&lang.Strings, &english.Strings)
patchLang(&lang.StartPage, &english.StartPage) patchLang(&lang.StartPage, &english.StartPage)
patchLang(&lang.EndPage, &english.EndPage)
patchLang(&lang.General, &english.General)
patchLang(&lang.Updates, &english.Updates) patchLang(&lang.Updates, &english.Updates)
patchLang(&lang.Proxy, &english.Proxy) patchLang(&lang.Proxy, &english.Proxy)
patchLang(&lang.EndPage, &english.EndPage)
patchLang(&lang.Language, &english.Language) patchLang(&lang.Language, &english.Language)
patchLang(&lang.Login, &english.Login) patchLang(&lang.Login, &english.Login)
patchLang(&lang.JellyfinEmby, &english.JellyfinEmby) patchLang(&lang.JellyfinEmby, &english.JellyfinEmby)
patchLang(&lang.Ombi, &english.Ombi)
patchLang(&lang.Jellyseerr, &english.Jellyseerr)
patchLang(&lang.Email, &english.Email) patchLang(&lang.Email, &english.Email)
patchLang(&lang.Messages, &english.Messages) patchLang(&lang.Messages, &english.Messages)
patchLang(&lang.Notifications, &english.Notifications) patchLang(&lang.Notifications, &english.Notifications)
patchLang(&lang.UserPage, &english.UserPage) patchLang(&lang.UserPage, &english.UserPage)
patchLang(&lang.WelcomeEmails, &english.WelcomeEmails)
patchLang(&lang.PasswordResets, &english.PasswordResets) patchLang(&lang.PasswordResets, &english.PasswordResets)
patchLang(&lang.InviteEmails, &english.InviteEmails) patchLang(&lang.InviteEmails, &english.InviteEmails)
patchLang(&lang.PasswordValidation, &english.PasswordValidation) patchLang(&lang.PasswordValidation, &english.PasswordValidation)

View File

@ -221,12 +221,16 @@ class LangSelect extends Select {
} }
} }
const replaceLink = (elName: string, sect: string, name: string, url: string, text: string) => html(elName, window.lang.var(sect, name, `<a class="underline" target="_blank" href="${url}">${text}</a>`));
window.lang = new lang(window.langFile as LangFile); window.lang = new lang(window.langFile as LangFile);
html("language-description", window.lang.var("language", "description", `<a target="_blank" href="https://weblate.jfa-go.com">Weblate</a>`)); replaceLink("language-description", "language", "description", "https://weblate.jfa-go.com", "Weblate");
html("email-description", window.lang.var("email", "description", `<a target="_blank" href="https://mailgun.com">Mailgun</a>`)); replaceLink("email-description", "email", "description", "https://mailgun.com", "Mailgun");
html("email-dateformat-notice", window.lang.var("email", "dateFormatNotice", `<a target="_blank" href="https://strftime.ninja/">strftime.ninja</a>`)); replaceLink("email-dateformat-notice", "email", "dateFormatNotice", "https://strftime.timpetricola.com/", "strftime.timpetricola.com");
html("updates-description", window.lang.var("updates", "description", `<a target="_blank" href="https://builds.hrfee.dev/view/hrfee/jfa-go">buildrone</a>`)); replaceLink("updates-description", "updates", "description", "https://builds.hrfee.dev/view/hrfee/jfa-go", "buildrone");
html("messages-description", window.lang.var("messages", "description", `<a target="_blank" href="https://wiki.jfa-go.com">Wiki</a>`)); replaceLink("messages-description", "messages", "description", "https://wiki.jfa-go.com", "Wiki");
replaceLink("password_resets-more-info", "passwordResets", "moreInfo", "https://wiki.jfa-go.com/docs/pwr/", "wiki.jfa-go.com");
replaceLink("ombi-stability-warning", "ombi", "stabilityWarning", "https://wiki.jfa-go.com/docs/ombi/", "wiki.jfa-go.com");
const settings = { const settings = {
"jellyfin": { "jellyfin": {
@ -318,6 +322,12 @@ const settings = {
"server": new Input(get("ombi-server"), "", "", "enabled", true, "ombi"), "server": new Input(get("ombi-server"), "", "", "enabled", true, "ombi"),
"api_key": new Input(get("ombi-api_key"), "", "", "enabled", true, "ombi") "api_key": new Input(get("ombi-api_key"), "", "", "enabled", true, "ombi")
}, },
"jellyseerr": {
"enabled": new Checkbox(get("jellyseerr-enabled"), "", false, "jellyseerr", "enabled"),
"server": new Input(get("jellyseerr-server"), "", "", "enabled", true, "jellyseerr"),
"api_key": new Input(get("jellyseerr-api_key"), "", "", "enabled", true, "jellyseerr"),
"import_existing": new Checkbox(get("jellyseerr-import_existing"), "enabled", true, "jellyseerr", "import_existing")
},
"advanced": { "advanced": {
"tls": new Checkbox(get("advanced-tls"), "", false, "advanced", "tls"), "tls": new Checkbox(get("advanced-tls"), "", false, "advanced", "tls"),
"tls_port": new Input(get("advanced-tls_port"), "", "", "tls", true, "advanced"), "tls_port": new Input(get("advanced-tls_port"), "", "", "tls", true, "advanced"),