Fix copy UUID in correct format

This commit is contained in:
Davide 2024-10-11 19:45:58 +02:00
parent 208198c3f8
commit 8c76f33d48
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
2 changed files with 6 additions and 6 deletions

View File

@ -379,18 +379,18 @@ struct ThemeImageLabel: View {
}
}
struct ThemeCopiableText<ValueView>: View where ValueView: View {
struct ThemeCopiableText<Value, ValueView>: View where Value: CustomStringConvertible, ValueView: View {
@EnvironmentObject
private var theme: Theme
var title: String?
let value: String
let value: Value
var isMultiLine = true
let valueView: (String) -> ValueView
let valueView: (Value) -> ValueView
var body: some View {
HStack {
@ -405,7 +405,7 @@ struct ThemeCopiableText<ValueView>: View where ValueView: View {
Spacer()
}
Button {
copyToPasteboard(value)
copyToPasteboard(value.description)
} label: {
ThemeImage(.copy)
}

View File

@ -43,9 +43,9 @@ struct StorageSection: View {
sharingToggle
ThemeCopiableText(
title: Strings.Unlocalized.uuid,
value: profileEditor.profile.id.flatString.localizedDescription(style: .quartets),
value: profileEditor.profile.id,
valueView: {
Text($0)
Text($0.flatString.localizedDescription(style: .quartets))
.monospaced()
}
)