<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-back-button defaultHref="embassy"></ion-back-button>
    </ion-buttons>
    <ion-title>About</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>

  <ion-item-divider>Basic</ion-item-divider>

  <ion-item-group *ngIf="patch.data['server-info'] as server">
    <ion-item>
      <ion-label>
        <h2>EmbassyOS Version</h2>
        <p>{{ server.version | displayEmver }}</p>
      </ion-label>
    </ion-item>

    <ion-item>
      <ion-label>
        <h2>Git Hash</h2>
        <p>{{ config.gitHash }}</p>
      </ion-label>
    </ion-item>

    <ion-item-divider>Addresses</ion-item-divider>

    <ion-item>
      <ion-label class="break-all">
        <h2>Tor Address</h2>
        <p>{{ server['tor-address'] }}</p>
      </ion-label>
      <ion-button slot="end" fill="clear" (click)="copy(server['tor-address'])">
        <ion-icon slot="icon-only" name="copy-outline"></ion-icon>
      </ion-button>
    </ion-item>
    <ion-item>
      <ion-label class="break-all">
        <h2>LAN Address</h2>
        <p>{{ server['lan-address'] }}</p>
      </ion-label>
      <ion-button slot="end" fill="clear" (click)="copy(server['lan-address'])">
        <ion-icon slot="icon-only" name="copy-outline"></ion-icon>
      </ion-button>
    </ion-item>
  </ion-item-group>

</ion-content>