【调整】初始化阶段周期选择时间,随机值

This commit is contained in:
chudong
2025-05-15 17:45:50 +08:00
parent f368948055
commit ee9b49b757
95 changed files with 360 additions and 155 deletions

View File

@@ -9109,5 +9109,90 @@
"arDZ": "الرجاء إدخال اسم الموقع"
},
"timestamp": "2025-05-15T08:02:55.496Z"
},
"雷池WAF站点": {
"text": "雷池WAF站点",
"key": "t_0_1747298114839",
"translations": {
"zhCN": "雷池WAF站点",
"zhTW": "雷池WAF站點",
"enUS": "Leichi WAF Site",
"jaJP": "雷池WAFサイト",
"koKR": "레이치 WAF 사이트",
"ruRU": "Сайт Leichi WAF",
"ptBR": "Site Leichi WAF",
"frFR": "Site Leichi WAF",
"esAR": "Sitio Leichi WAF",
"arDZ": "موقع Leichi WAF"
},
"timestamp": "2025-05-15T08:35:14.839Z"
},
"雷池WAF": {
"text": "雷池WAF",
"key": "t_1_1747298114192",
"translations": {
"zhCN": "雷池WAF",
"zhTW": "雷池WAF",
"enUS": "Leichi WAF",
"jaJP": "雷池WAF",
"koKR": "레이치 WAF",
"ruRU": "Лэйчи WAF",
"ptBR": "Leichi WAF",
"frFR": "Leichi WAF",
"esAR": "Leichi WAF",
"arDZ": "ليتشي WAF"
},
"timestamp": "2025-05-15T08:35:14.841Z"
},
"雷池WAF-URL地址格式错误": {
"text": "雷池WAF-URL地址格式错误",
"key": "t_0_1747300383756",
"translations": {
"zhCN": "雷池WAF-URL地址格式错误",
"zhTW": "雷池WAF-URL地址格式錯誤",
"enUS": "Leichi WAF - URL format error",
"jaJP": "雷池WAF - URL形式エラー",
"koKR": "레츠 WAF - URL 형식 오류",
"ruRU": "Leichi WAF - ошибка формата URL",
"ptBR": "Leichi WAF - erro de formato de URL",
"frFR": "Leichi WAF - erreur de format d'URL",
"esAR": "Leichi WAF - error de formato de URL",
"arDZ": "ليتشي WAF - خطأ في تنسيق عنوان URL"
},
"timestamp": "2025-05-15T09:13:05.223Z"
},
"请输入正确的宝塔WAF-API密钥": {
"text": "请输入正确的宝塔WAF-API密钥",
"key": "t_1_1747300384579",
"translations": {
"zhCN": "请输入正确的宝塔WAF-API密钥",
"zhTW": "請輸入正確的寶塔WAF-API密鑰",
"enUS": "Please enter the correct BT-WAF API key",
"jaJP": "正しいBT-WAF APIキーを入力してください",
"koKR": "올바른 BT-WAF API 키를 입력하십시오",
"ruRU": "Пожалуйста, введите правильный API-ключ BT-WAF",
"ptBR": "Por favor, insira a chave de API correta do BT-WAF",
"frFR": "Veuillez entrer la clé API correcte de BT-WAF",
"esAR": "Por favor, ingrese la clave API correcta de BT-WAF",
"arDZ": "الرجاء إدخال مفتاح BT-WAF الصحيح API"
},
"timestamp": "2025-05-15T09:13:05.223Z"
},
"请输入正确的雷池WAF-API密钥": {
"text": "请输入正确的雷池WAF-API密钥",
"key": "t_2_1747300385222",
"translations": {
"zhCN": "请输入正确的雷池WAF-API密钥",
"zhTW": "請輸入正確的雷池WAF-API密鑰",
"enUS": "Please enter the correct Leichi WAF-API key",
"jaJP": "正しい雷池WAF-APIキーを入力してください",
"koKR": "올바른 레이치 WAF-API 키를 입력하세요",
"ruRU": "Пожалуйста, введите правильный ключ Leichi WAF-API",
"ptBR": "Por favor, insira a chave correta do Leichi WAF-API",
"frFR": "Veuillez saisir la clé correcte de Leichi WAF-API",
"esAR": "Por favor, ingrese la clave correcta de Leichi WAF-API",
"arDZ": "الرجاء إدخال مفتاح Leichi WAF-API الصحيح"
},
"timestamp": "2025-05-15T09:13:05.223Z"
}
}

