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
|
@EnvironmentObject
|
||||||
private var theme: Theme
|
private var theme: Theme
|
||||||
|
|
||||||
var title: String?
|
var title: String?
|
||||||
|
|
||||||
let value: String
|
let value: Value
|
||||||
|
|
||||||
var isMultiLine = true
|
var isMultiLine = true
|
||||||
|
|
||||||
let valueView: (String) -> ValueView
|
let valueView: (Value) -> ValueView
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack {
|
HStack {
|
||||||
|
@ -405,7 +405,7 @@ struct ThemeCopiableText<ValueView>: View where ValueView: View {
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
copyToPasteboard(value)
|
copyToPasteboard(value.description)
|
||||||
} label: {
|
} label: {
|
||||||
ThemeImage(.copy)
|
ThemeImage(.copy)
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,9 @@ struct StorageSection: View {
|
||||||
sharingToggle
|
sharingToggle
|
||||||
ThemeCopiableText(
|
ThemeCopiableText(
|
||||||
title: Strings.Unlocalized.uuid,
|
title: Strings.Unlocalized.uuid,
|
||||||
value: profileEditor.profile.id.flatString.localizedDescription(style: .quartets),
|
value: profileEditor.profile.id,
|
||||||
valueView: {
|
valueView: {
|
||||||
Text($0)
|
Text($0.flatString.localizedDescription(style: .quartets))
|
||||||
.monospaced()
|
.monospaced()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue