Merge branch 'master' into feature/ntp-monitor

pull/7214/head^2
Henri Cook 4 weeks ago committed by GitHub
commit 9729ff0e59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,9 +20,15 @@ class Evolution extends NotificationProvider {
};
config = this.getAxiosConfigWithProxy(config);
let text = msg;
const customMessage = notification.evolutionCustomMessage;
if (notification.evolutionUseCustomMessage && typeof customMessage === "string" && customMessage.trim()) {
text = await this.renderTemplate(customMessage, msg, monitorJSON, heartbeatJSON);
}
let data = {
number: notification.evolutionRecipient,
text: msg,
text,
};
let url =

@ -55,17 +55,43 @@
</div>
</div>
<div class="mb-3">
<div class="form-check form-switch">
<input v-model="$parent.notification.evolutionUseCustomMessage" class="form-check-input" type="checkbox" />
<label class="form-check-label">{{ $t("evolutionCustomMessageTitle") }}</label>
</div>
<div class="form-text">{{ $t("evolutionCustomMessageDesc") }}</div>
</div>
<template v-if="$parent.notification.evolutionUseCustomMessage">
<div class="mb-3">
<TemplatedTextarea
id="evolution-custom-message"
v-model="$parent.notification.evolutionCustomMessage"
:required="true"
:placeholder="customMessagePlaceholder"
></TemplatedTextarea>
</div>
</template>
<i18n-t tag="div" keypath="More info on:" class="mb-3 form-text">
<a href="https:/evoapicloud.com/" target="_blank">https://evoapicloud.com/</a>
<a href="https://evoapicloud.com/" target="_blank">https://evoapicloud.com/</a>
</i18n-t>
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
import TemplatedTextarea from "../TemplatedTextarea.vue";
export default {
components: {
HiddenInput,
TemplatedTextarea,
},
computed: {
customMessagePlaceholder() {
return this.$t("Example:", [`[{{ name }}] [{{ status }}]\n{{ msg }}`]);
},
},
};
</script>

@ -1166,6 +1166,8 @@
"wayToGetEvolutionUrlAndToken": "You can get the API URL and the token by going into your desired channel from {0}",
"evolutionRecipient": "Phone Number / Contact ID / Group ID",
"evolutionInstanceName": "Instance Name",
"evolutionCustomMessageTitle": "Custom Message (optional)",
"evolutionCustomMessageDesc": "Leave empty to use the default message.",
"What is a Remote Browser?": "What is a Remote Browser?",
"wayToGetHeiiOnCallDetails": "How to get the Trigger ID and API Keys is explained in the {documentation}",
"documentationOf": "{0} Documentation",

Loading…
Cancel
Save