settings: drop the section-header env-var lock badges
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
The per-input LockedInput already shows a 🔒 inside any field that's controlled by an env var, with a tooltip pointing at the .env file. The extra '🔒 JELLYFIN_URL' badge in the section title was duplicate signal — remove it. Drop EnvBadge entirely; section titles go back to plain text ('Jellyfin', 'Radarr (optional)', etc.).
This commit is contained in:
@@ -32,22 +32,9 @@ function LockedInput({ locked, ...props }: { locked: boolean } & React.InputHTML
|
||||
);
|
||||
}
|
||||
|
||||
// ─── Env badge ────────────────────────────────────────────────────────────────
|
||||
|
||||
function EnvBadge({ envVar, locked }: { envVar: string; locked: boolean }) {
|
||||
return (
|
||||
<span
|
||||
className="inline-flex items-center gap-1 text-[0.67rem] font-semibold px-1.5 py-0.5 rounded bg-gray-100 text-gray-500 border border-gray-200"
|
||||
title={
|
||||
locked
|
||||
? `Set via environment variable ${envVar} — edit your .env file to change`
|
||||
: `Can be set via environment variable ${envVar}`
|
||||
}
|
||||
>
|
||||
{locked ? "🔒" : "🔓"} <span className="font-mono">{envVar}</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
// Note: the section-header EnvBadge was removed — the per-input lock icon
|
||||
// (LockedInput) already signals when a value is env-controlled, the badge
|
||||
// was duplicate noise.
|
||||
|
||||
// ─── Section card ──────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -308,12 +295,7 @@ export function SetupPage() {
|
||||
|
||||
{/* Jellyfin */}
|
||||
<ConnSection
|
||||
title={
|
||||
<span className="flex items-center gap-2">
|
||||
Jellyfin <EnvBadge envVar="JELLYFIN_URL" locked={locked.has("jellyfin_url")} />{" "}
|
||||
<EnvBadge envVar="JELLYFIN_API_KEY" locked={locked.has("jellyfin_api_key")} />
|
||||
</span>
|
||||
}
|
||||
title="Jellyfin"
|
||||
urlKey="jellyfin_url"
|
||||
apiKey="jellyfin_api_key"
|
||||
urlPlaceholder="http://192.168.1.100:8096"
|
||||
@@ -325,11 +307,9 @@ export function SetupPage() {
|
||||
{/* Radarr */}
|
||||
<ConnSection
|
||||
title={
|
||||
<span className="flex items-center gap-2">
|
||||
Radarr <span className="text-gray-400 font-normal">(optional)</span>{" "}
|
||||
<EnvBadge envVar="RADARR_URL" locked={locked.has("radarr_url")} />{" "}
|
||||
<EnvBadge envVar="RADARR_API_KEY" locked={locked.has("radarr_api_key")} />
|
||||
</span>
|
||||
<>
|
||||
Radarr <span className="text-gray-400 font-normal">(optional)</span>
|
||||
</>
|
||||
}
|
||||
subtitle="Provides accurate original-language data for movies."
|
||||
urlKey="radarr_url"
|
||||
@@ -343,11 +323,9 @@ export function SetupPage() {
|
||||
{/* Sonarr */}
|
||||
<ConnSection
|
||||
title={
|
||||
<span className="flex items-center gap-2">
|
||||
Sonarr <span className="text-gray-400 font-normal">(optional)</span>{" "}
|
||||
<EnvBadge envVar="SONARR_URL" locked={locked.has("sonarr_url")} />{" "}
|
||||
<EnvBadge envVar="SONARR_API_KEY" locked={locked.has("sonarr_api_key")} />
|
||||
</span>
|
||||
<>
|
||||
Sonarr <span className="text-gray-400 font-normal">(optional)</span>
|
||||
</>
|
||||
}
|
||||
subtitle="Provides original-language data for TV series."
|
||||
urlKey="sonarr_url"
|
||||
@@ -360,12 +338,7 @@ export function SetupPage() {
|
||||
|
||||
{/* Audio languages */}
|
||||
<SectionCard
|
||||
title={
|
||||
<span className="flex items-center gap-2">
|
||||
Audio Languages
|
||||
<EnvBadge envVar="AUDIO_LANGUAGES" locked={locked.has("audio_languages")} />
|
||||
</span>
|
||||
}
|
||||
title="Audio Languages"
|
||||
subtitle="Additional audio languages to keep alongside the original language. Order determines stream priority in the output file. The original language is always kept first."
|
||||
>
|
||||
<SortableLanguageList langs={audLangs} onChange={setAudLangs} disabled={locked.has("audio_languages")} />
|
||||
@@ -379,12 +352,7 @@ export function SetupPage() {
|
||||
|
||||
{/* Subtitle languages */}
|
||||
<SectionCard
|
||||
title={
|
||||
<span className="flex items-center gap-2">
|
||||
Subtitle Languages
|
||||
<EnvBadge envVar="SUBTITLE_LANGUAGES" locked={locked.has("subtitle_languages")} />
|
||||
</span>
|
||||
}
|
||||
title="Subtitle Languages"
|
||||
subtitle="Subtitle tracks in these languages are extracted to sidecar files. Order determines priority. All subtitles are removed from the container during processing."
|
||||
>
|
||||
<SortableLanguageList langs={subLangs} onChange={setSubLangs} disabled={locked.has("subtitle_languages")} />
|
||||
|
||||
Reference in New Issue
Block a user