Skip to content

Commit

Permalink
Larger QR-code view.
Browse files Browse the repository at this point in the history
  • Loading branch information
tijme committed Aug 31, 2021
1 parent 6fab70d commit f8da383
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Raivo MacOS/Helpers/CryptographyHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CryptographyHelper {
///
/// - Returns: A base64 encoded random decryption password
public func getRandomDecryptionPassword() -> String {
return RNCryptor.randomData(ofLength: 32).base64EncodedString()
return RNCryptor.randomData(ofLength: 64).base64EncodedString()
}

}
6 changes: 3 additions & 3 deletions Raivo MacOS/Views/DevicesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct DevicesView: View {
return
}

let content = "raivo-otp://\(deviceToken.toHexString()):\(password):\(deviceNameString)"
let content = "raivo-otp://add-receiver/\(deviceToken.toHexString())?password=\(password)&name=\(deviceNameString)"

guard let image = EFQRCode.generate(for: content, size: EFIntSize(width: 500, height: 500), backgroundColor: CGColor.clear, foregroundColor: NSColor.textColor.cgColor, watermarkIsTransparent: true) else {
return
Expand All @@ -72,12 +72,12 @@ struct DevicesView: View {
var body: some View {
VStack (alignment: .center, spacing: 5) {
if let qrcode = qrcode {
qrcode.resizable().frame(maxWidth: 200, maxHeight: 200)
qrcode.resizable().frame(maxWidth: 240, maxHeight: 240)
} else {
Text("Loading...")
}
}
.frame(minWidth: 450, minHeight: 250, alignment: .center)
.frame(minWidth: 550, minHeight: 250, alignment: .center)
}

}
Expand Down
2 changes: 1 addition & 1 deletion Raivo MacOS/Views/GeneralView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct GeneralView: View {
}
.padding()
}
.frame(minWidth: 450, minHeight: 250, alignment: .topLeading)
.frame(minWidth: 550, minHeight: 250, alignment: .topLeading)
}

}
Expand Down

0 comments on commit f8da383

Please sign in to comment.