Correctly calculate DNSBLZones

This commit is contained in:
Johannes Zellner
2025-06-13 22:21:17 +02:00
parent 3f6909866f
commit f3fc393617

View File

@@ -1,7 +1,7 @@
<script setup>
import { ref, onMounted, useTemplateRef } from 'vue';
import { ref, onMounted, useTemplateRef, computed } from 'vue';
import { Button, ProgressBar, InputDialog, Dialog, FormGroup, TextInput, InputGroup, Switch, SingleSelect } from 'pankow';
import { prettyDecimalSize } from 'pankow/utils';
import Section from '../components/Section.vue';
@@ -69,6 +69,10 @@ const dnsblZonesBusy = ref(false);
const dnsblZones = ref([]);
const dnsblZonesString = ref('');
const dnsblZonesCount = computed(() => {
return dnsblZones.value.filter(l => l.indexOf('#') !== 0).length;
});
function onShowAclDialog() {
dnsblZonesError.value = '';
dnsblZonesBusy.value = false;
@@ -335,7 +339,7 @@ onMounted(async () => {
<SettingsItem>
<FormGroup>
<label>{{ $t('emails.settings.acl') }}</label>
<div>{{ $t('emails.settings.aclOverview', { dnsblZonesCount: dnsblZones.length }) }}</div>
<div>{{ $t('emails.settings.aclOverview', { dnsblZonesCount }) }}</div>
</FormGroup>
<div style="display: flex; align-items: center">
<Button tool plain @click="onShowAclDialog()">{{ $t('main.dialog.edit') }}</Button>