feat(opds): enhance facet menu with icons

This commit enhances the new facet context menu by adding icons for better visual distinction of actions like "Add catalog," "Search," and facet groups.

It also corrects the main menu trigger icon to `appbar.menu` for consistency with its function.
This commit is contained in:
Zeedif
2025-07-26 14:32:29 -06:00
committed by Frans de Jonge
parent f7b160bdda
commit 49465b2929

View File

@@ -147,7 +147,7 @@ function OPDSBrowser:showFacetMenu()
-- Add sub-catalog to bookmarks option first
table.insert(buttons, {{
text = _("Add catalog"),
text = "\u{f067} " .. _("Add catalog"),
callback = function()
UIManager:close(dialog)
self:addSubCatalog(catalog_url)
@@ -173,7 +173,7 @@ function OPDSBrowser:showFacetMenu()
if self.facet_groups then
for group_name, facets in ffiUtil.orderedPairs(self.facet_groups) do
table.insert(buttons, {
{ text = group_name, enabled = false, align = "left" }
{ text = "\u{f0b0} " .. group_name, enabled = false, align = "left" }
})
for __, link in ipairs(facets) do
@@ -688,7 +688,7 @@ function OPDSBrowser:updateCatalog(item_url, paths_updated)
-- Set appropriate title bar icon based on content
if self.facet_groups or self.search_url then
self:setTitleBarLeftIcon("appbar.settings")
self:setTitleBarLeftIcon("appbar.menu")
self.onLeftButtonTap = function()
self:showFacetMenu()
end