Add missing icons to the collections context menu (#5386)

Co-authored-by: yexingsha <yexingsha@gmail.com>
This commit is contained in:
Tom Najdek 2025-07-16 11:06:38 +02:00
parent 0e3b695a85
commit 9c82fed152
No known key found for this signature in database
GPG key ID: EEC61A7B4C667D77
5 changed files with 17 additions and 0 deletions

View file

@ -3470,6 +3470,8 @@ var ZoteroPane = new function()
// Adjust labels
document.l10n.setAttributes(m.editSelectedCollection, 'collections-menu-edit-saved-search');
m.duplicate.setAttribute('label', Zotero.getString('pane.collections.menu.duplicate.savedSearch'));
m.duplicate.classList.add('zotero-menuitem-duplicate-saved-search');
m.duplicate.classList.remove('zotero-menuitem-duplicate-collection');
m.deleteCollection.setAttribute('label', Zotero.getString('pane.collections.menu.delete.savedSearch'));
m.exportCollection.setAttribute('label', Zotero.getString('pane.collections.menu.export.savedSearch'));
m.createBibCollection.setAttribute('label', Zotero.getString('pane.collections.menu.createBib.savedSearch'));
@ -4121,6 +4123,7 @@ var ZoteroPane = new function()
});
// Disable for already top-level collections
libraryMenuItem.disabled = !selected.parentID;
libraryMenuItem.classList.add('menuitem-iconic');
popup.appendChild(libraryMenuItem);
popup.appendChild(document.createXULElement("menuseparator"));

View file

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.38184 0C6.76081 0 7.10736 0.213773 7.27637 0.552734L8 2H13C13.552 2 14 2.448 14 3V6H13V5H1V11H7V12H1C0.448 12 0 11.552 0 11V3C0 2.448 0.448 2 1 2H2L2.72363 0.552734C2.89264 0.213773 3.23919 0 3.61816 0H6.38184ZM2.89355 2.44727C2.72448 2.78604 2.37885 3 2 3H1V4H13V3H8C7.62115 3 7.27552 2.78604 7.10645 2.44727L6.38184 1H3.61816L2.89355 2.44727Z" fill="context-fill"/>
<path d="M14 9V7H8V14H10V16H16V9H14ZM9 8H13V13H9V8ZM15 15H11V14H14V10H15V15Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 583 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.707 16L12 15.293L13.293 14H8V13H15.707L12.707 16ZM6.38184 0C6.76081 0 7.10736 0.213773 7.27637 0.552734L8 2H13C13.552 2 14 2.448 14 3V10H13V5H1V11H7.87891L6.87891 12H1C0.448 12 0 11.552 0 11V3C0 2.448 0.448 2 1 2H2L2.72363 0.552734C2.89264 0.213773 3.23919 0 3.61816 0H6.38184ZM12 9.70703L10.707 11H16V12H8.29297L11.293 9L12 9.70703ZM2.89355 2.44727C2.72448 2.78604 2.37885 3 2 3H1V4H13V3H8C7.62115 3 7.27552 2.78604 7.10645 2.44727L6.38184 1H3.61816L2.89355 2.44727Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 607 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.707 0H1V16H15V5.293L9.707 0ZM13.293 5H10V1.707L13.293 5ZM14 15H2V1H9V6H14V15ZM7 6H4V5H7V6ZM4 8H12V9H4V8ZM4 11H12V12H4V11Z" fill="context-fill"/>
</svg>

After

Width:  |  Height:  |  Size: 260 B

View file

@ -65,6 +65,10 @@ $menu-icons: (
expand-all: "expand-all",
collapse-others: "collapse-others",
change-top-level-item: "change-top-level-item",
show-publications: 'publications',
duplicate-saved-search: 'duplicate',
copy-collection: 'copy-collection',
move-collection: 'move-collection',
);
@each $cls, $icon in $menu-icons {