Fix copy UUID in correct format
This commit is contained in:
parent
208198c3f8
commit
8c76f33d48
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue