Mark Self

main
Gerard Braad 2023-06-23 12:00:41 +08:00
parent 7df29cbce3
commit f853605898
2 changed files with 12 additions and 8 deletions

View File

@ -35,7 +35,7 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
render() { render() {
function isNotSharee(peer:TailscalePeer): peer is TailscalePeer { function isNotSharee(peer: TailscalePeer): peer is TailscalePeer {
return peer.DNSName !== ""; // ShareeNode doesn't work? return peer.DNSName !== ""; // ShareeNode doesn't work?
} }
@ -61,6 +61,7 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
</Tr> </Tr>
</Thead> </Thead>
<Tbody> <Tbody>
{ this.state.Status.Self.Self = true }
<Peer {...this.state.Status.Self} /> <Peer {...this.state.Status.Self} />
{ {
Object.values(this.state.Status.Peer) Object.values(this.state.Status.Peer)
@ -107,13 +108,15 @@ class Peer extends React.Component<TailscalePeer> {
tags tags
} }
</Td> </Td>
<Td>{this.props.Active <Td>{this.props.Self
? this.props.CurAddr != "" ? "Self"
? "Direct" : this.props.Active
: "Relay: " + this.props.Relay ? this.props.CurAddr != ""
: this.props.Online ? "Direct"
? "Idle" : "Relay: " + this.props.Relay
: "-" : this.props.Online
? "Idle"
: "-"
}</Td> }</Td>
<Td>{this.props.ExitNode <Td>{this.props.ExitNode
? "Current" ? "Current"

View File

@ -18,6 +18,7 @@ export enum OS {
} }
export type TailscalePeer = { export type TailscalePeer = {
Self: boolean;
ID: string; ID: string;
PublicKey: string; PublicKey: string;
HostName: string; HostName: string;