Add account email address placeholder. fixes #272
This commit is contained in:
parent
a11164a670
commit
6e5f8cafb6
2 changed files with 18 additions and 3 deletions
|
|
@ -643,6 +643,10 @@
|
||||||
"message": "Author",
|
"message": "Author",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
|
"placeholder_account_email_address": {
|
||||||
|
"message": "Account email address",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
"prefs_OptionText_placeholders_use_default_value": {
|
"prefs_OptionText_placeholders_use_default_value": {
|
||||||
"message": "Placeholders: use default value",
|
"message": "Placeholders: use default value",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { transformTagsLabels } from './mzta-utils.js';
|
import { transformTagsLabels, getCurrentIdentity } from './mzta-utils.js';
|
||||||
|
|
||||||
const defaultPlaceholders = [
|
const defaultPlaceholders = [
|
||||||
{
|
{
|
||||||
|
|
@ -67,14 +67,14 @@ const defaultPlaceholders = [
|
||||||
id: 'mail_folder_name',
|
id: 'mail_folder_name',
|
||||||
name: "__MSG_placeholder_folder_name__",
|
name: "__MSG_placeholder_folder_name__",
|
||||||
default_value: "",
|
default_value: "",
|
||||||
type: 0,
|
type: 1,
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'mail_folder_path',
|
id: 'mail_folder_path',
|
||||||
name: "__MSG_placeholder_folder_path__",
|
name: "__MSG_placeholder_folder_path__",
|
||||||
default_value: "",
|
default_value: "",
|
||||||
type: 0,
|
type: 1,
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -133,6 +133,13 @@ const defaultPlaceholders = [
|
||||||
type: 0,
|
type: 0,
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'account_email_address',
|
||||||
|
name: "__MSG_placeholder_account_email_address__",
|
||||||
|
default_value: "",
|
||||||
|
type: 0,
|
||||||
|
is_default: "1",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'tags_current_email',
|
id: 'tags_current_email',
|
||||||
name: "__MSG_placeholder_tags_current_email__",
|
name: "__MSG_placeholder_tags_current_email__",
|
||||||
|
|
@ -322,6 +329,10 @@ export const placeholdersUtils = {
|
||||||
case 'current_datetime':
|
case 'current_datetime':
|
||||||
finalSubs['current_datetime'] = new Date().toString();
|
finalSubs['current_datetime'] = new Date().toString();
|
||||||
break;
|
break;
|
||||||
|
case 'account_email_address':
|
||||||
|
let current_identity = await getCurrentIdentity(curr_message, true);
|
||||||
|
finalSubs['account_email_address'] = current_identity.email;
|
||||||
|
break;
|
||||||
case 'tags_current_email':
|
case 'tags_current_email':
|
||||||
let tags_current_email_array = await transformTagsLabels(curr_message.tags, tags_full_list[1]);
|
let tags_current_email_array = await transformTagsLabels(curr_message.tags, tags_full_list[1]);
|
||||||
finalSubs['tags_current_email'] = tags_current_email_array.join(", ");
|
finalSubs['tags_current_email'] = tags_current_email_array.join(", ");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue