[AB-349] refactoring templates to have the new multi embed structure

This commit is contained in:
Sheldan
2021-12-08 16:32:41 +01:00
parent c52dbbb1f3
commit 921a5259ee
112 changed files with 1937 additions and 1488 deletions

View File

@@ -1,21 +1,25 @@
{
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color">,
"description": "<@safe_include "remind_reminder_description"/>",
"fields": [
{
"name": "<@safe_include "remind_reminder_duration_field_title"/>",
"value": "${fmtDuration(duration)}"
},
{
"name": "<@safe_include "remind_reminder_note_field_title"/>",
"value": "${reminder.text?json_string}"
},
{
"name": "<@safe_include "remind_reminder_link_field_title"/>",
"value": "[<@safe_include "remind_reminder_link_content_display_text"/>](${messageUrl})"
}
],
"additionalMessage": "${member.asMention?json_string} 🔔"
"embeds": [
{
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color">,
"description": "<@safe_include "remind_reminder_description"/>",
"fields": [
{
"name": "<@safe_include "remind_reminder_duration_field_title"/>",
"value": "${fmtDuration(duration)}"
},
{
"name": "<@safe_include "remind_reminder_note_field_title"/>",
"value": "${reminder.text?json_string}"
},
{
"name": "<@safe_include "remind_reminder_link_field_title"/>",
"value": "[<@safe_include "remind_reminder_link_content_display_text"/>](${messageUrl})"
}
]
}
],
"additionalMessage": "${member.asMention?json_string} 🔔"
}

View File

@@ -1,9 +1,13 @@
{
<#assign id>${reminder.id}</#assign>
<#assign messageUrl>${message.jumpUrl}</#assign>
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color">,
"description": "<@safe_include "remind_reminding_description_text"/>",
"additionalMessage": "${member.asMention?json_string}"
"embeds": [
{
<#assign id>${reminder.id}</#assign>
<#assign messageUrl>${message.jumpUrl}</#assign>
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color">,
"description": "<@safe_include "remind_reminding_description_text"/>"
}
],
"additionalMessage": "${member.asMention?json_string}"
}

View File

@@ -1,26 +1,30 @@
<#include "format_instant">
{
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color">,
"title": {
"title": "<@safe_include "reminders_reminders_embed_title"/>"
},
<#if reminders?size = 0>
"description": "<@safe_include "reminders_no_reminders"/>"
<#else>
"fields": [
<#list reminders as reminderDisplay><#assign reminderDisplay=reminderDisplay/>
{
<#assign id>${reminderDisplay.reminder.id}</#assign>
<#assign reminderTargetDate><@format_instant_date_time instant=reminderDisplay.reminder.targetDate/></#assign>
<#assign reminderText=reminderDisplay.reminder.text/>
<#assign messageLink=reminderDisplay.message.jumpUrl/>
"name": "<@safe_include "reminders_reminder_field_title"/>",
"value": "<@safe_include "reminders_due_on"/>"
}
<#sep>,
</#list>
]
</#if>
"embeds": [
{
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color">,
"title": {
"title": "<@safe_include "reminders_reminders_embed_title"/>"
},
<#if reminders?size = 0>
"description": "<@safe_include "reminders_no_reminders"/>"
<#else>
"fields": [
<#list reminders as reminderDisplay><#assign reminderDisplay=reminderDisplay/>
{
<#assign id>${reminderDisplay.reminder.id}</#assign>
<#assign reminderTargetDate><@format_instant_date_time instant=reminderDisplay.reminder.targetDate/></#assign>
<#assign reminderText=reminderDisplay.reminder.text/>
<#assign messageLink=reminderDisplay.message.jumpUrl/>
"name": "<@safe_include "reminders_reminder_field_title"/>",
"value": "<@safe_include "reminders_due_on"/>"
}
<#sep>,
</#list>
]
</#if>
}
]
}