feat: give the update source a page, and the adopt flow its preview

The console page grows an update-source section: what is in effect and where it
comes from (config.yaml or the tree's own tracking), an edit form for the three
fields, and - for a directory that is not a git installation - the adopt entry.
Adopt is preview-first: the plan lists what would be replaced and what would be
kept, the confirm dialog carries the counts, and the restart tick is the same one
an update uses. A refused save shows the server's own sentence (a remote name and
an address together, an ext:: address) instead of a generic failure, and the typed
values survive the failed save and the polling redraws.

zh/EN/RU dictionaries carry the 27 new keys; the console page's contract tests
grow to 29 (source rendering and save body, the refusal path, adopt gating by
installation kind, preview-then-confirm); docs/README describe choosing a source
and connecting an unpacked installation.
This commit is contained in:
Sycun committed 2026-10-07 12:49:15 +08:00
1 parent acd84cd525
commit 27c1ff6573
12 files changed
+461 -5

No files matched your search

+36
View File
@@ -47005,3 +47005,39 @@ html[data-theme="dark"] { --tool-blocked-color: #f4bc62; }
white-space: pre-wrap;
word-break: break-word;
}
/* 更新源区块:一行一个输入(label 上、输入下),与平台的设置表单同构。 */
.update-source-form {
display: flex;
flex-direction: column;
gap: 10px;
}
.update-source-form label {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 13px;
color: var(--text-secondary);
}
.update-source-input {
padding: 8px 10px;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--bg-primary);
color: var(--text-primary);
font-size: 14px;
}
.update-source-url,
.update-source-remote,
.update-source-branch {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.update-source-save-btn,
.update-adopt-preview-btn,
.update-adopt-confirm-btn {
align-self: flex-start;
}