Compare commits

..

3 Commits

Author SHA1 Message Date
Christoph Hagen
9beb2e423e Improve key screen layout 2022-05-02 23:25:11 +02:00
Christoph Hagen
efc68ad803 Allow compensation of DST 2022-05-02 23:25:11 +02:00
Christoph Hagen
9444917186 Add banner resources
Update screenshot
2022-05-02 23:25:11 +02:00
4 changed files with 21 additions and 18 deletions

Binary file not shown.

View File

@ -29,10 +29,10 @@ struct HistoryListItem: View {
return startText
}
let diff = Int(rCounter) - Int(sentCounter)
guard diff != 1 else {
guard diff != 1 && diff != 0 else {
return startText
}
return startText + "\(rCounter)"
return startText + " (\(diff))"
}
var timeOffsetText: String {

View File

@ -9,8 +9,8 @@ struct KeyView: View {
var isCompensatingDaylightTime: Bool
var body: some View {
GeometryReader { geo in
VStack(alignment: .leading, spacing: 16) {
ScrollView {
VStack(alignment: .leading, spacing: 8) {
ForEach(KeyManagement.KeyType.allCases) { keyType in
SingleKeyView(
keyManager: $keyManager,
@ -21,6 +21,7 @@ struct KeyView: View {
}
Text("If the remote has daylight savings time wrongly set, then the time validation will fail. Use this option to send messages with adjusted timestamps. Warning: Incorrect use of this option will allow replay attacks.")
.font(.caption)
.foregroundColor(.secondary)
}.padding()
}
}

View File

@ -45,13 +45,15 @@ struct SingleKeyView: View {
keyManager.generate(type)
needRefresh.toggle()
}
.padding()
.padding([.horizontal, .bottom])
.padding(.top, 4)
Button(type.usesHashing ? "Copy hash" : "Copy") {
UIPasteboard.general.string = copyText
}
.disabled(!hasKey)
.padding()
.padding([.horizontal, .bottom])
.padding(.top, 4)
Spacer()
}
}