Compare commits

..

2 Commits

Author SHA1 Message Date
Christoph Hagen
e04447a140 Allow compensation of DST 2022-05-02 17:27:56 +02:00
Christoph Hagen
5205f75f8d Add banner resources 2022-05-02 11:51:11 +02:00
4 changed files with 18 additions and 21 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 && diff != 0 else {
guard diff != 1 else {
return startText
}
return startText + " (\(diff))"
return startText + "\(rCounter)"
}
var timeOffsetText: String {

View File

@ -9,21 +9,20 @@ struct KeyView: View {
var isCompensatingDaylightTime: Bool
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 8) {
ForEach(KeyManagement.KeyType.allCases) { keyType in
SingleKeyView(
keyManager: $keyManager,
type: keyType)
}
Toggle(isOn: $isCompensatingDaylightTime) {
Text("Compensate daylight savings time")
}
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()
}
GeometryReader { geo in
VStack(alignment: .leading, spacing: 16) {
ForEach(KeyManagement.KeyType.allCases) { keyType in
SingleKeyView(
keyManager: $keyManager,
type: keyType)
}
Toggle(isOn: $isCompensatingDaylightTime) {
Text("Compensate daylight savings time")
}
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)
}.padding()
}
}
}

View File

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