From 3f3ee14d9c184e1ce82d47af0fad0b098a7a1be8 Mon Sep 17 00:00:00 2001 From: mic Date: Sun, 12 May 2024 23:15:58 +0200 Subject: [PATCH] action only text for defaults prompts --- _locales/en/messages.json | 15 +++++++++++++++ customprompts/mzta-custom-prompts.html | 6 +++--- customprompts/mzta-custom-prompts.js | 26 ++++++++++++++++++++------ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d468d082..d79a987d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -89,6 +89,21 @@ "description": "" }, + "customPrompts_close_button": { + "message": "Close button", + "description": "" + }, + + "customPrompts_do_reply": { + "message": "Do reply", + "description": "" + }, + + "customPrompts_substitute_text": { + "message": "Substitute text", + "description": "" + }, + "chatgpt_win_working": { "message": "Work in progress...", "description": "" diff --git a/customprompts/mzta-custom-prompts.html b/customprompts/mzta-custom-prompts.html index 47aac058..1e0d55b8 100644 --- a/customprompts/mzta-custom-prompts.html +++ b/customprompts/mzta-custom-prompts.html @@ -33,9 +33,9 @@

diff --git a/customprompts/mzta-custom-prompts.js b/customprompts/mzta-custom-prompts.js index 7ac975a2..bb569aab 100644 --- a/customprompts/mzta-custom-prompts.js +++ b/customprompts/mzta-custom-prompts.js @@ -41,6 +41,19 @@ document.addEventListener('DOMContentLoaded', async () => { break; } + let action_output = ''; + switch(values.action){ + case 0: + action_output = `__MSG_customPrompts_close_button__`; + break; + case 1: + action_output = `__MSG_customPrompts_save_button__`; + break; + case 2: + action_output = `__MSG_customPrompts_do_reply__`; + break; + } + let output = ` @@ -54,12 +67,13 @@ document.addEventListener('DOMContentLoaded', async () => { ` - Action: - + Action: ` + ((values.is_default == 1) ? action_output : + ``) + + `
Need Select