Remove the one-time env-to-config migration from the settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-09 10:38:06 +01:00
1 parent 151a92959d
commit c9f553dc60
8 files changed
+9 -157

No files matched your search

-51
View File
@@ -1014,56 +1014,6 @@ function Permissions({ cfg, reload }: { cfg: ConfigResponse; reload: () => void
// --- raw ----------------------------------------------------------------------
/** ${VAR} references left in the config: move their values from the environment into it. */
function EnvRefs({ onDone }: { onDone: () => void }) {
const t = useT();
const { data, reload } = useFetch<{ set: string[]; unset: string[] }>("/config/inline-env");
const [busy, setBusy] = useState(false);
if (!data || (data.set.length === 0 && data.unset.length === 0)) return null;
const apply = async () => {
if (!(await confirmDialog({ title: t("settings.envTitle"), message: t("settings.envConfirm", { names: data.set.join(", ") }), confirmLabel: t("settings.envApply") }))) return;
setBusy(true);
try {
const r = await post<{ set: string[] }>("/config/inline-env");
toast(t("settings.envDone", { n: r.set.length }), "success");
reload();
onDone();
} catch (e: any) {
toast(e.message);
} finally {
setBusy(false);
}
};
return (
<div className="panel" style={{ marginBottom: 12 }}>
<h3>
<Icon name="file-text" /> {t("settings.envTitle")}
</h3>
<div className="hint" style={{ marginBottom: 8 }}>
{t("settings.envHint")}
</div>
{data.set.length > 0 && (
<div className="row" style={{ gap: 8, flexWrap: "wrap", alignItems: "center" }}>
{data.set.map((n) => (
<span key={n} className="chip mono">
{n}
</span>
))}
<span className="spacer" />
<button className="primary small" onClick={apply} disabled={busy}>
{t("settings.envApply")}
</button>
</div>
)}
{data.unset.length > 0 && (
<div className="hint" style={{ marginTop: 8 }}>
{t("settings.envUnset")} <span className="mono">{data.unset.join(", ")}</span>
</div>
)}
</div>
);
}
function Raw({ reload }: { reload: () => void }) {
const t = useT();
const [text, setText] = useState<string>();
@@ -1074,7 +1024,6 @@ function Raw({ reload }: { reload: () => void }) {
if (text === undefined) return <div className="empty">{t("common.loading")}</div>;
return (
<>
<EnvRefs onDone={() => get<{ text: string }>("/config/raw").then((r) => setText(r.text))} />
<div className="notice">{t("settings.rawHint")}</div>
<textarea className="raw-editor" spellCheck={false} value={text} onChange={(e) => setText(e.target.value)} />
{view}
-6
View File
@@ -65,12 +65,6 @@ export const de: Messages = {
"settings.budgetWarning": "Warnen ab",
"settings.adminKey": "Admin-Key (optional)",
"settings.adminKeyHint": "Anthropic Admin-API-Key (sk-ant-admin01-…), um die echten, organisationsweiten Monatskosten anzuzeigen.",
"settings.envTitle": "Einstellungen aus Umgebungsvariablen",
"settings.envHint": "Diese ${NAME}-Verweise holen ihre Werte aus der Server-Umgebung (.env). Übernimm die Werte in die Konfiguration, damit alles hier eingestellt ist – danach können die Variablen aus der .env raus.",
"settings.envApply": "In die Konfiguration übernehmen",
"settings.envConfirm": "Die aktuellen Werte von {names} in die Konfigurationsdatei schreiben? Die Keys liegen dann in der Config (und in ihren Backups) statt in der Umgebung.",
"settings.envDone": "{n} Werte in die Konfiguration übernommen. Du kannst sie jetzt aus der .env entfernen.",
"settings.envUnset": "Verwendet, aber nicht gesetzt (bleiben unverändert):",
"settings.fetchPrices": "Preise abrufen",
"settings.pricesFetched": "Preise für {n} Modelle aktualisiert – zum Übernehmen speichern.",
"stats.perMillion": "pro 1 Mio. Tok.",
-6
View File
@@ -64,12 +64,6 @@ export const en = {
"settings.budgetWarning": "Warn at",
"settings.adminKey": "Admin key (optional)",
"settings.adminKeyHint": "Anthropic Admin API key (sk-ant-admin01-…) to show the real, organisation-wide monthly cost.",
"settings.envTitle": "Settings from environment variables",
"settings.envHint": "These ${NAME} references take their values from the server's environment (.env). Move the values into the configuration so everything is set here – then remove the variables from .env.",
"settings.envApply": "Move into the configuration",
"settings.envConfirm": "Write the current values of {names} into the configuration file? Keys are then stored in the config (and in its backups) instead of the environment.",
"settings.envDone": "{n} values moved into the configuration. You can now remove them from .env.",
"settings.envUnset": "Referenced but not set (left as they are):",
"settings.fetchPrices": "Fetch prices",
"settings.pricesFetched": "Prices updated for {n} models – save to keep them.",
"stats.perMillion": "per 1M tok",