diff --git a/config/config-base.json b/config/config-base.json index f811548..fb1ba88 100644 --- a/config/config-base.json +++ b/config/config-base.json @@ -326,7 +326,8 @@ "requires_restart": true, "type": "bool", "value": false, - "description": "Enable TLS." + "description": "Serve application over TLS, with HTTP2 preload.", + "wiki_link": "https://wiki.jfa-go.com/docs/tls/" }, "tls_port": { "name": "TLS Port", @@ -567,7 +568,8 @@ "order": [], "meta": { "name": "Captcha", - "description": "Settings related to user creation CAPTCHAs." + "description": "Settings related to user creation CAPTCHAs.", + "wiki_link": "https://wiki.jfa-go.com/docs/captcha/" }, "settings": { "enabled": { @@ -766,7 +768,8 @@ "order": [], "meta": { "name": "Messages/Notifications", - "description": "General settings for emails/messages." + "description": "General settings for emails/messages.", + "wiki_link": "https://wiki.jfa-go.com/docs/emails/" }, "settings": { "enabled": { @@ -1026,7 +1029,8 @@ "order": [], "meta": { "name": "Discord", - "description": "Settings for Discord invites/signup/notifications" + "description": "Settings for Discord invites/signup/notifications", + "wiki_link": "https://wiki.jfa-go.com/docs/bots/discord/" }, "settings": { "enabled": { @@ -1147,7 +1151,8 @@ "order": [], "meta": { "name": "Telegram", - "description": "Settings for Telegram signup/notifications. See the jfa-go wiki for info on setting this up." + "description": "Settings for Telegram signup/notifications. See the jfa-go wiki for info on setting this up.", + "wiki_link": "https://wiki.jfa-go.com/docs/bots/telegram/" }, "settings": { "enabled": { @@ -1211,7 +1216,8 @@ "order": [], "meta": { "name": "Matrix", - "description": "Settings for Matrix invites/signup/notifications. See the jfa-go wiki for info on setting this up." + "description": "Settings for Matrix invites/signup/notifications. See the jfa-go wiki for info on setting this up.", + "wiki_link": "https://wiki.jfa-go.com/docs/bots/matrix/" }, "settings": { "enabled": { @@ -1313,7 +1319,8 @@ "meta": { "name": "Password Resets", "description": "Settings for the password reset handler.", - "depends_true": "messages|enabled" + "depends_true": "messages|enabled", + "wiki_link": "https://wiki.jfa-go.com/docs/pwr/" }, "settings": { "enabled": { @@ -1330,7 +1337,7 @@ "value": "", "depends_true": "enabled", "required": "false", - "description": "There are multiple ways password resets can be set up. See the wiki page for more information." + "description": "There are multiple ways password resets can be set up. See the wiki page for more information." }, "watch_directory": { "name": "Jellyfin directory", @@ -1499,8 +1506,8 @@ "notifications": { "order": [], "meta": { - "name": "Notifications", - "description": "Notification related settings.", + "name": "Admin invite notifications", + "description": "Allows toggling \"user created\" and \"invite expired\" notifications to be sent to the admin per-invite.", "depends_true": "messages|enabled" }, "settings": { @@ -1558,7 +1565,8 @@ "order": [], "meta": { "name": "Ombi Integration", - "description": "Connect to Ombi to automatically create both Ombi and Jellyfin accounts for new users. You'll need to add a ombi template to an existing User Profile for accounts to be created, which you can do by refreshing then checking Settings > User Profiles. To handle password resets for Ombi & Jellyfin, enable \"Use reset link instead of PIN\"." + "description": "Connect to Ombi to automatically create both Ombi and Jellyfin accounts for new users. You'll need to add a ombi template to an existing User Profile for accounts to be created, which you can do by refreshing then checking Settings > User Profiles. To handle password resets for Ombi & Jellyfin, enable \"Use reset link instead of PIN\".", + "wiki_link": "https://wiki.jfa-go.com/docs/ombi/" }, "settings": { "enabled": { @@ -1653,7 +1661,8 @@ "order": [], "meta": { "name": "Backups", - "description": "Settings for database backups. Press the \"Backups\" button above to create, download and restore backups." + "description": "Settings for database backups. Press the \"Backups\" button above to create, download and restore backups.", + "wiki_link": "https://wiki.jfa-go.com/docs/backups/" }, "settings": { "enabled": { diff --git a/html/admin.html b/html/admin.html index 83a1db0..9ecf214 100644 --- a/html/admin.html +++ b/html/admin.html @@ -916,9 +916,10 @@ -
- {{ .strings.aboutProgram }} - {{ .strings.userProfiles }} +
+ {{ .strings.aboutProgram }} + {{ .strings.wiki }} + {{ .strings.userProfiles }}
diff --git a/lang/admin/en-us.json b/lang/admin/en-us.json index 15835cb..8514dbc 100644 --- a/lang/admin/en-us.json +++ b/lang/admin/en-us.json @@ -201,7 +201,8 @@ "backupCreated": "Backup created", "backupCanBeFound": "The backup can be found on the server at {filepath}.", "backupCanDownload": "Alternatively, click below to download the backup.", - "wikiPage": "Wiki Page" + "wikiPage": "Wiki Page", + "wiki": "Wiki" }, "notifications": { "pathCopied": "Full path copied to clipboard.", diff --git a/models.go b/models.go index 6bd8aec..7865679 100644 --- a/models.go +++ b/models.go @@ -214,6 +214,7 @@ type meta struct { Advanced bool `json:"advanced,omitempty"` DependsTrue string `json:"depends_true,omitempty"` DependsFalse string `json:"depends_false,omitempty"` + WikiLink string `json:"wiki_link,omitempty"` } type setting struct { diff --git a/package-lock.json b/package-lock.json index 4e39d15..75100ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "nightwind": "^1.1.13", "perl-regex": "^1.0.4", "postcss": "^8.4.24", - "remixicon": "^3.3.0", + "remixicon": "^4.3.0", "remove-markdown": "^0.5.0", "tailwindcss": "^3.3.2", "typescript": "^5.1.3", @@ -4573,9 +4573,10 @@ } }, "node_modules/remixicon": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/remixicon/-/remixicon-3.3.0.tgz", - "integrity": "sha512-iNeRbwVgd8Ef467IjMd/+joFWSBOYfqsLtxtSzsS8fWn75a1H7sgGu5uWE4c3NLjP2C1giFlx8gw63qZd96yJQ==" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.3.0.tgz", + "integrity": "sha512-jRYQ37dTFSkJtvcxwTUAkIiXkYRvA9EDvVuXPNrmt2xf/VS//CRgFtsX2TAFBoQOhh9SDh7l6La4Xu12snEyxg==", + "license": "Apache-2.0" }, "node_modules/remove-markdown": { "version": "0.5.0", @@ -10183,9 +10184,9 @@ "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==" }, "remixicon": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/remixicon/-/remixicon-3.3.0.tgz", - "integrity": "sha512-iNeRbwVgd8Ef467IjMd/+joFWSBOYfqsLtxtSzsS8fWn75a1H7sgGu5uWE4c3NLjP2C1giFlx8gw63qZd96yJQ==" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.3.0.tgz", + "integrity": "sha512-jRYQ37dTFSkJtvcxwTUAkIiXkYRvA9EDvVuXPNrmt2xf/VS//CRgFtsX2TAFBoQOhh9SDh7l6La4Xu12snEyxg==" }, "remove-markdown": { "version": "0.5.0", diff --git a/package.json b/package.json index 3d7c258..f5053b1 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "nightwind": "^1.1.13", "perl-regex": "^1.0.4", "postcss": "^8.4.24", - "remixicon": "^3.3.0", + "remixicon": "^4.3.0", "remove-markdown": "^0.5.0", "tailwindcss": "^3.3.2", "typescript": "^5.1.3", diff --git a/ts/modules/settings.ts b/ts/modules/settings.ts index b319595..1768bc4 100644 --- a/ts/modules/settings.ts +++ b/ts/modules/settings.ts @@ -19,6 +19,7 @@ interface Meta { advanced?: boolean; depends_true?: string; depends_false?: string; + wiki_link?: string; } interface Setting { @@ -31,6 +32,7 @@ interface Setting { value: string | boolean | number; depends_true?: string; depends_false?: string; + wiki_link?: string; asElement: () => HTMLElement; update: (s: Setting) => void; @@ -555,10 +557,19 @@ class sectionPanel { this._section = document.createElement("div") as HTMLDivElement; this._section.classList.add("settings-section", "unfocused"); this._section.setAttribute("data-section", sectionName); - this._section.innerHTML = ` - ${s.meta.name} + let innerHTML = ` +
+ ${s.meta.name} + `; + if (s.meta.wiki_link) { + innerHTML += ``; + } + + innerHTML += ` +

${s.meta.description}

`; + this._section.innerHTML = innerHTML; this.update(s); }