Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 3715649aaf fix(services): list the SSH configurations in the Docker connection dialog
The SSH configuration picker reads the settings window's staged list by
default, which is empty outside the settings window, so the Docker
connection dialog offered only None and a configuration picked from a URL
showed as missing. The dialog now passes the live list. The None choice
gets its Chinese text.
2026-11-15 23:47:30 +08:00
4 змінених файлів з 42 додано та 2 видалено

No files matched your search

+37
Переглянути файл
@@ -0,0 +1,37 @@
import { act, cleanup, render, screen } from "@testing-library/react";
import { afterEach, describe, expect, it } from "vitest";
import type { Settings } from "@/platform/ipc";
import { useProject } from "@/platform/project";
import { openConnectionDialog, ServicesDialogHost } from "./dialogs";
afterEach(() => {
cleanup();
useProject.setState({ settings: null });
});
describe("Docker connection dialog", () => {
it("offers the SSH configurations of Settings › Tools › SSH Configurations", () => {
const config = {
id: "ssh1",
name: "Build server",
host: "build-server",
port: 2222,
user: "ops",
auth: "openSsh",
keyFile: "",
saveSecret: false,
};
useProject.setState({ settings: { ssh: { configs: [config] } } as unknown as Settings });
render(<ServicesDialogHost />);
act(() =>
openConnectionDialog({
id: "c1",
name: "Docker",
endpoint: { kind: "tcp", host: "ssh://ops@build-server:2222", tlsCertDir: null },
} as never),
);
const picker = screen.getByRole("button", { name: /SSH configuration/ });
expect(picker.textContent).toContain("Build server");
expect(picker.textContent).not.toContain("missing");
});
});
+1
Переглянути файл
@@ -234,6 +234,7 @@ function ConnectionDialog({ existing, onDone }: { existing?: DockerConnection; o
<SshConfigSelect
value={shown}
onChange={pickSsh}
configs={sshConfigs}
none="None — type the Engine API URL below"
aria-label="SSH configuration"
/>
+2 -1
Переглянути файл
@@ -1883,5 +1883,6 @@
"No playful words: the status stays factual": "No playful words: the status stays factual",
"e.g. Reticulating splines…": "e.g. Reticulating splines…",
"New playful word": "New playful word",
"Restore Built-in Words": "Restore Built-in Words"
"Restore Built-in Words": "Restore Built-in Words",
"None — type the Engine API URL below": "None — type the Engine API URL below"
}
+2 -1
Переглянути файл
@@ -8284,5 +8284,6 @@
"No playful words: the status stays factual": "没有趣味文字:状态只显示实际进展",
"e.g. Reticulating splines…": "例如:正在网格化样条曲线…",
"New playful word": "新的趣味文字",
"Restore Built-in Words": "恢复内置文字"
"Restore Built-in Words": "恢复内置文字",
"None — type the Engine API URL below": "无(在下方输入 Engine API URL)"
}