This commit is contained in:
j3d1 2024-06-09 18:26:14 +02:00
parent 3628eb3239
commit acf76c1d15

View file

@ -1,12 +1,20 @@
<template>
<h3 class="text-center">Available Message Template Variables</h3>
<p>
<span v-for="(variable, key) in messageTemplateVariables" :key="key" class="badge badge-primary"
style="margin: 5px;">
{{ variable }}
</span>
</p>
<h3 class="text-center">Message Templates</h3>
<ul>
<div v-for="template in messageTemplatesIntermediate" :key="template.id" class="card bg-dark">
<div v-for="template in messageTemplatesIntermediate" :key="template.id" class="card bg-dark"
style="margin-bottom: 10px;">
<div class="card-header">{{ template.name }}</div>
<div class="card-body">
<FormatedText :value="template.message" :format="formatText"
@input="changeMessageTemplate(template.id, $event)"/>
<br>
</div>
<div class="card-footer">
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
:disabled="messageTemplates.find(t => t.id === template.id).message === template.message">Reset
</button>
@ -19,19 +27,12 @@
<div class="card-body">
<div class="input-group">
<input type="text" class="form-control" v-model="newTemplateName" placeholder="New Template Name">
<button class="btn btn-success input-group-btn" @click="createMessageTemplateAndReset()" ref="createButton">Create
<button class="btn btn-success input-group-btn" @click="createMessageTemplateAndReset()"
ref="createButton">Create
</button>
</div>
</div>
</div>
</ul>
<h3 class="text-center">Message Template Variables</h3>
<p>
<span v-for="(variable, key) in messageTemplateVariables" :key="key" class="badge badge-primary"
style="margin: 5px;">
{{ variable }}
</span>
</p>
</template>
<script>