diff --git a/Passepartout/Library/Sources/AppUI/Views/Theme/Theme+UI.swift b/Passepartout/Library/Sources/AppUI/Views/Theme/Theme+UI.swift index d87b2696..06cc8321 100644 --- a/Passepartout/Library/Sources/AppUI/Views/Theme/Theme+UI.swift +++ b/Passepartout/Library/Sources/AppUI/Views/Theme/Theme+UI.swift @@ -379,18 +379,18 @@ struct ThemeImageLabel: View { } } -struct ThemeCopiableText: View where ValueView: View { +struct ThemeCopiableText: 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: View where ValueView: View { Spacer() } Button { - copyToPasteboard(value) + copyToPasteboard(value.description) } label: { ThemeImage(.copy) } diff --git a/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift b/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift index 422ad7fb..38aa0e2c 100644 --- a/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift +++ b/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift @@ -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() } )