mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
fix: show Action badge for ACTION links in detail and list views
link_detail.html and _link_row.html only handled Template/LINK types, so ACTION links fell through to the Custom badge. Add badge-action branch + CSS so go/link/235/ (alias=ask) displays Action, matching the Action tab in the link form.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
<span class="badge badge-template"><i class="fas fa-magic" aria-hidden="true"></i>{% trans "Template" %}</span>
|
||||
{% elif link.link_type == 'LINK' %}
|
||||
<span class="badge badge-link"><i class="fas fa-link" aria-hidden="true"></i>{% trans "Link" %}</span>
|
||||
{% elif link.link_type == 'ACTION' %}
|
||||
<span class="badge badge-action"><i class="fas fa-bolt" aria-hidden="true"></i>{% trans "Action" %}</span>
|
||||
{% else %}
|
||||
<span class="badge badge-custom"><i class="fas fa-code" aria-hidden="true"></i>{% trans "Custom" %}</span>
|
||||
{% endif %}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<span class="badge badge-template"><i class="fas fa-magic" aria-hidden="true"></i>{% trans "Template" %}</span>
|
||||
{% elif link.link_type == 'LINK' %}
|
||||
<span class="badge badge-link"><i class="fas fa-link" aria-hidden="true"></i>{% trans "Link" %}</span>
|
||||
{% elif link.link_type == 'ACTION' %}
|
||||
<span class="badge badge-action"><i class="fas fa-bolt" aria-hidden="true"></i>{% trans "Action" %}</span>
|
||||
{% else %}
|
||||
<span class="badge badge-custom"><i class="fas fa-code" aria-hidden="true"></i>{% trans "Custom" %}</span>
|
||||
{% endif %}
|
||||
@@ -427,6 +429,7 @@
|
||||
.badge-template { background: rgba(191, 90, 242, 0.12); color: #8944ab; }
|
||||
.badge-link { background: rgba(0, 113, 227, 0.10); color: var(--apple-blue); }
|
||||
.badge-custom { background: rgba(48, 209, 88, 0.15); color: #1e7b34; }
|
||||
.badge-action { background: rgba(191, 90, 242, 0.12); color: #8944ab; }
|
||||
|
||||
.action-btn {
|
||||
display: inline-flex; align-items: center; gap: 0.4rem;
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
.badge-template { background: rgba(191, 90, 242, 0.12); color: #8944ab; }
|
||||
.badge-link { background: rgba(0, 113, 227, 0.10); color: var(--apple-blue); }
|
||||
.badge-custom { background: rgba(48, 209, 88, 0.15); color: #1e7b34; }
|
||||
.badge-action { background: rgba(191, 90, 242, 0.12); color: #8944ab; }
|
||||
|
||||
.icon-btn {
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user