Make copiable text multiline by default
This commit is contained in:
parent
d2f44d3ee2
commit
8b5096ab69
|
@ -130,7 +130,7 @@ private extension IPView {
|
||||||
|
|
||||||
func row(forRoute route: Route, removeAction: @escaping () -> Void) -> some View {
|
func row(forRoute route: Route, removeAction: @escaping () -> Void) -> some View {
|
||||||
ThemeRemovableItemRow(isEditing: true) {
|
ThemeRemovableItemRow(isEditing: true) {
|
||||||
ThemeCopiableText(value: route.localizedDescription, isMultiLine: true)
|
ThemeCopiableText(value: route.localizedDescription)
|
||||||
} removeAction: {
|
} removeAction: {
|
||||||
removeAction()
|
removeAction()
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ enum ModuleRow: Hashable {
|
||||||
|
|
||||||
case textList(caption: String, values: [String])
|
case textList(caption: String, values: [String])
|
||||||
|
|
||||||
case copiableText(caption: String? = nil, value: String)
|
case copiableText(caption: String? = nil, value: String, multiline: Bool = true)
|
||||||
|
|
||||||
case longContent(caption: String, value: String)
|
case longContent(caption: String, value: String)
|
||||||
|
|
||||||
|
@ -112,8 +112,8 @@ private extension View {
|
||||||
.withTrailingText(Strings.Global.empty)
|
.withTrailingText(Strings.Global.empty)
|
||||||
}
|
}
|
||||||
|
|
||||||
case .copiableText(let caption, let value):
|
case .copiableText(let caption, let value, let multiline):
|
||||||
ThemeCopiableText(title: caption, value: value)
|
ThemeCopiableText(title: caption, value: value, isMultiLine: multiline)
|
||||||
|
|
||||||
case .longContent(let title, let content):
|
case .longContent(let title, let content):
|
||||||
LongContentLink(title, content: .constant(content)) {
|
LongContentLink(title, content: .constant(content)) {
|
||||||
|
|
|
@ -386,7 +386,7 @@ struct ThemeCopiableText: View {
|
||||||
|
|
||||||
let value: String
|
let value: String
|
||||||
|
|
||||||
var isMultiLine = false
|
var isMultiLine = true
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack {
|
HStack {
|
||||||
|
|
Loading…
Reference in New Issue