Build 0202261541: allow FQDN service URLs
This commit is contained in:
@@ -34,6 +34,15 @@ const SECTION_LABELS: Record<string, string> = {
|
||||
|
||||
const BOOL_SETTINGS = new Set(['jellyfin_sync_to_arr', 'site_banner_enabled'])
|
||||
const TEXTAREA_SETTINGS = new Set(['site_banner_message', 'site_changelog'])
|
||||
const URL_SETTINGS = new Set([
|
||||
'jellyseerr_base_url',
|
||||
'jellyfin_base_url',
|
||||
'jellyfin_public_url',
|
||||
'sonarr_base_url',
|
||||
'radarr_base_url',
|
||||
'prowlarr_base_url',
|
||||
'qbittorrent_base_url',
|
||||
])
|
||||
const BANNER_TONES = ['info', 'warning', 'error', 'maintenance']
|
||||
|
||||
const SECTION_DESCRIPTIONS: Record<string, string> = {
|
||||
@@ -330,26 +339,31 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
}
|
||||
|
||||
const settingDescriptions: Record<string, string> = {
|
||||
jellyseerr_base_url: 'Base URL for your Jellyseerr server.',
|
||||
jellyseerr_base_url:
|
||||
'Base URL for your Jellyseerr server (FQDN or IP). Scheme is optional.',
|
||||
jellyseerr_api_key: 'API key used to read requests and status.',
|
||||
jellyfin_base_url: 'Local Jellyfin server URL for logins and lookups.',
|
||||
jellyfin_base_url:
|
||||
'Jellyfin server URL for logins and lookups (FQDN or IP). Scheme is optional.',
|
||||
jellyfin_api_key: 'Admin API key for syncing users and availability.',
|
||||
jellyfin_public_url: 'Public Jellyfin URL used for the “Open in Jellyfin” button.',
|
||||
jellyfin_public_url:
|
||||
'Public Jellyfin URL for the “Open in Jellyfin” button (FQDN or IP).',
|
||||
jellyfin_sync_to_arr: 'Auto-add items to Sonarr/Radarr when they already exist in Jellyfin.',
|
||||
artwork_cache_mode: 'Choose whether posters are cached locally or loaded from the web.',
|
||||
sonarr_base_url: 'Sonarr server URL for TV tracking.',
|
||||
sonarr_base_url: 'Sonarr server URL for TV tracking (FQDN or IP). Scheme is optional.',
|
||||
sonarr_api_key: 'API key for Sonarr.',
|
||||
sonarr_quality_profile_id: 'Quality profile used when adding TV shows.',
|
||||
sonarr_root_folder: 'Root folder where Sonarr stores TV shows.',
|
||||
sonarr_qbittorrent_category: 'qBittorrent category for manual Sonarr downloads.',
|
||||
radarr_base_url: 'Radarr server URL for movies.',
|
||||
radarr_base_url: 'Radarr server URL for movies (FQDN or IP). Scheme is optional.',
|
||||
radarr_api_key: 'API key for Radarr.',
|
||||
radarr_quality_profile_id: 'Quality profile used when adding movies.',
|
||||
radarr_root_folder: 'Root folder where Radarr stores movies.',
|
||||
radarr_qbittorrent_category: 'qBittorrent category for manual Radarr downloads.',
|
||||
prowlarr_base_url: 'Prowlarr server URL for indexer searches.',
|
||||
prowlarr_base_url:
|
||||
'Prowlarr server URL for indexer searches (FQDN or IP). Scheme is optional.',
|
||||
prowlarr_api_key: 'API key for Prowlarr.',
|
||||
qbittorrent_base_url: 'qBittorrent server URL for download status.',
|
||||
qbittorrent_base_url:
|
||||
'qBittorrent server URL for download status (FQDN or IP). Scheme is optional.',
|
||||
qbittorrent_username: 'qBittorrent login username.',
|
||||
qbittorrent_password: 'qBittorrent login password.',
|
||||
requests_sync_ttl_minutes: 'How long saved requests stay fresh before a refresh is needed.',
|
||||
@@ -371,6 +385,16 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
site_changelog: 'One update per line for the public changelog.',
|
||||
}
|
||||
|
||||
const settingPlaceholders: Record<string, string> = {
|
||||
jellyseerr_base_url: 'https://requests.example.com or 10.30.1.81:5055',
|
||||
jellyfin_base_url: 'https://jelly.example.com or 10.40.0.80:8096',
|
||||
jellyfin_public_url: 'https://jelly.example.com',
|
||||
sonarr_base_url: 'https://sonarr.example.com or 10.30.1.81:8989',
|
||||
radarr_base_url: 'https://radarr.example.com or 10.30.1.81:7878',
|
||||
prowlarr_base_url: 'https://prowlarr.example.com or 10.30.1.81:9696',
|
||||
qbittorrent_base_url: 'https://qb.example.com or 10.30.1.81:8080',
|
||||
}
|
||||
|
||||
const buildSelectOptions = (
|
||||
currentValue: string,
|
||||
options: { id: number; label: string; path?: string }[],
|
||||
@@ -982,6 +1006,10 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
const isRadarrProfile = setting.key === 'radarr_quality_profile_id'
|
||||
const isRadarrRoot = setting.key === 'radarr_root_folder'
|
||||
const isBoolSetting = BOOL_SETTINGS.has(setting.key)
|
||||
const isUrlSetting = URL_SETTINGS.has(setting.key)
|
||||
const inputPlaceholder = setting.sensitive && setting.isSet
|
||||
? 'Configured (enter to replace)'
|
||||
: settingPlaceholders[setting.key] ?? ''
|
||||
if (isBoolSetting) {
|
||||
return (
|
||||
<label key={setting.key} data-helper={helperText || undefined}>
|
||||
@@ -1312,9 +1340,8 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
<input
|
||||
name={setting.key}
|
||||
type={setting.sensitive ? 'password' : 'text'}
|
||||
placeholder={
|
||||
setting.sensitive && setting.isSet ? 'Configured (enter to replace)' : ''
|
||||
}
|
||||
placeholder={inputPlaceholder}
|
||||
autoComplete={isUrlSetting ? 'url' : undefined}
|
||||
value={value}
|
||||
onChange={(event) =>
|
||||
setFormValues((current) => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "magent-frontend",
|
||||
"private": true,
|
||||
"version": "3001262148",
|
||||
"version": "0202261541",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
|
||||
Reference in New Issue
Block a user