mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-08-28 19:48:01 +08:00
feat: telegram mini app open mail from bot (#256)
This commit is contained in:
@@ -22,6 +22,7 @@ const { t } = useI18n({
|
||||
enable: 'Enable',
|
||||
telegramAllowList: 'Telegram Allow List',
|
||||
save: 'Save',
|
||||
miniAppUrl: 'Telegram Mini App URL',
|
||||
},
|
||||
zh: {
|
||||
init: '初始化',
|
||||
@@ -31,6 +32,7 @@ const { t } = useI18n({
|
||||
enable: '启用',
|
||||
telegramAllowList: 'Telegram 白名单',
|
||||
save: '保存',
|
||||
miniAppUrl: '电报小程序 URL(请输入你部署的电报小程序网页地址)',
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -63,14 +65,16 @@ const init = async () => {
|
||||
class TelegramSettings {
|
||||
enableAllowList: boolean;
|
||||
allowList: string[];
|
||||
miniAppUrl: string;
|
||||
|
||||
constructor(enableAllowList: boolean, allowList: string[]) {
|
||||
constructor(enableAllowList: boolean, allowList: string[], miniAppUrl: string) {
|
||||
this.enableAllowList = enableAllowList;
|
||||
this.allowList = allowList;
|
||||
this.miniAppUrl = miniAppUrl;
|
||||
}
|
||||
}
|
||||
|
||||
const settings = ref(new TelegramSettings(false, []))
|
||||
const settings = ref(new TelegramSettings(false, [], ''))
|
||||
|
||||
const getSettings = async () => {
|
||||
try {
|
||||
@@ -111,6 +115,9 @@ onMounted(async () => {
|
||||
:placeholder="t('telegramAllowList')" />
|
||||
</n-input-group>
|
||||
</n-form-item-row>
|
||||
<n-form-item-row :label="t('miniAppUrl')">
|
||||
<n-input v-model:value="settings.miniAppUrl"></n-input>
|
||||
</n-form-item-row>
|
||||
<n-button @click="saveSettings" type="primary" block>
|
||||
{{ t('save') }}
|
||||
</n-button>
|
||||
|
||||
Reference in New Issue
Block a user