mirror of https://github.com/1Panel-dev/1Panel
parent
0872374fe4
commit
8301382770
|
@ -717,6 +717,7 @@ const message = {
|
||||||
cleanBuildCache: 'Clean Build Cache',
|
cleanBuildCache: 'Clean Build Cache',
|
||||||
delBuildCacheHelper:
|
delBuildCacheHelper:
|
||||||
'Cleaning the build cache will delete all cached artifacts generated during builds. This action cannot be undone. Continue?',
|
'Cleaning the build cache will delete all cached artifacts generated during builds. This action cannot be undone. Continue?',
|
||||||
|
urlWarning: 'The URL prefix does not need to include http:// or https://. Please modify.',
|
||||||
|
|
||||||
network: 'Network',
|
network: 'Network',
|
||||||
createNetwork: 'Create',
|
createNetwork: 'Create',
|
||||||
|
|
|
@ -694,6 +694,7 @@ const message = {
|
||||||
imageNameHelper: '鏡像名稱及 Tag,例:nginx:latest',
|
imageNameHelper: '鏡像名稱及 Tag,例:nginx:latest',
|
||||||
cleanBuildCache: '清理建置快取',
|
cleanBuildCache: '清理建置快取',
|
||||||
delBuildCacheHelper: '清理建置快取將刪除所有建置所產生的快取,此操作無法回復。是否繼續?',
|
delBuildCacheHelper: '清理建置快取將刪除所有建置所產生的快取,此操作無法回復。是否繼續?',
|
||||||
|
urlWarning: '路徑前綴不需要添加 http:// 或 https://,請修改',
|
||||||
|
|
||||||
network: '網絡',
|
network: '網絡',
|
||||||
createNetwork: '創建網絡',
|
createNetwork: '創建網絡',
|
||||||
|
|
|
@ -695,6 +695,7 @@ const message = {
|
||||||
imageNameHelper: '镜像名称及 Tag,例:nginx:latest',
|
imageNameHelper: '镜像名称及 Tag,例:nginx:latest',
|
||||||
cleanBuildCache: '清理构建缓存',
|
cleanBuildCache: '清理构建缓存',
|
||||||
delBuildCacheHelper: '清理构建缓存 将删除所有构建产生的缓存,该操作无法回滚,是否继续?',
|
delBuildCacheHelper: '清理构建缓存 将删除所有构建产生的缓存,该操作无法回滚,是否继续?',
|
||||||
|
urlWarning: '路径前缀不需要添加 http:// 或 https://, 请修改',
|
||||||
|
|
||||||
network: '网络',
|
network: '网络',
|
||||||
createNetwork: '创建网络',
|
createNetwork: '创建网络',
|
||||||
|
|
|
@ -117,7 +117,7 @@ const handleClose = () => {
|
||||||
};
|
};
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
name: [Rules.requiredInput, Rules.name],
|
name: [Rules.requiredInput, Rules.name],
|
||||||
downloadUrl: [Rules.illegal],
|
downloadUrl: [{ validator: validateDownloadUrl, trigger: 'blur' }, Rules.illegal],
|
||||||
protocol: [Rules.requiredSelect],
|
protocol: [Rules.requiredSelect],
|
||||||
username: [Rules.illegal],
|
username: [Rules.illegal],
|
||||||
password: [Rules.illegal],
|
password: [Rules.illegal],
|
||||||
|
@ -127,6 +127,17 @@ const rules = reactive({
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
type FormInstance = InstanceType<typeof ElForm>;
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
|
|
||||||
|
function validateDownloadUrl(rule: any, value: any, callback: any) {
|
||||||
|
if (value === '') {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
const pattern = /^https?/i;
|
||||||
|
if (pattern.test(value)) {
|
||||||
|
return callback(new Error(i18n.global.t('container.urlWarning')));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|
||||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.validate(async (valid) => {
|
formEl.validate(async (valid) => {
|
||||||
|
|
Loading…
Reference in New Issue