Remove the task Project tab; ⌘P selects the project
This commit is contained in:
@@ -3,10 +3,10 @@ import Observation
|
||||
import SwiftData
|
||||
|
||||
enum TaskTab: String {
|
||||
case transcript, board, changes, files, page, terminal, workflow, project
|
||||
case transcript, board, changes, files, page, terminal, workflow
|
||||
}
|
||||
|
||||
let taskTabs: [TaskTab] = [.transcript, .board, .changes, .files, .page, .terminal, .workflow, .project]
|
||||
let taskTabs: [TaskTab] = [.transcript, .board, .changes, .files, .page, .terminal, .workflow]
|
||||
|
||||
enum JumpTarget: Equatable {
|
||||
case question(String)
|
||||
@@ -470,10 +470,7 @@ final class Store {
|
||||
}
|
||||
|
||||
var primaryTab: TaskTab {
|
||||
guard let id = selectedTaskId else {
|
||||
return .project
|
||||
}
|
||||
return findTask(id)?.workflow != nil ? .workflow : .transcript
|
||||
selectedTaskId.flatMap { findTask($0) }?.workflow != nil ? .workflow : .transcript
|
||||
}
|
||||
|
||||
func openTab(_ tab: TaskTab) {
|
||||
@@ -661,7 +658,7 @@ final class Store {
|
||||
|
||||
func selectTask(_ taskId: String?) {
|
||||
if case .task(let owner)? = sheet?.owner, owner != taskId {
|
||||
sheet = sheet?.tab == .project && taskId != nil ? Sheet(owner: .task(taskId), view: .tab(.project)) : nil
|
||||
sheet = nil
|
||||
}
|
||||
markVisited(selectedTaskId)
|
||||
markVisited(taskId)
|
||||
|
||||
Reference in New Issue
Block a user