diff --git a/app/templates/runs/_launch_ask.html b/app/templates/runs/_launch_ask.html
index cb6abae7..ca2a3a58 100644
--- a/app/templates/runs/_launch_ask.html
+++ b/app/templates/runs/_launch_ask.html
@@ -21,7 +21,7 @@
{% call ask(L, gone, back) %}{{ items }}{% endcall %}{% endif %}
{%- endmacro %}
-{#- One dialog for every launch: a button fills it from its launch's template (`asks`: button class -> template class),
+{#- One dialog for every launch: a button fills it from its launch's template, else the page's (`asks`: button class -> template class),
or from the server (the button's data-ask);
?delete= opens the Delete question on load. #}
{% macro dialogs(asks={'launch-delete-btn': 'launch-ask'}) %}
@@ -40,7 +40,7 @@
const r = await nulliusFetch(b.dataset.ask);
if (!r.ok) { b.title = await r.text(); return; }
d.innerHTML = await r.text();
- } else d.replaceChildren(l.querySelector('template.' + asks[cls]).content.cloneNode(true));
+ } else d.replaceChildren((l.querySelector('template.' + asks[cls]) || document.querySelector('template.' + asks[cls])).content.cloneNode(true)); // the row's own, or the page's one
d.showModal();
};
const sel = Object.keys(asks).map(c => '.' + c).join(',');
diff --git a/app/templates/runs/launches.html b/app/templates/runs/launches.html
index ae5ff156..474c7911 100644
--- a/app/templates/runs/launches.html
+++ b/app/templates/runs/launches.html
@@ -49,28 +49,37 @@
{%- elif c.key == 'size' %}{% call cell(c, sort=r.bytes, class='nowrap') %}{{ r.bytes|filesizeformat }}{% endcall %}
{%- elif c.key == 'ws' %}{% call cell(c, sort=wss|map(attribute='label')|sort|join(' ')) %}{% for w in wss %}{{ open_at(w, L, w.label) }}{% if not loop.last %} {% endif %}{% else %}none{% endfor %}{% endcall %}
{%- elif c.key == 'actions' %}{% call cell(c, class='acts-col') %}
- {% set others = workspaces|rejectattr('name', 'in', wss|map(attribute='name')|list)|list %}
-
-
-
Add launch {{ L.title }}
-
-
+
{% if not r.why %}{{ delete_ask(L, none, 'launches', icon=true) }}
{%- else %}{{ greyed('Delete launch ' ~ L.title, 'Delete launch', r.why, 'why-' ~ L.key) }}{% endif %}
{% endcall %}
{%- endif %}
{% endcall %}
+{#- Add, once for the page: its button fills in the launch, and drops the workspaces its row already lists. #}
+
+
+
+
{{ dialogs({'launch-delete-btn': 'launch-ask', 'launch-add-btn': 'launch-add'}) }}
{% else %}
diff --git a/app/templates/workspaces/_roots.html b/app/templates/workspaces/_roots.html
new file mode 100644
index 00000000..4868aa78
--- /dev/null
+++ b/app/templates/workspaces/_roots.html
@@ -0,0 +1,23 @@
+{#- The Roots dialog of a workspace (`workspace_roots`), fetched when it opens: each root's Unlink asked here, its Delete asked of the server. #}
+{% from '_tables.html' import greyed %}
+