Support SVG icon in action menu (#12403)

* Support custom SVG icon in menu item with legacy support

* Update menu icons

* Update action icons

* Adjust icons in menu actions with legacy fallback

* Don't use legacy icon

* Update comments
This commit is contained in:
Bjarne Fyrstenborg
2022-05-16 23:50:19 +02:00
committed by GitHub
parent 048193e3a5
commit d051f850eb
39 changed files with 244 additions and 189 deletions

View File

@@ -471,14 +471,17 @@ namespace Umbraco.Cms.Web.BackOffice.Trees
}
var menu = MenuItemCollectionFactory.Create();
// only add empty recycle bin if the current user is allowed to delete by default
if (deleteAllowed)
{
menu.Items.Add(new MenuItem("emptyrecyclebin", LocalizedTextService)
{
Icon = "trash",
OpensDialog = true
Icon = "icon-trash",
OpensDialog = true,
UseLegacyIcon = false,
});
menu.Items.Add(new RefreshNode(LocalizedTextService, true));
}
return menu;