Show HTML pages in a task view beside the transcript

This commit is contained in:
Ian Gulliver
2026-10-21 17:52:04 -07:00
parent af9c750298
commit 585c8ba5f8
16 changed files with 600 additions and 102 deletions
+12
View File
@@ -26,6 +26,14 @@ enum AppLink {
return c.url!
}
static func preview(_ taskId: String, _ port: Int) -> URL {
var c = URLComponents()
c.scheme = "byre-app"
c.host = "preview"
c.queryItems = [URLQueryItem(name: "task", value: taskId), URLQueryItem(name: "port", value: String(port))]
return c.url!
}
static func todo(_ projectId: String, _ title: String, discuss: Bool) -> URL {
var c = URLComponents()
c.scheme = "byre-app"
@@ -54,6 +62,10 @@ func openAppLink(_ url: URL, _ store: Store, _ overlays: Overlays) -> OpenURLAct
store.route(q["hash"] ?? "")
case "file":
store.openFile(q["task"] ?? "", q["path"] ?? "")
case "preview":
let taskId = q["task"] ?? ""
store.route("#/task/\(taskId)")
store.openPage(.preview(taskId: taskId, port: Int(q["port"] ?? "") ?? 0))
case "todo":
store.startTodo(q["project"] ?? "", q["title"] ?? "", discuss: q["discuss"] == "1", overlays)
case "suggest":