Make MailDomainStatus expected value flexible and add copy button

This commit is contained in:
Elias Hackradt
2026-02-25 18:19:39 +01:00
committed by Johannes Zellner
parent a900beb3fd
commit d4b581c007
2 changed files with 21 additions and 6 deletions
+16 -6
View File
@@ -1,7 +1,7 @@
<script setup>
import { ref, onMounted } from 'vue';
import { Button } from '@cloudron/pankow';
import { Button, ClipboardAction } from '@cloudron/pankow';
import Section from './Section.vue';
import MailModel from '../models/MailModel.js';
@@ -103,11 +103,11 @@ onMounted(async () => {
<div v-if="key === 'mx' && domain.provider === 'namecheap'">{{ $t('email.dnsStatus.namecheapInfo') }} <sup><a href="https://docs.cloudron.io/domains/#namecheap-dns" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></div>
<div v-if="key === 'ptr4' || key === 'ptr6'">{{ $t('email.dnsStatus.ptrInfo') }} <sup><a href="https://docs.cloudron.io/email/#ptr-record" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></div>
<div v-if="domainStatus[key].status === 'skipped'">{{ domainStatus[key].message }}</div>
<div v-else>
<table class="domain-status">
<div v-else style="overflow: hidden;">
<table class="domain-status" style="width: 100%; table-layout: fixed;">
<tbody>
<tr>
<td>{{ $t('email.dnsStatus.hostname') }}:</td>
<td style="width: 160px">{{ $t('email.dnsStatus.hostname') }}:</td>
<td>{{ domainStatus[key].name }}</td>
</tr>
<tr>
@@ -120,11 +120,16 @@ onMounted(async () => {
</tr>
<tr>
<td>{{ $t('email.dnsStatus.expected') }}:</td>
<td>{{ domainStatus[key].expected }}</td>
<td style="display: flex; gap: 6px">
<div style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ domainStatus[key].expected }}</div>
<ClipboardAction :value="domainStatus[key].expected"/>
</td>
</tr>
<tr>
<td>{{ $t('email.dnsStatus.current') }}:</td>
<td>{{ domainStatus[key].value ? domainStatus[key].value : ('['+$t('email.dnsStatus.recordNotSet')+']') }} {{ domainStatus[key].message }}</td>
<td>
<div style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ domainStatus[key].value ? domainStatus[key].value : ('['+$t('email.dnsStatus.recordNotSet')+']') }} {{ domainStatus[key].message }}</div>
</td>
</tr>
</tbody>
</table>
@@ -227,4 +232,9 @@ onMounted(async () => {
padding-right: 20px;
}
/* The overflow scroll is there, but I just can't scroll the text! WHY?! */
/* .domain-status > tbody > tr > td:nth-child(2) {
overflow: scroll;
} */
</style>