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