aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/UserClientInfoSheet.swift
blob: 8fa4db891f4fe43cb56a14fc7194a84364e02630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import SwiftUI

struct UserClientInfoSheet: View {
  @Environment(\.dismiss) private var dismiss
  
  let info: HotlineUserClientInfo
  
  var body: some View {
    ScrollView(.vertical) {
      Text(self.info.details)
        .fontDesign(.monospaced)
        .textSelection(.enabled)
        .frame(maxWidth: .infinity, alignment: .topLeading)
        .padding()
    }
    .frame(width: 350, height: 400)
    .toolbar {
      ToolbarItem(placement: .confirmationAction) {
        Button("OK") {
          self.dismiss()
        }
      }
    }
  }
}