diff --git a/web/src/components/inputs/FormatedText.vue b/web/src/components/inputs/FormatedText.vue
index 05e8178..6c137d0 100644
--- a/web/src/components/inputs/FormatedText.vue
+++ b/web/src/components/inputs/FormatedText.vue
@@ -1,6 +1,5 @@
diff --git a/web/src/views/admin/Settings.vue b/web/src/views/admin/Settings.vue
index 3511945..9bb7e9a 100644
--- a/web/src/views/admin/Settings.vue
+++ b/web/src/views/admin/Settings.vue
@@ -2,9 +2,8 @@
Message Templates
-
- {{ template.name }}
{{ template.message }}
-
+
Message Template Variables
@@ -24,7 +23,14 @@ export default {
name: 'Settings',
components: {FormatedText, Table},
computed: mapState(['messageTemplates', 'messageTemplateVariables']),
- methods: mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
+ methods: {
+ ...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
+ formatText(value) {
+ return value.replace(/{{(.*?)}}/g, (match, key) => {
+ return `{{ ${key} }}`;
+ }).replace(/\n/g, '
').replace(/\t/g, ' ');
+ }
+ },
mounted() {
this.fetchMessageTemplates();
this.fetchMessageTemplateVariables();