feat!: Added IPv6 only information to the table

The IP address information of the remote node is replaced with
information on whether the remote node only supports IPv6 or not.
This commit is contained in:
Christian Ditaputratama 2024-09-09 19:17:39 +07:00
parent c3f837e122
commit 61cc98e378
No known key found for this signature in database
GPG key ID: 31D3D06D77950979
2 changed files with 16 additions and 15 deletions

View file

@ -2,18 +2,19 @@
import { getModalStore } from '@skeletonlabs/skeleton';
const modalStore = getModalStore();
/** @type {string} */
export let ip;
/** @type {boolean} */
export let is_tor;
/** @type {string} */
export let hostname;
/** @type {number} */
export let port;
// if (is_tor) {
// hostname = hostname.substring(0, 8) + '[...].onion';
// }
/**
* @type {{
* is_tor: boolean,
* hostname: string,
* port: number,
* ipv6_only: boolean
* }}
*/
export let is_tor;
export let hostname;
export let port;
export let ipv6_only;
/**
* @param {string} onionAddr
@ -40,8 +41,8 @@
</button><br />.onion:<span class="text-indigo-800 dark:text-indigo-400">{port}</span>
<span class="text-gray-700 dark:text-gray-400">(TOR)</span>
{:else}
{hostname}:<span class="text-indigo-800 dark:text-indigo-400">{port}</span>
{#if ip !== ''}
<br /><span class="text-gray-700 dark:text-gray-400">{ip}</span>
{hostname}:<span class="text-indigo-800 dark:text-indigo-400">{port}</span><br />
{#if ipv6_only}
<span class="text-rose-800 dark:text-rose-400">(IPv6 only)</span>
{/if}
{/if}

View file

@ -211,10 +211,10 @@
<tr>
<td
><HostPortCell
ip={row.ip}
is_tor={row.is_tor}
hostname={row.hostname}
port={row.port}
ipv6_only={row.ipv6_only}
/>
<a class="anchor" href="/remote-nodes/logs/?node_id={row.id}">[Logs]</a>
</td>