mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add copy capabilities to Feed URL and Homepage labels. Issue #1239.
This commit is contained in:
23
iOS/Inspector/FeedInspectorLabelView.swift
Normal file
23
iOS/Inspector/FeedInspectorLabelView.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// FeedInspectorLabel.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Maurice Parker on 11/3/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct FeedInspectorLabelView : UIViewRepresentable {
|
||||
|
||||
let text: String
|
||||
|
||||
func makeUIView(context: Context) -> InteractiveLabel {
|
||||
return InteractiveLabel()
|
||||
}
|
||||
|
||||
func updateUIView(_ label: InteractiveLabel, context: Context) {
|
||||
label.text = text
|
||||
}
|
||||
|
||||
}
|
||||
@@ -60,10 +60,10 @@ struct FeedInspectorView : View {
|
||||
}
|
||||
}
|
||||
Section(header: Text("HOME PAGE")) {
|
||||
Text(verbatim: self.viewModel.homePageURL)
|
||||
FeedInspectorLabelView(text: self.viewModel.homePageURL)
|
||||
}
|
||||
Section(header: Text("FEED URL")) {
|
||||
Text(verbatim: self.viewModel.feedLinkURL)
|
||||
FeedInspectorLabelView(text: self.viewModel.feedLinkURL)
|
||||
}
|
||||
}
|
||||
.onDisappear { self.viewModel.save() }
|
||||
|
||||
Reference in New Issue
Block a user