mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-11-16 17:07:36 +00:00
feat: Display node IP addresses #84
This commit is contained in:
parent
f6b048b017
commit
7553ad8b45
4 changed files with 14 additions and 5 deletions
1
frontend/src/app.d.ts
vendored
1
frontend/src/app.d.ts
vendored
|
@ -21,6 +21,7 @@ declare global {
|
||||||
is_tor: boolean;
|
is_tor: boolean;
|
||||||
is_available: boolean;
|
is_available: boolean;
|
||||||
nettype: string;
|
nettype: string;
|
||||||
|
ip_addresses: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ApiResponse {
|
interface ApiResponse {
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
export let hostname;
|
export let hostname;
|
||||||
export let port;
|
export let port;
|
||||||
export let ipv6_only;
|
export let ipv6_only;
|
||||||
|
/** @type {string} */
|
||||||
|
export let ip_addresses;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} onionAddr
|
* @param {string} onionAddr
|
||||||
|
@ -35,7 +37,7 @@
|
||||||
|
|
||||||
{#if is_tor}
|
{#if is_tor}
|
||||||
<button
|
<button
|
||||||
class="max-w-32 truncate text-orange-800 dark:text-orange-300"
|
class="max-w-40 truncate text-orange-800 dark:text-orange-300"
|
||||||
on:click={() => modalAlert(hostname, port)}
|
on:click={() => modalAlert(hostname, port)}
|
||||||
>
|
>
|
||||||
👁 {hostname}
|
👁 {hostname}
|
||||||
|
@ -43,7 +45,12 @@
|
||||||
<span class="text-gray-700 dark:text-gray-400">(TOR)</span>
|
<span class="text-gray-700 dark:text-gray-400">(TOR)</span>
|
||||||
{:else}
|
{:else}
|
||||||
{formatHostname(hostname)}:<span class="text-indigo-800 dark:text-indigo-400">{port}</span><br />
|
{formatHostname(hostname)}:<span class="text-indigo-800 dark:text-indigo-400">{port}</span><br />
|
||||||
{#if ipv6_only}
|
<div class="max-w-40 text-ellipsis overflow-x-auto md:overflow-hidden hover:overflow-visible">
|
||||||
<span class="text-rose-800 dark:text-rose-400">(IPv6 only)</span>
|
<span class="whitespace-break-spaces text-gray-700 dark:text-gray-400"
|
||||||
{/if}
|
>{ip_addresses.replace(/,/g, ', ')}</span
|
||||||
|
>
|
||||||
|
{#if ipv6_only}
|
||||||
|
<span class="text-rose-800 dark:text-rose-400">(IPv6 only)</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
><HostPortCell
|
><HostPortCell
|
||||||
|
ip_addresses={row.ip_addresses}
|
||||||
is_tor={row.is_tor}
|
is_tor={row.is_tor}
|
||||||
hostname={row.hostname}
|
hostname={row.hostname}
|
||||||
port={row.port}
|
port={row.port}
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-bold">Public IP</td>
|
<td class="font-bold">Public IP</td>
|
||||||
<td>{nodeInfo?.ip}</td>
|
<td>{nodeInfo?.ip_addresses}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-bold">Net Type</td>
|
<td class="font-bold">Net Type</td>
|
||||||
|
|
Loading…
Reference in a new issue