mirror of
https://github.com/kean/Pulse.git
synced 2026-05-30 21:07:33 +00:00
21 lines
441 B
Swift
21 lines
441 B
Swift
// The MIT License (MIT)
|
||
//
|
||
// Copyright (c) 2020–2023 Alexander Grebenyuk (github.com/kean).
|
||
|
||
import SwiftUI
|
||
import CoreData
|
||
import Pulse
|
||
import Combine
|
||
|
||
struct NetworkInspectorViewModel {
|
||
let task: NetworkTaskEntity
|
||
|
||
var title: String {
|
||
task.url.flatMap(URL.init(string:))?.lastPathComponent ?? "Request"
|
||
}
|
||
|
||
func shareTaskAsHTML() -> URL? {
|
||
ShareService.share(task, as: .html).items.first as? URL
|
||
}
|
||
}
|