From 2a51e39815af74c6c2e6d535d95dffee044914a9 Mon Sep 17 00:00:00 2001 From: Mic Date: Fri, 17 Apr 2026 01:29:00 +0200 Subject: [PATCH] context menu icons folder rearranged. see #680 #184 --- claude-spec/02-prompts.md | 2 +- .../autotags.png} | Bin .../custom}/adventure-game.png | Bin .../custom}/calendar.png | Bin .../custom}/clapboard.png | Bin .../custom}/clock.png | Bin .../custom}/copywriting.png | Bin .../custom}/customer-service.png | Bin .../custom}/deadline.png | Bin .../custom}/empty_icon.png | Bin .../custom}/express-delivery.png | Bin .../custom}/home.png | Bin .../custom}/info.png | Bin .../custom}/invoice.png | Bin .../custom}/justice-scale.png | Bin .../custom}/like.png | Bin .../custom}/love-letter.png | Bin .../custom}/policeman.png | Bin .../custom}/printer.png | Bin .../custom}/puzzle-game.png | Bin .../custom}/scissors.png | Bin .../custom}/send.png | Bin .../spamfilter.png} | Bin .../summarize.png} | Bin .../translate.png} | Bin js/mzta-utils.js | 18 ++++++++++++------ pages/menu_order/mzta-custom-menu-icons.js | 2 +- 27 files changed, 14 insertions(+), 8 deletions(-) rename images/{menu_autotags.png => context_menu/autotags.png} (100%) rename images/{custom_menu => context_menu/custom}/adventure-game.png (100%) rename images/{custom_menu => context_menu/custom}/calendar.png (100%) rename images/{custom_menu => context_menu/custom}/clapboard.png (100%) rename images/{custom_menu => context_menu/custom}/clock.png (100%) rename images/{custom_menu => context_menu/custom}/copywriting.png (100%) rename images/{custom_menu => context_menu/custom}/customer-service.png (100%) rename images/{custom_menu => context_menu/custom}/deadline.png (100%) rename images/{custom_menu => context_menu/custom}/empty_icon.png (100%) rename images/{custom_menu => context_menu/custom}/express-delivery.png (100%) rename images/{custom_menu => context_menu/custom}/home.png (100%) rename images/{custom_menu => context_menu/custom}/info.png (100%) rename images/{custom_menu => context_menu/custom}/invoice.png (100%) rename images/{custom_menu => context_menu/custom}/justice-scale.png (100%) rename images/{custom_menu => context_menu/custom}/like.png (100%) rename images/{custom_menu => context_menu/custom}/love-letter.png (100%) rename images/{custom_menu => context_menu/custom}/policeman.png (100%) rename images/{custom_menu => context_menu/custom}/printer.png (100%) rename images/{custom_menu => context_menu/custom}/puzzle-game.png (100%) rename images/{custom_menu => context_menu/custom}/scissors.png (100%) rename images/{custom_menu => context_menu/custom}/send.png (100%) rename images/{menu_spamfilter.png => context_menu/spamfilter.png} (100%) rename images/{menu_summarize.png => context_menu/summarize.png} (100%) rename images/{menu_translate.png => context_menu/translate.png} (100%) diff --git a/claude-spec/02-prompts.md b/claude-spec/02-prompts.md index d2268831..2745ac3d 100644 --- a/claude-spec/02-prompts.md +++ b/claude-spec/02-prompts.md @@ -33,7 +33,7 @@ Prompts are the core user-facing feature of ThunderAI. Each prompt defines an AI | `position_compose` | number | Sort order for the popup menu in compose view | | `position_context` | number | Sort order for the context menu | | `show_in` | string | `"popup"` = popup only, `"context"` = context menu only, `"both"` = both, `"none"` = hidden from all menus. Default: `"popup"` for default/custom prompts, `"both"` for special prompts | -| `custom_icon` | string | Filename (with extension) of an icon in `images/custom_menu/` used as the context-menu icon. Empty string = no icon. Only used for non-special prompts (special prompts use their hard-coded icons in `specialPromptToContextMenuID`). Selectable from a dropdown on the Menu Order page, context-menu tab. | +| `custom_icon` | string | Filename (with extension) of an icon in `images/context_menu/custom/` used as the context-menu icon. Empty string = no icon. Only used for non-special prompts (special prompts use their hard-coded icons in `specialPromptToContextMenuID`). Selectable from a dropdown on the Menu Order page, context-menu tab. | ### Per-Prompt API Override Properties diff --git a/images/menu_autotags.png b/images/context_menu/autotags.png similarity index 100% rename from images/menu_autotags.png rename to images/context_menu/autotags.png diff --git a/images/custom_menu/adventure-game.png b/images/context_menu/custom/adventure-game.png similarity index 100% rename from images/custom_menu/adventure-game.png rename to images/context_menu/custom/adventure-game.png diff --git a/images/custom_menu/calendar.png b/images/context_menu/custom/calendar.png similarity index 100% rename from images/custom_menu/calendar.png rename to images/context_menu/custom/calendar.png diff --git a/images/custom_menu/clapboard.png b/images/context_menu/custom/clapboard.png similarity index 100% rename from images/custom_menu/clapboard.png rename to images/context_menu/custom/clapboard.png diff --git a/images/custom_menu/clock.png b/images/context_menu/custom/clock.png similarity index 100% rename from images/custom_menu/clock.png rename to images/context_menu/custom/clock.png diff --git a/images/custom_menu/copywriting.png b/images/context_menu/custom/copywriting.png similarity index 100% rename from images/custom_menu/copywriting.png rename to images/context_menu/custom/copywriting.png diff --git a/images/custom_menu/customer-service.png b/images/context_menu/custom/customer-service.png similarity index 100% rename from images/custom_menu/customer-service.png rename to images/context_menu/custom/customer-service.png diff --git a/images/custom_menu/deadline.png b/images/context_menu/custom/deadline.png similarity index 100% rename from images/custom_menu/deadline.png rename to images/context_menu/custom/deadline.png diff --git a/images/custom_menu/empty_icon.png b/images/context_menu/custom/empty_icon.png similarity index 100% rename from images/custom_menu/empty_icon.png rename to images/context_menu/custom/empty_icon.png diff --git a/images/custom_menu/express-delivery.png b/images/context_menu/custom/express-delivery.png similarity index 100% rename from images/custom_menu/express-delivery.png rename to images/context_menu/custom/express-delivery.png diff --git a/images/custom_menu/home.png b/images/context_menu/custom/home.png similarity index 100% rename from images/custom_menu/home.png rename to images/context_menu/custom/home.png diff --git a/images/custom_menu/info.png b/images/context_menu/custom/info.png similarity index 100% rename from images/custom_menu/info.png rename to images/context_menu/custom/info.png diff --git a/images/custom_menu/invoice.png b/images/context_menu/custom/invoice.png similarity index 100% rename from images/custom_menu/invoice.png rename to images/context_menu/custom/invoice.png diff --git a/images/custom_menu/justice-scale.png b/images/context_menu/custom/justice-scale.png similarity index 100% rename from images/custom_menu/justice-scale.png rename to images/context_menu/custom/justice-scale.png diff --git a/images/custom_menu/like.png b/images/context_menu/custom/like.png similarity index 100% rename from images/custom_menu/like.png rename to images/context_menu/custom/like.png diff --git a/images/custom_menu/love-letter.png b/images/context_menu/custom/love-letter.png similarity index 100% rename from images/custom_menu/love-letter.png rename to images/context_menu/custom/love-letter.png diff --git a/images/custom_menu/policeman.png b/images/context_menu/custom/policeman.png similarity index 100% rename from images/custom_menu/policeman.png rename to images/context_menu/custom/policeman.png diff --git a/images/custom_menu/printer.png b/images/context_menu/custom/printer.png similarity index 100% rename from images/custom_menu/printer.png rename to images/context_menu/custom/printer.png diff --git a/images/custom_menu/puzzle-game.png b/images/context_menu/custom/puzzle-game.png similarity index 100% rename from images/custom_menu/puzzle-game.png rename to images/context_menu/custom/puzzle-game.png diff --git a/images/custom_menu/scissors.png b/images/context_menu/custom/scissors.png similarity index 100% rename from images/custom_menu/scissors.png rename to images/context_menu/custom/scissors.png diff --git a/images/custom_menu/send.png b/images/context_menu/custom/send.png similarity index 100% rename from images/custom_menu/send.png rename to images/context_menu/custom/send.png diff --git a/images/menu_spamfilter.png b/images/context_menu/spamfilter.png similarity index 100% rename from images/menu_spamfilter.png rename to images/context_menu/spamfilter.png diff --git a/images/menu_summarize.png b/images/context_menu/summarize.png similarity index 100% rename from images/menu_summarize.png rename to images/context_menu/summarize.png diff --git a/images/menu_translate.png b/images/context_menu/translate.png similarity index 100% rename from images/menu_translate.png rename to images/context_menu/translate.png diff --git a/js/mzta-utils.js b/js/mzta-utils.js index ffa24ca3..403a475f 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -16,7 +16,13 @@ * along with this program. If not, see . */ -import { prefs_default, getDynamicSettingValue } from '../options/mzta-options-default.js'; +import { + prefs_default, + getDynamicSettingValue +} from '../options/mzta-options-default.js'; + +import { customMenuIconsPath } from '../pages/menu_order/mzta-custom-menu-icons.js' + const sparks_min = '1.2.0'; // Minimum version of ThunderAI-Sparks required for the add-on to work export const ChatGPTWeb_models = ['gpt-5','gpt-5-instant','gpt-5-t-mini','gpt-5-thinking']; // List of models available in ChatGPT Web const MICZ_IT_LOCALIZED_LANGS = ['es', 'de', 'fr', 'it']; @@ -29,10 +35,10 @@ export const contextMenuID_Spamfilter = 'mzta-spamfilter'; export const contextMenuID_Summarize = 'mzta-summarize'; export const contextMenuID_Translate = 'mzta-translate'; export const contextMenuIconsPath = { - [contextMenuID_AddTags]: 'moz-extension:images/menu_autotags.png', - [contextMenuID_Spamfilter]: 'moz-extension:images/menu_spamfilter.png', - [contextMenuID_Summarize]: 'moz-extension:images/menu_summarize.png', - [contextMenuID_Translate]: 'moz-extension:images/menu_translate.png', + [contextMenuID_AddTags]: 'moz-extension:images/context_menu/autotags.png', + [contextMenuID_Spamfilter]: 'moz-extension:images/context_menu/spamfilter.png', + [contextMenuID_Summarize]: 'moz-extension:images/context_menu/summarize.png', + [contextMenuID_Translate]: 'moz-extension:images/context_menu/translate.png', }; // Map from special prompt IDs to context menu IDs @@ -59,7 +65,7 @@ export function getContextMenuIcon(prompt) { } if (typeof prompt === 'object' && prompt !== null && prompt.custom_icon) { - return 'moz-extension:images/custom_menu/' + prompt.custom_icon; + return 'moz-extension:' + customMenuIconsPath + prompt.custom_icon; } return defaultContextMenuIcon; diff --git a/pages/menu_order/mzta-custom-menu-icons.js b/pages/menu_order/mzta-custom-menu-icons.js index df4ffba3..7c8067a0 100644 --- a/pages/menu_order/mzta-custom-menu-icons.js +++ b/pages/menu_order/mzta-custom-menu-icons.js @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -export const customMenuIconsPath = 'images/custom_menu/'; +export const customMenuIconsPath = 'images/context_menu/custom/'; export const customMenuIcons = [ 'adventure-game.png',