View File

@@ -126,7 +126,7 @@ export default defineComponent({
// 错误处理
const { handleError } = useError()
// 获取DNS提供商
const { fetchDnsProvider, dnsProvider } = useStore()
const { fetchDnsProvider, resetDnsProvider, dnsProvider } = useStore()
// 表单的值
const param = ref<DnsProviderOption>({
label: '',
@@ -258,7 +258,6 @@ export default defineComponent({
watch(
() => props.value,
() => {
// loadDnsProviders(props.type)
handleUpdateValue(props.value)
},
{ immediate: true },
@@ -268,6 +267,10 @@ export default defineComponent({
loadDnsProviders(props.type)
})
onUnmounted(() => {
resetDnsProvider()
})
return () => (
<NSpin show={isLoading.value}>
<NGrid cols={24} class={props.customClass}>

View File

@@ -77,8 +77,8 @@ export default defineComponent({
{ label: $t('t_15_1745735768976'), value: 'tencentcloud-cos', category: 'tencentcloud', icon: 'tencentcloud' },
{ label: $t('t_16_1745735766712'), value: 'aliyun-cdn', category: 'aliyun', icon: 'aliyun' },
{ label: $t('t_2_1746697487164'), value: 'aliyun-oss', category: 'aliyun', icon: 'aliyun' },
{ label: $t('雷池WAF站点'), value: 'safeline-site', category: 'safeline', icon: 'safeline' },
{ label: $t('雷池WAF'), value: 'safeline-panel', category: 'safeline', icon: 'safeline' },
{ label: $t('t_0_1747298114839'), value: 'safeline-site', category: 'safeline', icon: 'safeline' },
{ label: $t('t_1_1747298114192'), value: 'safeline-panel', category: 'safeline', icon: 'safeline' },
]
const certOptions = ref<{ label: string; value: string }[]>([]) // 证书选项
const current = ref(1) // 当前步骤
@@ -358,7 +358,7 @@ export default defineComponent({
<NTabPane name="1panel" tab={$t('t_9_1747271284765')} />
<NTabPane name="tencentcloud" tab={$t('t_3_1747019616129')} />
<NTabPane name="aliyun" tab={$t('t_2_1747019616224')} />
<NTabPane name="safeline" tab={$t('雷池WAF')} />
<NTabPane name="safeline" tab={$t('t_1_1747298114192')} />
</NTabs>
</div>
<div class={styles.rightPanel}>

View File

@@ -161,7 +161,19 @@ export default defineComponent({
// 更新参数的函数
const updateParamValue = (updates: StartNodeConfig) => {
param.value = { ...updates }
let newParams = { ...updates }
if (newParams.exec_type === 'manual') {
// 小时随机 1-6
const randomHour = Math.floor(Math.random() * 6) + 1
// 分钟每5分钟随机0-55
const randomMinute = Math.floor(Math.random() * 12) * 5
newParams = {
...newParams,
hour: randomHour,
minute: randomMinute,
}
param.value = newParams
}
}
// 监听执行类型变化

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "اسم الموقع",
"t_1_1747296175494": "الرجاء إدخال اسم الموقع",
"t_0_1744098811152": "تحذير: لقد دخلتم منطقة غير معروفة، الصفحة التي تحاول زيارتها غير موجودة، يرجى الضغط على الزر للعودة إلى الصفحة الرئيسية.",
"t_1_1744098801860": "رجوع إلى الصفحة الرئيسية",
"t_2_1744098804908": "نصيحة أمنية: إذا كنت تعتقد أن هذا خطأ، يرجى الاتصال بالمدير على الفور",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "تخطي",
"t_12_1747280809893": "لا تتخطى",
"t_13_1747280810369": "إعادة النشر",
"t_14_1747280811231": "بحث نوع النشر"
"t_14_1747280811231": "بحث نوع النشر",
"t_0_1747296173751": "اسم الموقع",
"t_1_1747296175494": "الرجاء إدخال اسم الموقع",
"t_0_1747298114839": "موقع Leichi WAF",
"t_1_1747298114192": "ليتشي WAF",
"t_0_1747300383756": "ليتشي WAF - خطأ في تنسيق عنوان URL",
"t_1_1747300384579": "الرجاء إدخال مفتاح BT-WAF الصحيح API",
"t_2_1747300385222": "الرجاء إدخال مفتاح Leichi WAF-API الصحيح"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "Website name",
"t_1_1747296175494": "Please enter the website name",
"t_0_1744098811152": "Warning: You have entered an unknown area, the page you are visiting does not exist, please click the button to return to the homepage.",
"t_1_1744098801860": "Return Home",
"t_2_1744098804908": "Safety Tip: If you think this is an error, please contact the administrator immediately",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "Skip",
"t_12_1747280809893": "Do not skip",
"t_13_1747280810369": "Re-deployment",
"t_14_1747280811231": "Search deployment type"
"t_14_1747280811231": "Search deployment type",
"t_0_1747296173751": "Website name",
"t_1_1747296175494": "Please enter the website name",
"t_0_1747298114839": "Leichi WAF Site",
"t_1_1747298114192": "Leichi WAF",
"t_0_1747300383756": "Leichi WAF - URL format error",
"t_1_1747300384579": "Please enter the correct BT-WAF API key",
"t_2_1747300385222": "Please enter the correct Leichi WAF-API key"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "Nombre del sitio",
"t_1_1747296175494": "Por favor ingrese el nombre del sitio web",
"t_0_1744098811152": "Advertencia: Ha ingresado a una zona desconocida, la página que intenta visitar no existe, por favor, haga clic en el botón para regresar a la página de inicio.",
"t_1_1744098801860": "Volver al inicio",
"t_2_1744098804908": "Consejo de seguridad: Si piensa que es un error, póngase en contacto con el administrador inmediatamente",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "Saltar",
"t_12_1747280809893": "No omitir",
"t_13_1747280810369": "Redespliegue",
"t_14_1747280811231": "Buscar tipo de implementación"
"t_14_1747280811231": "Buscar tipo de implementación",
"t_0_1747296173751": "Nombre del sitio",
"t_1_1747296175494": "Por favor ingrese el nombre del sitio web",
"t_0_1747298114839": "Sitio Leichi WAF",
"t_1_1747298114192": "Leichi WAF",
"t_0_1747300383756": "Leichi WAF - error de formato de URL",
"t_1_1747300384579": "Por favor, ingrese la clave API correcta de BT-WAF",
"t_2_1747300385222": "Por favor, ingrese la clave correcta de Leichi WAF-API"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "Nom du site",
"t_1_1747296175494": "Veuillez entrer le nom du site Web",
"t_0_1744098811152": "Avertissement : Vous avez entré dans une zone inconnue, la page que vous visitez n'existe pas, veuillez cliquer sur le bouton pour revenir à la page d'accueil.",
"t_1_1744098801860": "Retour à l'accueil",
"t_2_1744098804908": "Avis de sécurité : Si vous pensez que c'est une erreur, veuillez contacter l'administrateur immédiatement",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "Passer",
"t_12_1747280809893": "Ne pas sauter",
"t_13_1747280810369": "Redéploiement",
"t_14_1747280811231": "Rechercher le type de déploiement"
"t_14_1747280811231": "Rechercher le type de déploiement",
"t_0_1747296173751": "Nom du site",
"t_1_1747296175494": "Veuillez entrer le nom du site Web",
"t_0_1747298114839": "Site Leichi WAF",
"t_1_1747298114192": "Leichi WAF",
"t_0_1747300383756": "Leichi WAF - erreur de format d'URL",
"t_1_1747300384579": "Veuillez entrer la clé API correcte de BT-WAF",
"t_2_1747300385222": "Veuillez saisir la clé correcte de Leichi WAF-API"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "ウェブサイト名",
"t_1_1747296175494": "ウェブサイト名を入力してください",
"t_0_1744098811152": "警告:未知のエリアに進入しました。アクセスしようとしたページは存在しません。ボタンをクリックしてホームページに戻ってください。",
"t_1_1744098801860": "ホームに戻る",
"t_2_1744098804908": "安全注意:これが誤りだと思われる場合は、すぐに管理者に連絡してください",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "スキップ",
"t_12_1747280809893": "スキップしない",
"t_13_1747280810369": "再展開",
"t_14_1747280811231": "展開タイプを検索"
"t_14_1747280811231": "展開タイプを検索",
"t_0_1747296173751": "ウェブサイト名",
"t_1_1747296175494": "ウェブサイト名を入力してください",
"t_0_1747298114839": "雷池WAFサイト",
"t_1_1747298114192": "雷池WAF",
"t_0_1747300383756": "雷池WAF - URL形式エラー",
"t_1_1747300384579": "正しいBT-WAF APIキーを入力してください",
"t_2_1747300385222": "正しい雷池WAF-APIキーを入力してください"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "웹사이트 이름",
"t_1_1747296175494": "웹사이트 이름을 입력하세요",
"t_0_1744098811152": "경고: 알 수 없는 영역에 진입했습니다. 방문하려는 페이지가 존재하지 않습니다. 버튼을 클릭하여 홈페이지로 돌아가세요。",
"t_1_1744098801860": "홈으로 돌아가기",
"t_2_1744098804908": "안전 유의사항: 이가 오류라면 즉시 관리자에게 연락하십시오",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "건너뛰기",
"t_12_1747280809893": "건너뛰지 않음",
"t_13_1747280810369": "재배치",
"t_14_1747280811231": "배포 유형 검색"
"t_14_1747280811231": "배포 유형 검색",
"t_0_1747296173751": "웹사이트 이름",
"t_1_1747296175494": "웹사이트 이름을 입력하세요",
"t_0_1747298114839": "레이치 WAF 사이트",
"t_1_1747298114192": "레이치 WAF",
"t_0_1747300383756": "레츠 WAF - URL 형식 오류",
"t_1_1747300384579": "올바른 BT-WAF API 키를 입력하십시오",
"t_2_1747300385222": "올바른 레이치 WAF-API 키를 입력하세요"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "Nome do site",
"t_1_1747296175494": "Por favor, insira o nome do site",
"t_0_1744098811152": "Aviso: Você entrou em uma área desconhecida, a página que você está visitando não existe, por favor, clique no botão para voltar para a página inicial.",
"t_1_1744098801860": "Voltar para a homepage",
"t_2_1744098804908": "Dica de Segurança: Se você acha que isso é um erro, entre em contato com o administrador imediatamente",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "Pular",
"t_12_1747280809893": "Não pular",
"t_13_1747280810369": "Reimplantação",
"t_14_1747280811231": "Pesquisar tipo de implantação"
"t_14_1747280811231": "Pesquisar tipo de implantação",
"t_0_1747296173751": "Nome do site",
"t_1_1747296175494": "Por favor, insira o nome do site",
"t_0_1747298114839": "Site Leichi WAF",
"t_1_1747298114192": "Leichi WAF",
"t_0_1747300383756": "Leichi WAF - erro de formato de URL",
"t_1_1747300384579": "Por favor, insira a chave de API correta do BT-WAF",
"t_2_1747300385222": "Por favor, insira a chave correta do Leichi WAF-API"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "Название сайта",
"t_1_1747296175494": "Пожалуйста, введите название сайта",
"t_0_1744098811152": "Предупреждение: Вы вошли в неизвестную зону, посещаемая страница не существует, пожалуйста, нажмите кнопку, чтобы вернуться на главную страницу.",
"t_1_1744098801860": "Вернуться на главную",
"t_2_1744098804908": "Совет по безопасности: Если вы считаете, что это ошибка, немедленно свяжитесь с администратором",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "Пропустить",
"t_12_1747280809893": "Не пропускать",
"t_13_1747280810369": "Повторное развертывание",
"t_14_1747280811231": "Поиск типа развертывания"
"t_14_1747280811231": "Поиск типа развертывания",
"t_0_1747296173751": "Название сайта",
"t_1_1747296175494": "Пожалуйста, введите название сайта",
"t_0_1747298114839": "Сайт Leichi WAF",
"t_1_1747298114192": "Лэйчи WAF",
"t_0_1747300383756": "Leichi WAF - ошибка формата URL",
"t_1_1747300384579": "Пожалуйста, введите правильный API-ключ BT-WAF",
"t_2_1747300385222": "Пожалуйста, введите правильный ключ Leichi WAF-API"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "网站名",
"t_1_1747296175494": "请输入网址名",
"t_0_1744098811152": "警告:您已进入未知区域,所访问的页面不存在,请点击按钮返回首页。",
"t_1_1744098801860": "返回首页",
"t_2_1744098804908": "安全提示:如果您认为这是个错误,请立即联系管理员",
@@ -534,5 +532,12 @@
"t_11_1747280809178": "跳过",
"t_12_1747280809893": "不跳过",
"t_13_1747280810369": "重新部署",
"t_14_1747280811231": "搜索部署类型"
"t_14_1747280811231": "搜索部署类型",
"t_0_1747296173751": "网站名",
"t_1_1747296175494": "请输入网址名",
"t_0_1747298114839": "雷池WAF站点",
"t_1_1747298114192": "雷池WAF",
"t_0_1747300383756": "雷池WAF-URL地址格式错误",
"t_1_1747300384579": "请输入正确的宝塔WAF-API密钥",
"t_2_1747300385222": "请输入正确的雷池WAF-API密钥"
}

View File

@@ -1,6 +1,4 @@
{
"t_0_1747296173751": "網站名",
"t_1_1747296175494": "請輸入網址名",
"t_0_1744098811152": "警告:您已進入未知區域,所訪問的頁面不存在,請點擊按鈕返回首頁。",
"t_1_1744098801860": "返回首頁",
"t_2_1744098804908": "安全提示:如果您認為這是個錯誤,請立即聯繫管理員",
@@ -533,5 +531,12 @@
"t_11_1747280809178": "跳過",
"t_12_1747280809893": "不跳過",
"t_13_1747280810369": "重新部署",
"t_14_1747280811231": "搜尋部署類型"
"t_14_1747280811231": "搜尋部署類型",
"t_0_1747296173751": "網站名",
"t_1_1747296175494": "請輸入網址名",
"t_0_1747298114839": "雷池WAF站點",
"t_1_1747298114192": "雷池WAF",
"t_0_1747300383756": "雷池WAF-URL地址格式錯誤",
"t_1_1747300384579": "請輸入正確的寶塔WAF-API密鑰",
"t_2_1747300385222": "請輸入正確的雷池WAF-API密鑰"
}

View File

@@ -8,6 +8,7 @@ import {
NFormItemGi,
NGrid,
NInput,
NInputNumber,
NSelect,
NSpace,
NTag,
@@ -29,7 +30,18 @@ import { isEmail, isIp, isPort, isUrl } from '@baota/utils/business'
import { $t } from '@locales/index'
import { useStore } from './useStore'
import type { AccessItem, AccessListParams, AddAccessParams, SshAccessConfig, UpdateAccessParams } from '@/types/access'
import type {
AccessItem,
AccessListParams,
AddAccessParams,
AliyunAccessConfig,
CloudflareAccessConfig,
HuaWeiCloudAccessConfig,
PanelAccessConfig,
SshAccessConfig,
TencentCloudAccessConfig,
UpdateAccessParams,
} from '@/types/access'
import type { FormConfig } from '@baota/naive-ui/types/form'
import ApiManageForm from './components/apiManageForm'
@@ -284,6 +296,7 @@ export const useApiFormController = (props: { data: AccessItem }) => {
const mapTips = {
btpanel: $t('t_2_1745317314362'),
btwaf: $t('t_0_1747271295174'),
safeline: $t('t_0_1747300383756'),
}
return callback(new Error(mapTips[param.value.type as keyof typeof mapTips]))
}
@@ -297,7 +310,8 @@ export const useApiFormController = (props: { data: AccessItem }) => {
const mapTips = {
cloudflare: $t('t_0_1747042966820'),
btpanel: $t('t_1_1747042969705'),
btwaf: $t('t_1_1747271295484'),
btwaf: $t('t_1_1747300384579'),
safeline: $t('t_2_1747300385222'),
}
return callback(new Error(mapTips[param.value.type as keyof typeof mapTips]))
}
@@ -408,10 +422,13 @@ export const useApiFormController = (props: { data: AccessItem }) => {
return (
<NGrid cols={24} xGap={4}>
<NFormItemGi label={$t('t_1_1745833931535')} span={16} path="config.host">
<NInput v-model:value={(param.value.config as SshAccessConfig).host} />
<NInput
v-model:value={(param.value.config as SshAccessConfig).host}
onInput={(val: string) => ((param.value.config as SshAccessConfig).host = val.trim())}
/>
</NFormItemGi>
<NFormItemGi label={$t('t_2_1745833931404')} span={8} path="config.port">
<NInput v-model:value={(param.value.config as SshAccessConfig).port} />
<NInputNumber v-model:value={(param.value.config as SshAccessConfig).port} showButton={false} />
</NFormItemGi>
</NGrid>
)
@@ -434,8 +451,12 @@ export const useApiFormController = (props: { data: AccessItem }) => {
case 'btwaf':
case 'safeline':
items.push(
useFormInput(typeUrlMap.get(param.value.type) || '', 'config.url'),
useFormInput($t('t_55_1745289355715'), 'config.api_key'),
useFormInput(typeUrlMap.get(param.value.type) || '', 'config.url', {
onInput: (val: string) => ((param.value.config as PanelAccessConfig).url = val.trim()),
}),
useFormInput($t('t_55_1745289355715'), 'config.api_key', {
onInput: (val: string) => ((param.value.config as PanelAccessConfig).api_key = val.trim()),
}),
useFormSwitch(
$t('t_3_1746667592270'),
'config.ignore_ssl',
@@ -449,19 +470,44 @@ export const useApiFormController = (props: { data: AccessItem }) => {
break
case 'aliyun':
items.push(
useFormInput('AccessKeyId', 'config.access_key'),
useFormInput('AccessKeySecret', 'config.access_secret'),
useFormInput('AccessKeyId', 'config.access_key_id', {
onInput: (val: string) => ((param.value.config as AliyunAccessConfig).access_key_id = val.trim()),
}),
useFormInput('AccessKeySecret', 'config.access_key_secret', {
onInput: (val: string) => ((param.value.config as AliyunAccessConfig).access_key_secret = val.trim()),
}),
)
break
case 'tencentcloud':
items.push(useFormInput('SecretId', 'config.secret_id'), useFormInput('SecretKey', 'config.secret_key'))
items.push(
useFormInput('SecretId', 'config.secret_id', {
onInput: (val: string) => ((param.value.config as TencentCloudAccessConfig).secret_id = val.trim()),
}),
useFormInput('SecretKey', 'config.secret_key', {
onInput: (val: string) => ((param.value.config as TencentCloudAccessConfig).secret_key = val.trim()),
}),
)
break
case 'huaweicloud':
case 'baidu':
items.push(useFormInput('AccessKey', 'config.access_key'), useFormInput('SecretKey', 'config.secret_key'))
items.push(
useFormInput('AccessKey', 'config.access_key', {
onInput: (val: string) => ((param.value.config as HuaWeiCloudAccessConfig).access_key = val.trim()),
}),
useFormInput('SecretKey', 'config.secret_key', {
onInput: (val: string) => ((param.value.config as HuaWeiCloudAccessConfig).secret_key = val.trim()),
}),
)
break
case 'cloudflare':
items.push(useFormInput('邮箱', 'config.email'), useFormInput('APIKey', 'config.api_key'))
items.push(
useFormInput('邮箱', 'config.email', {
onInput: (val: string) => ((param.value.config as CloudflareAccessConfig).email = val.trim()),
}),
useFormInput('APIKey', 'config.api_key', {
onInput: (val: string) => ((param.value.config as CloudflareAccessConfig).api_key = val.trim()),
}),
)
break
default:
break

View File

@@ -190,10 +190,18 @@ export const useLayoutStore = defineStore('layout-store', () => {
type: item.type,
})) || []
} catch (error) {
dnsProvider.value = []
handleError(error)
}
}
/**
* @description 重置DNS提供商
*/
const resetDnsProvider = (): void => {
dnsProvider.value = []
}
// ==============================
// 表单处理方法
// ==============================
@@ -218,6 +226,7 @@ export const useLayoutStore = defineStore('layout-store', () => {
handleExpand,
fetchNotifyProvider,
fetchDnsProvider,
resetDnsProvider,
}
})