From 74ab528176fa1145d8d6679f83e7d45b17afe732 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Thu, 22 Jun 2023 22:29:20 +0800 Subject: [PATCH] Show hostname, network and exitnode --- src/app.tsx | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index dc0387b..07c9336 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -33,11 +33,6 @@ export class Application extends React.Component @@ -47,6 +42,15 @@ export class Application extends React.Component Tailscale peers + + + + IP + Hostname + Network + Exit node + + { @@ -67,15 +71,27 @@ export class Application extends React.Component { render() { + + const name = this.props.DNSName.split('.'); + const hostName = name[0]; + const network = name[1] + '.' + 'ts.net'; + return ( - {this.props.Online + { this.props.Online ? : } - {this.props.TailscaleIPs[0]} - {this.props.HostName} + { this.props.TailscaleIPs[0] } + { hostName } + { network } + { this.props.ExitNode + ? "Current" + : this.props.ExitNodeOption + ? "Yes" + : "" + } ); } }