D1: deployment UI, docs and G17
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run

Servers dialog (write-only keychain secret, test connection, unknown and
changed host key), status-bar progress with Cancel, Deployment log tool
window, Upload/Download in the project tree menu and Tools › Deployment.
docs/deployment.md, architecture section, G17 row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-06 18:46:11 +01:00
parent f3c9ef9ce3
commit 872b5cb258
22 changed files with 2628 additions and 26 deletions

View file

@ -1,8 +1,11 @@
<script setup lang="ts">
/**
* The project tree's context menu for a file (M4.3): Open, Show Diff
* The project tree's context menu (M4.3). For a file: Open, Show Diff
* (`vcs.showDiff {path}`) and Show History (`vcs.showHistory {path}`,
* M4.6), the Git items dimmed while their command is disabled.
* M4.6), the Git items dimmed while their command is disabled. For a file
* and a folder: Upload to Server and Download from Server
* (`deployment.upload` / `deployment.download {path}`, G17), dimmed while
* no project is open or a deployment job runs.
*
* Follows the WAI-ARIA menu pattern: it takes the focus when it opens,
* Up/Down move between items (wrapping), Enter or Space runs one, Escape,
@ -21,6 +24,8 @@ const props = defineProps<{
path: string;
/** File name, for the accessible label. */
name: string;
/** Whether the entry is a file or a folder; a file when absent. */
kind?: "file" | "dir";
/** Window x of the pointer (or the row) in pixels. */
x: number;
/** Window y of the pointer (or the row) in pixels. */
@ -52,8 +57,24 @@ interface MenuItem {
run: () => Promise<void>;
}
/** The items, in order. */
const items = computed<MenuItem[]>(() => [
/** The deployment items, for files and folders. */
const deployItems = computed<MenuItem[]>(() => [
{
id: "upload",
label: t("project.tree.menu.upload"),
enabled: commands.isEnabled("deployment.upload"),
run: () => commands.execute("deployment.upload", { path: props.path }),
},
{
id: "download",
label: t("project.tree.menu.download"),
enabled: commands.isEnabled("deployment.download"),
run: () => commands.execute("deployment.download", { path: props.path }),
},
]);
/** The file items. */
const fileItems = computed<MenuItem[]>(() => [
{
id: "open",
label: t("project.tree.menu.open"),
@ -76,6 +97,9 @@ const items = computed<MenuItem[]>(() => [
},
]);
/** The items, in order. */
const items = computed<MenuItem[]>(() => (props.kind === "dir" ? deployItems.value : [...fileItems.value, ...deployItems.value]));
/** The menu's position, kept inside the window. */
const position = computed(() => ({
left: `${String(Math.max(0, Math.min(props.x, window.innerWidth - 200)))}px`,