chore(immich): drop the IMMICH_URL hook

A deployment no longer suggests an address for the first server: every
address is each account's own and is typed in the app, so the field opens
blank with a placeholder. The env var, its compose passthrough, the example
line and the `defaultUrl` field that carried it are all gone; the backend's
config route now answers with the saved list alone.
This commit is contained in:
2026-10-10 17:10:30 +07:00
parent 8901e0c378
commit c557108eee
8 changed files with 19 additions and 43 deletions
-8
View File
@@ -336,10 +336,6 @@ function Catalogue({ admin }: { admin: boolean }) {
// A server is not a folder on the disk — see `engine/immich.ts` — so it is the
// column's second source and the page holds no key of its own.
const [servers, setServers] = useState<ImmichServer[]>([]);
// The address this deployment suggests for a first server — `IMMICH_URL`, which
// the backend answers with. Offered as a filled-in field, not as a saved row:
// it is a suggestion until a key is typed against it.
const [immichUrl, setImmichUrl] = useState('');
const [addImmich, setAddImmich] = useState(false);
const [editAlbums, setEditAlbums] = useState<LibraryFolder | null>(null);
// The strip starts on the catalogue the last screen read: coming back from the
@@ -800,7 +796,6 @@ function Catalogue({ admin }: { admin: boolean }) {
const config = await immichConfig();
if (!alive) return;
setServers(config.servers);
setImmichUrl(config.defaultUrl);
// 5. Await photos reload if still running
await reloadPromise;
@@ -1106,7 +1101,6 @@ function Catalogue({ admin }: { admin: boolean }) {
// holds the key, and what it says is what the dialog will show next time.
const config = await immichConfig(true);
setServers(config.servers);
setImmichUrl(config.defaultUrl);
if (!isNew && edited) {
const next: LibraryFolder = { ...edited, albums: saved.albums };
await putFolder(next);
@@ -3123,7 +3117,6 @@ function Catalogue({ admin }: { admin: boolean }) {
it goes straight up to the backend, which probes it before it stores. */}
{addImmich ? (
<ImmichDialog
defaultUrl={immichUrl}
onSaved={(saved, isNew) => void serverSaved(saved, isNew)}
onClose={() => setAddImmich(false)}
/>
@@ -3131,7 +3124,6 @@ function Catalogue({ admin }: { admin: boolean }) {
{editAlbums ? (
<ImmichDialog
server={servers.find((s) => s.id === editAlbums.server) ?? null}
defaultUrl=""
onSaved={(saved, isNew) => void serverSaved(saved, isNew)}
onClose={() => setEditAlbums(null)}
/>