feat(web): make deploying reachable from where it is looked for
The « Déployer » button only existed on the row of an already created target, so an empty list was a dead end whose only way out sat in the page header. The empty state now carries the action that fills it. A release also gains its own deploy button: wanting to ship a given version is the moment people look for it, and sending them to another page to retype the tag was needless. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
3 files changed
+91
-6
No files matched your search
@@ -81,7 +81,13 @@ export function toggle(checked, onChange, label) {
|
||||
* `render` returns a Node or a string.
|
||||
*/
|
||||
export function table(columns, rows, { empty = 'Rien à afficher pour le moment.' } = {}) {
|
||||
if (!rows || rows.length === 0) return h('p', { class: 'empty', text: empty });
|
||||
if (!rows || rows.length === 0) {
|
||||
// An empty state is where people look for the action that fills it, so it
|
||||
// accepts a node and not only a sentence.
|
||||
return empty instanceof Node
|
||||
? h('div', { class: 'empty' }, empty)
|
||||
: h('p', { class: 'empty', text: empty });
|
||||
}
|
||||
|
||||
return h(
|
||||
'div',
|
||||
|
||||
Reference in new issue
Block a user