feat: Support SMSPlanet notification provider (#5800)

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
Dawid
2025-04-26 22:33:26 +02:00
committed by GitHub
parent 3b58ac3fd3
commit f6444aacd2
6 changed files with 100 additions and 3 deletions

View File

@@ -185,7 +185,8 @@ export default {
"PushPlus": "PushPlus (推送加)",
"smsc": "SMSC",
"WPush": "WPush(wpush.cn)",
"YZJ": "YZJ (云之家自定义机器人)"
"YZJ": "YZJ (云之家自定义机器人)",
"SMSPlanet": "SMSPlanet.pl"
};
// Sort by notification name

View File

@@ -0,0 +1,46 @@
<template>
<div class="mb-3">
<label for="smsplanet-api-token" class="form-label">{{ $t('smsplanetApiToken') }}</label>
<HiddenInput id="smsplanet-api-token" v-model="$parent.notification.smsplanetApiToken" :required="true"></HiddenInput>
<i18n-t tag="div" keypath="smsplanetApiDocs" class="form-text">
<template #the_smsplanet_documentation>
<a
href="https://smsplanet.pl/doc/slate/index.html#introduction"
target="_blank"
>{{ $t("the smsplanet documentation") }}</a>
</template>
</i18n-t>
</div>
<div class="mb-3">
<label for="smsplanet-phone-numbers" class="form-label">{{ $t("Phone numbers") }}</label>
<textarea
id="smsplanet-phone-numbers"
v-model="$parent.notification.smsplanetPhoneNumbers"
class="form-control"
:placeholder="smsplanetPhoneNumbers"
required
></textarea>
</div>
<div class="mb-3">
<label for="smsplanet-sender-name" class="form-label">{{ $t("Sender name") }}</label>
<input id="smsplanet-sender-name" v-model="$parent.notification.smsplanetSenderName" type="text" minlength="3" maxlength="11" class="form-control">
<div class="form-text">{{ $t("smsplanetNeedToApproveName") }}</div>
</div>
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
},
computed: {
smsplanetPhoneNumbers() {
return this.$t("Example:", [
"+48123456789,+48111222333",
]);
}
}
};
</script>

View File

@@ -70,6 +70,7 @@ import WPush from "./WPush.vue";
import SIGNL4 from "./SIGNL4.vue";
import SendGrid from "./SendGrid.vue";
import YZJ from "./YZJ.vue";
import SMSPlanet from "./SMSPlanet.vue";
/**
* Manage all notification form.
@@ -148,6 +149,7 @@ const NotificationFormList = {
"WPush": WPush,
"SendGrid": SendGrid,
"YZJ": YZJ,
"SMSPlanet": SMSPlanet,
};
export default NotificationFormList;

View File

@@ -1068,5 +1068,11 @@
"Plain Text": "Plain Text",
"Message Template": "Message Template",
"Template Format": "Template Format",
"Font Twemoji by Twitter licensed under": "Font Twemoji by Twitter licensed under"
"Font Twemoji by Twitter licensed under": "Font Twemoji by Twitter licensed under",
"smsplanetApiToken": "Token for the SMSPlanet API",
"smsplanetApiDocs": "Detailed information on obtaining API tokens can be found in {the_smsplanet_documentation}.",
"the smsplanet documentation": "the smsplanet documentation",
"Phone numbers": "Phone numbers",
"Sender name": "Sender name",
"smsplanetNeedToApproveName": "Needs to be approved in the client panel"
}