diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index fc3315e80..1877a5721 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -161,27 +161,3 @@ onMounted(() => { onCheck(); }); - - diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 9f8b8559c..08ec2d5c1 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1227,6 +1227,8 @@ const message = { 'This certificate has been associated with the following websites, and the renewal will be applied to these websites simultaneously', }, firewall: { + notSupport: + 'No system firewall detected (firewalld or ufw). Please refer to the official documentation for installation.', ccDeny: 'CC Protection', ipWhiteList: 'IP Whitelist', ipBlockList: 'IP Blacklist', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 93176dea6..1bd7ebf0d 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1220,6 +1220,7 @@ const message = { createAcme: '创建账户', }, firewall: { + notSupport: '未检测到系统防火墙(firewalld 或者 ufw),请参考官方文档进行安装', ccDeny: 'CC 防护', ipWhiteList: 'IP 白名单', ipBlockList: 'IP 黑名单', diff --git a/frontend/src/styles/common.scss b/frontend/src/styles/common.scss index 4437b7ed8..98f62fcf9 100644 --- a/frontend/src/styles/common.scss +++ b/frontend/src/styles/common.scss @@ -302,3 +302,25 @@ .table-link:hover { opacity: 0.6; } + +.app-warn { + text-align: center; + margin-top: 100px; + span:first-child { + color: #bbbfc4; + } + + span:nth-child(2) { + color: $primary-color; + cursor: pointer; + } + + span:nth-child(2):hover { + color: #74a4f3; + } + + img { + width: 300px; + height: 300px; + } +} \ No newline at end of file diff --git a/frontend/src/views/host/firewall/ip/index.vue b/frontend/src/views/host/firewall/ip/index.vue index 2c894c6a1..5979ad397 100644 --- a/frontend/src/views/host/firewall/ip/index.vue +++ b/frontend/src/views/host/firewall/ip/index.vue @@ -2,83 +2,109 @@
- - {{ $t('firewall.firewallNotStart') }} - +
+ + {{ $t('firewall.firewallNotStart') }} + - - - + +
@@ -102,6 +128,7 @@ const loading = ref(); const activeTag = ref('address'); const selects = ref([]); const searchName = ref(); +const fireName = ref(); const maskShow = ref(true); const fireStatus = ref('running'); @@ -153,6 +180,10 @@ const onOpenDialog = async ( dialogRef.value!.acceptParams(params); }; +const toDoc = () => { + window.open('https://1panel.cn/docs/user_manual/hosts/firewall/', '_blank'); +}; + const onChangeStatus = async (row: Host.RuleInfo, status: string) => { let operation = status === 'accept' @@ -244,7 +275,9 @@ const buttons = [ ]; onMounted(() => { - loading.value = true; - fireStatuRef.value.acceptParams(); + if (fireName.value !== '-') { + loading.value = true; + fireStatuRef.value.acceptParams(); + } }); diff --git a/frontend/src/views/host/firewall/port/index.vue b/frontend/src/views/host/firewall/port/index.vue index b5bae2a47..3060e4a16 100644 --- a/frontend/src/views/host/firewall/port/index.vue +++ b/frontend/src/views/host/firewall/port/index.vue @@ -3,6 +3,7 @@ +
+ + {{ $t('firewall.firewallNotStart') }} + - - {{ $t('firewall.firewallNotStart') }} - - - - + +
@@ -192,6 +218,9 @@ const onOpenDialog = async ( const quickJump = () => { router.push({ name: 'ContainerSetting' }); }; +const toDoc = () => { + window.open('https://1panel.cn/docs/user_manual/hosts/firewall/', '_blank'); +}; const onChangeStatus = async (row: Host.RuleInfo, status: string) => { let operation = @@ -300,7 +329,9 @@ const buttons = [ ]; onMounted(() => { - loading.value = true; - fireStatuRef.value.acceptParams(); + if (fireName.value !== '-') { + loading.value = true; + fireStatuRef.value.acceptParams(); + } }); diff --git a/frontend/src/views/host/firewall/status/index.vue b/frontend/src/views/host/firewall/status/index.vue index cd80aee19..8b24eb659 100644 --- a/frontend/src/views/host/firewall/status/index.vue +++ b/frontend/src/views/host/firewall/status/index.vue @@ -91,7 +91,7 @@ const onOperate = async (operation: string) => { loadBaseInfo(true); }) .catch(() => { - emit('update:loading', false); + loadBaseInfo(true); }); }) .catch(() => {