mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
webui: configure, unify delete affordance on the bin icon
Five pages drew their per-row delete control as a bespoke <svg> "X" glyph instead of the icon-trash partial used by Hardware, Routes, Firewall, Interfaces and the yang tree fragments. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ func New(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ksTmpl, err := template.ParseFS(templateFS, "layouts/*.html", "fragments/configure-toolbar.html", "pages/configure-keystore.html")
|
||||
ksTmpl, err := template.ParseFS(templateFS, "layouts/*.html", "fragments/configure-toolbar.html", "fragments/icons.html", "pages/configure-keystore.html")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -109,11 +109,11 @@ func New(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cfgSysTmpl, err := template.ParseFS(templateFS, "layouts/*.html", "fragments/configure-toolbar.html", "pages/configure-system.html")
|
||||
cfgSysTmpl, err := template.ParseFS(templateFS, "layouts/*.html", "fragments/configure-toolbar.html", "fragments/icons.html", "pages/configure-system.html")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cfgUsersTmpl, err := template.ParseFS(templateFS, "layouts/*.html", "fragments/configure-toolbar.html", "pages/configure-users.html")
|
||||
cfgUsersTmpl, err := template.ParseFS(templateFS, "layouts/*.html", "fragments/configure-toolbar.html", "fragments/icons.html", "pages/configure-users.html")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -183,9 +183,7 @@
|
||||
hx-delete="/configure/interfaces/{{$r.Name}}/ipv4/dhcp/options/{{.ID}}"
|
||||
hx-confirm="Remove option {{.ID}}?"
|
||||
hx-target="closest tr" hx-swap="delete" title="Remove option">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -306,9 +304,7 @@
|
||||
hx-delete="/configure/interfaces/{{$r.Name}}/ipv6/dhcp/options/{{.ID}}"
|
||||
hx-confirm="Remove option {{.ID}}?"
|
||||
hx-target="closest tr" hx-swap="delete" title="Remove option">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -46,26 +46,22 @@
|
||||
<td>{{.Format}}</td>
|
||||
<td>
|
||||
{{if .Value}}
|
||||
<span class="cfg-secret-wrap">
|
||||
<span class="cfg-input-mask" id="sym-val-{{$i}}">{{.Value}}</span>
|
||||
<button type="button" class="btn-icon cfg-secret-toggle"
|
||||
data-toggle-mask="sym-val-{{$i}}"
|
||||
aria-label="Show / hide value">👁</button>
|
||||
</span>
|
||||
{{else}}<span class="text-muted">—</span>{{end}}
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<td style="text-align:right; white-space:nowrap">
|
||||
{{if .Value}}
|
||||
<button type="button" class="btn-icon cfg-secret-toggle"
|
||||
data-toggle-mask="sym-val-{{$i}}"
|
||||
title="Show / hide value"
|
||||
aria-label="Show / hide value">👁</button>
|
||||
{{end}}
|
||||
<button type="button" class="btn-icon btn-icon-danger"
|
||||
hx-delete="/configure/keystore/symmetric/{{.Name}}"
|
||||
hx-confirm="Delete symmetric key {{.Name}}?"
|
||||
hx-swap="none"
|
||||
title="Delete key">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -179,12 +175,7 @@
|
||||
hx-confirm="Delete asymmetric key {{.Name}} and all its certificates?"
|
||||
hx-swap="none"
|
||||
title="Delete key">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -238,12 +229,7 @@
|
||||
hx-confirm="Remove certificate {{.Name}}?"
|
||||
hx-swap="none"
|
||||
title="Remove certificate">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -120,10 +120,7 @@
|
||||
<td>
|
||||
<button type="button" class="btn-icon btn-icon-danger cfg-delete-row"
|
||||
title="Remove">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -158,10 +155,7 @@
|
||||
name="dns_search_{{$i}}" value="{{$d}}"></td>
|
||||
<td>
|
||||
<button type="button" class="btn-icon btn-icon-danger cfg-delete-row" title="Remove">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -197,10 +191,7 @@
|
||||
placeholder="53"></td>
|
||||
<td>
|
||||
<button type="button" class="btn-icon btn-icon-danger cfg-delete-row" title="Remove">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -61,12 +61,7 @@
|
||||
hx-confirm="Delete user {{.Name}}?"
|
||||
hx-swap="none"
|
||||
title="Delete user">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -112,12 +107,7 @@
|
||||
hx-target="closest tr"
|
||||
hx-swap="delete"
|
||||
title="Remove key">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -221,12 +211,7 @@
|
||||
hx-target="closest tr"
|
||||
hx-swap="delete"
|
||||
title="Remove from group">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
{{template "icon-trash"}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user