新增TG自定义是否显示文本消息
This commit is contained in:
@@ -302,7 +302,8 @@ const en = {
|
||||
customDomainDesc: 'Worker custom domain',
|
||||
show: 'Show',
|
||||
hide: 'Hide',
|
||||
onlyName: 'Only name'
|
||||
onlyName: 'Only name',
|
||||
emailText: 'Email Text'
|
||||
}
|
||||
|
||||
export default en
|
||||
|
||||
@@ -302,6 +302,7 @@ const zh = {
|
||||
customDomainDesc: 'Worker 自定义域',
|
||||
show: '显示',
|
||||
hide: '隐藏',
|
||||
onlyName: '仅名字'
|
||||
onlyName: '仅名字',
|
||||
emailText: '邮件文本'
|
||||
}
|
||||
export default zh
|
||||
|
||||
@@ -508,6 +508,17 @@
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="tg-msg-label">
|
||||
<span>{{t('emailText')}}</span>
|
||||
<el-select v-model="tgMsgText" >
|
||||
<el-option
|
||||
v-for="item in tgMsgTextOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -811,9 +822,11 @@ const ruleType = ref(0)
|
||||
const ruleEmail = ref([])
|
||||
const tgMsgFrom = ref('')
|
||||
const tgMsgTo = ref('')
|
||||
const tgMsgText = ref('')
|
||||
|
||||
const tgMsgFromOption = [{label: t('show'), value: 'show'}, {label: t('hide'), value: 'hide'}, {label: t('onlyName'), value:'only-name'}]
|
||||
const tgMsgToOption = [{label: t('show'), value: 'show'}, {label: t('hide'), value: 'hide'}]
|
||||
const tgMsgTextOption = [{label: t('show'), value: 'show'}, {label: t('hide'), value: 'hide'}]
|
||||
const tgMsgLabelWidth = computed(() => locale.value === 'en' ? '120px' : '100px');
|
||||
|
||||
getSettings()
|
||||
@@ -930,6 +943,7 @@ function openTgSetting() {
|
||||
tgBotToken.value = setting.value.tgBotToken
|
||||
customDomain.value = setting.value.customDomain
|
||||
tgMsgFrom.value = setting.value.tgMsgFrom
|
||||
tgMsgText.value = setting.value.tgMsgText
|
||||
tgMsgTo.value = setting.value.tgMsgTo
|
||||
tgChatId.value = []
|
||||
if (setting.value.tgChatId) {
|
||||
@@ -1068,6 +1082,7 @@ function tgBotSave() {
|
||||
tgBotStatus: tgBotStatus.value,
|
||||
tgChatId: tgChatId.value + '',
|
||||
tgMsgFrom: tgMsgFrom.value,
|
||||
tgMsgText: tgMsgText.value,
|
||||
tgMsgTo: tgMsgTo.value
|
||||
}
|
||||
editSetting(form)
|
||||
|
||||
Reference in New Issue
Block a user