current datetime placeholder added. fixes #224
This commit is contained in:
parent
cd64ec5791
commit
9b5f938953
3 changed files with 19 additions and 1 deletions
|
|
@ -998,5 +998,13 @@
|
|||
"prefs_OptionText_download_now": {
|
||||
"message": "Download ThunderAI Sparks now!",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_datetime": {
|
||||
"message": "The date and time of the email",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_current_datetime": {
|
||||
"message": "The current date and time",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -178,6 +178,9 @@ export class mzta_Menus {
|
|||
case 'mail_datetime':
|
||||
finalSubs['mail_datetime'] = curr_message.date;
|
||||
break;
|
||||
case 'current_datetime':
|
||||
finalSubs['current_datetime'] = new Date().toString();
|
||||
break;
|
||||
case 'tags_current_email':
|
||||
let tags_current_email_array = await transformTagsLabels(curr_message.tags, tags_full_list[1]);
|
||||
finalSubs['tags_current_email'] = tags_current_email_array.join(", ");
|
||||
|
|
@ -269,7 +272,7 @@ export class mzta_Menus {
|
|||
await cmd_GetCalendarEvent.initWorker();
|
||||
try{
|
||||
calendar_event_data = await cmd_GetCalendarEvent.sendPrompt();
|
||||
console.log(">>>>>>>>>>> calendar_event_data: " + calendar_event_data);
|
||||
// console.log(">>>>>>>>>>> calendar_event_data: " + calendar_event_data);
|
||||
}catch(err){
|
||||
console.error("[ThunderAI] Error getting calendar event data: ", JSON.stringify(err));
|
||||
browser.tabs.sendMessage(tabs[0].id, { command: "sendAlert", curr_tab_type: tabs[0].type, message: "Error getting calendar event data: " + JSON.stringify(err) });
|
||||
|
|
|
|||
|
|
@ -110,6 +110,13 @@ const defaultPlaceholders = [
|
|||
type: 1,
|
||||
is_default: "1",
|
||||
},
|
||||
{
|
||||
id: 'current_datetime',
|
||||
name: "__MSG_placeholder_current_datetime__",
|
||||
default_value: "",
|
||||
type: 0,
|
||||
is_default: "1",
|
||||
},
|
||||
{
|
||||
id: 'tags_current_email',
|
||||
name: "__MSG_placeholder_tags_current_email__",
|
||||
|
|
|
|||
Loading…
Reference in a new issue