Run byre and the app on their own embedded Tailscale nodes
This commit is contained in:
@@ -1682,8 +1682,11 @@ struct NoteView: View {
|
||||
out += AttributedString(s)
|
||||
case .task(let id):
|
||||
out += taskLink(store, id)
|
||||
case .url(let port):
|
||||
let url = previewURL(store.api.origin, Int(port) ?? 0)
|
||||
case .preview(let taskId, let port):
|
||||
guard let url = store.forwards.url(taskId, port) else {
|
||||
out += AttributedString("port \(port)")
|
||||
continue
|
||||
}
|
||||
var a = AttributedString(url.absoluteString)
|
||||
a.link = url
|
||||
a.foregroundColor = Palette.accent
|
||||
@@ -1707,15 +1710,6 @@ func taskLink(_ store: Store, _ id: String) -> AttributedString {
|
||||
return a
|
||||
}
|
||||
|
||||
func previewURL(_ origin: URL, _ port: Int) -> URL {
|
||||
var c = URLComponents()
|
||||
c.scheme = "https"
|
||||
c.host = origin.host()
|
||||
c.port = port
|
||||
c.path = "/"
|
||||
return c.url!
|
||||
}
|
||||
|
||||
private struct SnapshotRow: View {
|
||||
let snap: Snapshot
|
||||
let review: Review?
|
||||
|
||||
Reference in New Issue
Block a user