Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,20 @@ ring, while the selected control retains the blue card border. Contact-us cards
use a non-submitting button so they remain keyboard operable without becoming a
checkout selection. After a plan refresh, focus returns to the selected radio
only when the visitor has not moved it elsewhere during the request.

## Domain DNS lookup

DNS lookup without a configured integration is a normal read-only state, not a
warning. Use a neutral gray information strip with a secondary configuration
link; reserve warning/error styling for actual failures.

Show returned NS records in a separate nameserver summary, using escaped text
and hiding the entire summary when none are returned. Nameservers may help identify
the DNS host, but do not infer a provider name or imply an integration is enabled.

### Responsive behaviour

Keep the existing stacked widget layout on desktop and mobile. List nameservers
on separate lines and allow long hostnames to wrap without truncation. Hide the
summary during loading or lookup errors; preserve the existing record table and
provider-managed editing controls.
11 changes: 11 additions & 0 deletions assets/js/dns-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
results: {},
loading: true,
},
computed: {
nameservers() {
const records = (this.results.entries || []).concat(this.results.auth || []);
const nameservers = records
.filter((record) => record.type === 'NS' && typeof record.data === 'string')
.map((record) => record.data.replace(/\.$/, '').toLowerCase())
.filter((nameserver) => nameserver);

return [ ...new Set(nameservers) ].sort();
},
},
updated() {
this.$nextTick(function() {

Expand Down
13 changes: 10 additions & 3 deletions views/domain/admin-dns-management.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ class="wubox wu-text-red-600 hover:wu-text-red-800"

<?php else : ?>
<!-- No Provider Configured - Show Read-Only PHP DNS Lookup -->
<div class="wu-p-4 wu-bg-yellow-50 wu-border-b wu-border-solid wu-border-0 wu-border-yellow-200">
<span class="dashicons dashicons-warning wu-text-yellow-600 wu-mr-2"></span>
<div class="wu-p-4 wu-bg-gray-50 wu-border-b wu-border-solid wu-border-0 wu-border-gray-300">
<span class="dashicons dashicons-info wu-text-gray-600 wu-mr-2" aria-hidden="true"></span>
<span class="wu-text-sm wu-text-gray-700">
<?php esc_html_e('No DNS provider configured. Showing read-only DNS lookup results.', 'ultimate-multisite'); ?>
<?php esc_html_e('DNS lookup results are read-only. Manage DNS records with your DNS hosting provider.', 'ultimate-multisite'); ?>
</span>
<a href="<?php echo esc_url(wu_network_admin_url('wp-ultimo-settings', ['tab' => 'integrations'])); ?>" class="wu-ml-2 wu-text-blue-600">
<?php esc_html_e('Configure a provider', 'ultimate-multisite'); ?>
Expand All @@ -156,6 +156,13 @@ class="wubox wu-text-red-600 hover:wu-text-red-800"

<!-- Read-only DNS Table (PHP DNS Lookup) -->
<div id="wu-dns-table">
<div v-if="!loading && !error && nameservers.length" class="wu-p-4 wu-text-sm wu-text-gray-700 wu-border-b wu-border-solid wu-border-0 wu-border-gray-300" v-cloak>
<strong><?php esc_html_e('Nameservers', 'ultimate-multisite'); ?></strong>
<ul class="wu-m-0 wu-mt-2">
<li v-for="nameserver in nameservers" :key="nameserver" class="wu-font-mono" style="overflow-wrap: anywhere;">{{ nameserver }}</li>
</ul>
<p class="wu-m-0 wu-mt-2"><?php esc_html_e('These nameservers may help identify your DNS hosting provider.', 'ultimate-multisite'); ?></p>
</div>
<table class="wp-list-table widefat fixed striped wu-border-t-0" v-cloak>
<thead>
<tr>
Expand Down
Loading