FIX: consistent delete button for admin permalinks page

The delete button should always be available when there are no more options.
This commit is contained in:
Krzysztof Kotlarek 2025-01-06 14:01:56 +11:00
parent 407fa69778
commit 1e8cfdcc79
4 changed files with 5 additions and 51 deletions

View File

@ -70,26 +70,11 @@
@routeModels={{pl}}
@label="admin.config_areas.permalinks.edit"
/>
<DMenu
@identifier="permalink-menu"
@title={{i18n "admin.permalinks.more_options"}}
@icon="ellipsis-vertical"
@onRegisterApi={{this.onRegisterApi}}
>
<:content>
<DropdownMenu as |dropdown|>
<dropdown.item>
<DButton
@action={{fn this.destroyRecord pl}}
@icon="trash-can"
class="btn-transparent admin-permalink-item__delete"
@label="admin.config_areas.permalinks.delete"
/>
</dropdown.item>
</DropdownMenu>
</:content>
</DMenu>
<DButton
@action={{fn this.destroyRecord pl}}
class="btn-default btn-small admin-permalink-item__delete"
@label="admin.config_areas.permalinks.delete"
/>
</div>
</td>
</tr>

View File

@ -817,17 +817,6 @@
padding-left: 18px;
}
.admin-permalink-item {
&__delete.btn,
&__delete.btn:hover {
border-top: 1px solid var(--primary-low);
color: var(--danger);
svg {
color: var(--danger);
}
}
}
// embedding
.embeddable-hosts {
margin-bottom: 2em;
@ -897,19 +886,6 @@
}
}
.admin-embedding {
.admin-embeddable-host-item__delete {
&:hover {
svg.d-icon {
color: var(--primary-medium);
}
}
svg.d-icon {
color: var(--primary-low-mid);
}
}
}
.user-fields {
h2 {
margin-bottom: 1em;

View File

@ -7383,7 +7383,6 @@ en:
no_permalinks: "You don't have any permalinks yet."
add: "Add permalink"
back: "Back to Permalinks"
more_options: "More options"
copy_success: "Permalink copied to clipboard"
nav:
settings: "Settings"

View File

@ -25,7 +25,6 @@ module PageObjects
end
def click_delete_permalink(url)
open_permalink_menu(url)
find(".admin-permalink-item__delete").click
find(".dialog-footer .btn-primary").click
expect(page).to have_no_css(".dialog-body")
@ -41,11 +40,6 @@ module PageObjects
has_no_css?(".admin-permalink-item__url")
end
def open_permalink_menu(url)
find("tr.#{url} .permalink-menu-trigger").click
self
end
def has_closed_permalink_menu?
has_no_css?(".permalink-menu-content")
end