Sources/Orgstar/Panels.swift

1136db9ac14f93d2ef778c0b591f9c5ec322ed1c
orgstar/Sources/Orgstar/Panels.swift

27 lines · 771 bytes

 1import Foundation
 2import OrgApp
 3import OrgCore
 4
 5enum Panel: Identifiable {
 6    case columns(UUID, ColumnView.View)
 7    case export(UUID, URL)
 8    case conflict(UUID)
 9    case syncCopies(UUID)
10    case recovery(UUID)
11    /// A `#+PLOT` table drawn here, or gnuplot's image of it.
12    case plot(UUID, TablePlot.Plot)
13    case plotImage(UUID, URL)
14    case crypt(UUID, CryptRequest)
15    case shareSubtree(UUID, SubtreeShare)
16
17    var id: UUID {
18        switch self {
19        case .columns(let id, _), .export(let id, _), .conflict(let id), .syncCopies(let id), .recovery(let id), .plot(let id, _), .plotImage(let id, _), .crypt(let id, _), .shareSubtree(let id, _): id
20        }
21    }
22}
23
24struct BlockEditRequest: Identifiable {
25    let id = UUID()
26    let edit: BlockEdit
27}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form