mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-06 07:29:42 +02:00
feat(docker): link to container attach from the Create New tab
Attaching lived only on the Docker tab, but the place users look for anything container-shaped is the "Run in an isolated Docker container" checkbox on Create New. A feature nobody can find is a feature nobody has. Adds a one-click link there that switches to the Docker tab, turns the toggle on and focuses the container field. Reuses switchCaseModalTab and the existing sync helper; no new CSS.
This commit is contained in:
@@ -2341,6 +2341,8 @@ Object.assign(CodemanApp.prototype, {
|
||||
if (adoptToggle) adoptToggle.onchange = () => this._syncDockerAdoptMode();
|
||||
const adoptCheck = document.getElementById('dockerAdoptCheckBtn');
|
||||
if (adoptCheck) adoptCheck.onclick = () => this._dockerAdoptPreflight();
|
||||
const adoptJump = document.getElementById('dockerAdoptJumpBtn');
|
||||
if (adoptJump) adoptJump.onclick = () => this.jumpToDockerAdopt();
|
||||
this._syncDockerAdoptMode();
|
||||
// Scroll-into-view on focus for mobile keyboard visibility
|
||||
modal.querySelectorAll('input[type="text"]').forEach(input => {
|
||||
@@ -2913,6 +2915,20 @@ Object.assign(CodemanApp.prototype, {
|
||||
else modal.removeAttribute('data-docker-adopt');
|
||||
},
|
||||
|
||||
/**
|
||||
* Cross-link from the Create New tab's "Run in an isolated Docker container"
|
||||
* row. Adoption lives on the Docker tab, but the place users actually look for
|
||||
* anything container-shaped is that checkbox, so this jumps them there with the
|
||||
* toggle already on rather than leaving the feature undiscoverable.
|
||||
*/
|
||||
jumpToDockerAdopt() {
|
||||
this.switchCaseModalTab('case-docker');
|
||||
const toggle = document.getElementById('dockerAdoptExisting');
|
||||
if (toggle) toggle.checked = true;
|
||||
this._syncDockerAdoptMode();
|
||||
document.getElementById('dockerContainerName')?.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Read-only preflight against an existing container. It links nothing, so the
|
||||
* user can find out "not running" / "no tmux" / "codex present, claude missing"
|
||||
|
||||
Reference in New Issue
Block a user