thunderai_def_sign and thunderai_def_lang palceholders added. fixes #248

This commit is contained in:
mic 2025-02-06 21:57:06 +01:00
parent e1cba2a68f
commit c4dd7a244a
3 changed files with 30 additions and 0 deletions

View file

@ -1042,5 +1042,13 @@
"prefs_OptionText_add_tags_auto_only_inbox_Info": {
"message": "If checked, the AI will only add tags to emails received in the inbox folder.",
"description": ""
},
"placeholder_thunderai_def_sign": {
"message": "Default signature as defined in ThunderAI options.",
"description": ""
},
"thunderai_def_lang": {
"message": "Default language as defined in ThunderAI options.",
"description": ""
}
}

View file

@ -188,6 +188,14 @@ export class mzta_Menus {
case 'tags_full_list':
finalSubs['tags_full_list'] = tags_full_list[0];
break;
case 'thunderai_def_sign':
let prefs_def_sign = await browser.storage.sync.get({default_sign_name: ''});
finalSubs['thunderai_def_sign'] = prefs_def_sign.default_sign_name;
break;
case 'thunderai_def_lang':
let prefs_def_lang = await browser.storage.sync.get({default_chatgpt_lang: ''});
finalSubs['thunderai_def_lang'] = prefs_def_lang.default_chatgpt_lang;
break;
default: // TODO Manage custom placeholders https://github.com/micz/ThunderAI/issues/156
break;
}

View file

@ -131,6 +131,20 @@ const defaultPlaceholders = [
type: 0,
is_default: "1",
},
{
id: 'thunderai_def_sign',
name: "__MSG_placeholder_thunderai_def_sign__",
default_value: "",
type: 0,
is_default: "1",
},
{
id: 'thunderai_def_lang',
name: "__MSG_placeholder_thunderai_def_lang__",
default_value: "",
type: 0,
is_default: "1",
},
];