iOS: Overdue section, entry sheet, onboarding !360
15 files changed, +1156 −40
Layout: unified · split
Sources/OrgApp/DocumentSession.swift +9
| @@ -198,6 +198,15 @@ public final class DocumentSession { | |||
| 198 | return state.isEditable ? state.text : nil | 198 | return state.isEditable ? state.text : nil |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | /// A copy of `path`'s text and tree, its buffer's when it's open, for changes made apart | ||
| 202 | /// and written back with `ReplaceChangedText`. | ||
| 203 | public func copy(of path: String) -> DocumentState? { | ||
| 204 | if let entry = entry(path) { return entry.buffer.document } | ||
| 205 | guard let bytes = try? fileSystem.read(URL(fileURLWithPath: path)) else { return nil } | ||
| 206 | let state = loaded(bytes, path: path) | ||
| 207 | return state.isEditable ? state : nil | ||
| 208 | } | ||
| 209 | |||
| 201 | /// The buffer's name as uniquify writes it (`post-forward-angle-brackets`): the file name, | 210 | /// The buffer's name as uniquify writes it (`post-forward-angle-brackets`): the file name, |
| 202 | /// with as many of its folders as tell it apart from other open files of the same name. | 211 | /// with as many of its folders as tell it apart from other open files of the same name. |
| 203 | public func bufferName(_ path: String) -> String { | 212 | public func bufferName(_ path: String) -> String { |
Sources/OrgCore/Commands/EntryFields.swift added +147
| @@ -0,0 +1,147 @@ | |||
| 1 | import Foundation | ||
| 2 | |||
| 3 | /// An entry's heading parts, planning and notes, as a form edits them. The notes are the text | ||
| 4 | /// after the planning line, drawers and clock lines, up to the next heading, without trailing | ||
| 5 | /// blank lines. | ||
| 6 | public struct EntryFields: Equatable, Sendable { | ||
| 7 | public var todo: String? | ||
| 8 | /// The cookie's letter or number: `A`, `10`. | ||
| 9 | public var priority: String? | ||
| 10 | public var title: String | ||
| 11 | public var tags: [String] | ||
| 12 | /// The timestamps' text without brackets: `2026-10-17 Sat 18:00 +1w`. | ||
| 13 | public var scheduled: String? | ||
| 14 | public var deadline: String? | ||
| 15 | public var notes: String | ||
| 16 | |||
| 17 | public init(todo: String?, priority: String?, title: String, tags: [String], scheduled: String?, deadline: String?, notes: String) { | ||
| 18 | self.todo = todo | ||
| 19 | self.priority = priority | ||
| 20 | self.title = title | ||
| 21 | self.tags = tags | ||
| 22 | self.scheduled = scheduled | ||
| 23 | self.deadline = deadline | ||
| 24 | self.notes = notes | ||
| 25 | } | ||
| 26 | |||
| 27 | /// The fields of the entry whose heading is at or before `offset`; nil before the first heading. | ||
| 28 | public static func read(_ text: String, at offset: Int, settings: OrgSettings) -> EntryFields? { | ||
| 29 | let buffer = EmacsBuffer(text, point: offset, settings: settings) | ||
| 30 | guard (try? buffer.backToHeading()) != nil, let match = buffer.lookingAt(buffer.complexHeadingPattern) else { return nil } | ||
| 31 | func group(_ i: Int) -> String? { match[i].map { buffer.substring($0.lowerBound, $0.upperBound) } } | ||
| 32 | let notes = buffer.notesRange() | ||
| 33 | return EntryFields( | ||
| 34 | todo: group(2), | ||
| 35 | priority: group(3).map { String($0.dropFirst(2).dropLast()) }, | ||
| 36 | title: group(4) ?? "", | ||
| 37 | tags: group(5).map { $0.split(separator: ":").map(String.init) } ?? [], | ||
| 38 | scheduled: buffer.planningValue(.scheduled), | ||
| 39 | deadline: buffer.planningValue(.deadline), | ||
| 40 | notes: buffer.substring(notes.lowerBound, notes.upperBound) | ||
| 41 | ) | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | extension EmacsBuffer { | ||
| 46 | /// The notes of the entry at point: from past its meta-data to before the trailing blanks | ||
| 47 | /// of the entry's text. | ||
| 48 | func notesRange() -> Range<Int> { | ||
| 49 | saveExcursion { | ||
| 50 | let end = entryEnd | ||
| 51 | endOfMetaDataFull() | ||
| 52 | let start = min(point, end) | ||
| 53 | point = end | ||
| 54 | skipBackward([32, 9, 10, 13]) | ||
| 55 | return start..<max(start, point) | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | |||
| 60 | /// Replaces the title of the entry's heading, keeping its keyword, priority and tags. | ||
| 61 | public struct SetHeadingTitle: OrgCommand { | ||
| 62 | let text: String | ||
| 63 | public init(title: String) { text = title } | ||
| 64 | public var id: String { "org.heading.set-title" } | ||
| 65 | public var title: String { "Set Heading Title" } | ||
| 66 | public func applies(in context: EditContext) -> Bool { entryHeading(at: context.caret, in: context.tree) != nil } | ||
| 67 | public func run(in context: EditContext) -> CommandStep { | ||
| 68 | guard entryHeading(at: context.caret, in: context.tree) != nil else { return .failed("Before first headline") } | ||
| 69 | // A heading is one line. | ||
| 70 | let new = text.split(whereSeparator: \.isNewline).joined(separator: " ").trimmingCharacters(in: .whitespaces) | ||
| 71 | return commitBuffer(context) { buffer in | ||
| 72 | try buffer.saveExcursion { | ||
| 73 | try buffer.backToHeading() | ||
| 74 | guard let match = buffer.lookingAt(buffer.complexHeadingPattern) else { return } | ||
| 75 | if let old = match[4] { | ||
| 76 | buffer.replace(old, with: new) | ||
| 77 | } else if !new.isEmpty { | ||
| 78 | buffer.point = (1...3).compactMap { match[$0]?.upperBound }.max()! | ||
| 79 | buffer.insert(" " + new) | ||
| 80 | } | ||
| 81 | buffer.alignTags(onLineAt: buffer.point) | ||
| 82 | } | ||
| 83 | } | ||
| 84 | } | ||
| 85 | } | ||
| 86 | |||
| 87 | /// Replaces the entry's notes (see `EntryFields.notes`). | ||
| 88 | public struct SetEntryNotes: OrgCommand { | ||
| 89 | let notes: String | ||
| 90 | public init(notes: String) { self.notes = notes } | ||
| 91 | public var id: String { "org.entry.set-notes" } | ||
| 92 | public var title: String { "Set Notes" } | ||
| 93 | public func applies(in context: EditContext) -> Bool { entryHeading(at: context.caret, in: context.tree) != nil } | ||
| 94 | public func run(in context: EditContext) -> CommandStep { | ||
| 95 | guard entryHeading(at: context.caret, in: context.tree) != nil else { return .failed("Before first headline") } | ||
| 96 | var new = notes | ||
| 97 | while new.last?.isWhitespace == true { new.removeLast() } | ||
| 98 | return commitBuffer(context) { buffer in | ||
| 99 | buffer.saveExcursion { | ||
| 100 | let old = buffer.notesRange() | ||
| 101 | if !old.isEmpty { | ||
| 102 | // An emptied note takes its line break with it. | ||
| 103 | let end = new.isEmpty && buffer.character(at: old.upperBound) == 10 ? old.upperBound + 1 : old.upperBound | ||
| 104 | buffer.replace(old.lowerBound..<end, with: new) | ||
| 105 | } else if !new.isEmpty { | ||
| 106 | buffer.point = old.lowerBound | ||
| 107 | if !buffer.bolp { buffer.insert("\n") } | ||
| 108 | buffer.insert(new + "\n") | ||
| 109 | } | ||
| 110 | } | ||
| 111 | } | ||
| 112 | } | ||
| 113 | } | ||
| 114 | |||
| 115 | /// Writes the changes made on a copy of the text back as one edit: the span between what the | ||
| 116 | /// two texts share at their start and end, when the text there still reads as it did. | ||
| 117 | public struct ReplaceChangedText: OrgCommand { | ||
| 118 | public let edit: TextEdit | ||
| 119 | let expected: String | ||
| 120 | |||
| 121 | /// Nil when the texts are the same. | ||
| 122 | public init?(from old: String, to new: String) { | ||
| 123 | let a = Array(old.utf16) | ||
| 124 | let b = Array(new.utf16) | ||
| 125 | let shorter = min(a.count, b.count) | ||
| 126 | var prefix = 0 | ||
| 127 | while prefix < shorter, a[prefix] == b[prefix] { prefix += 1 } | ||
| 128 | var suffix = 0 | ||
| 129 | while suffix < shorter - prefix, a[a.count - 1 - suffix] == b[b.count - 1 - suffix] { suffix += 1 } | ||
| 130 | while prefix > 0, prefix < a.count, UTF16.isTrailSurrogate(a[prefix]) { prefix -= 1 } | ||
| 131 | while suffix > 0, UTF16.isTrailSurrogate(a[a.count - suffix]) { suffix -= 1 } | ||
| 132 | guard a.count != b.count || prefix != a.count else { return nil } | ||
| 133 | edit = TextEdit(range: prefix..<(a.count - suffix), replacement: String(decoding: b[prefix..<(b.count - suffix)], as: UTF16.self)) | ||
| 134 | expected = String(decoding: a[prefix..<(a.count - suffix)], as: UTF16.self) | ||
| 135 | } | ||
| 136 | |||
| 137 | public var id: String { "org.replace-changed-text" } | ||
| 138 | public var title: String { "Replace Changed Text" } | ||
| 139 | public func applies(in context: EditContext) -> Bool { true } | ||
| 140 | public func run(in context: EditContext) -> CommandStep { | ||
| 141 | let text = context.text as NSString | ||
| 142 | guard edit.range.upperBound <= text.length, text.substring(with: NSRange(edit.range)) == expected else { | ||
| 143 | return .failed("The entry changed; nothing was saved.") | ||
| 144 | } | ||
| 145 | return .commit(EditResult(baseRevision: context.revision, edits: [edit], selection: nil, effects: [])) | ||
| 146 | } | ||
| 147 | } | ||
Sources/OrgDocument/CaptureEntry.swift +8 −5
| @@ -24,14 +24,17 @@ public struct CaptureEntry: Sendable, Equatable { | |||
| 24 | scheduled = heading.scheduled | 24 | scheduled = heading.scheduled |
| 25 | deadline = heading.deadline | 25 | deadline = heading.deadline |
| 26 | keywords = tree.settings.todoSequences.flatMap { $0.active.map(\.name) + $0.done.map(\.name) } | 26 | keywords = tree.settings.todoSequences.flatMap { $0.active.map(\.name) + $0.done.map(\.name) } |
| 27 | let range = tree.settings.priorities | 27 | priorities = Self.priorities(tree.settings.priorities) |
| 28 | } | ||
| 29 | |||
| 30 | /// The priorities from `range.highest` to `range.lowest`: `A`, `B`, `C`, or numbers. | ||
| 31 | public static func priorities(_ range: Priorities) -> [String] { | ||
| 28 | if let high = Int(range.highest), let low = Int(range.lowest), high <= low { | 32 | if let high = Int(range.highest), let low = Int(range.lowest), high <= low { |
| 29 | priorities = (high...low).map(String.init) | 33 | return (high...low).map(String.init) |
| 30 | } else if let high = range.highest.unicodeScalars.first?.value, let low = range.lowest.unicodeScalars.first?.value, high <= low { | 34 | } else if let high = range.highest.unicodeScalars.first?.value, let low = range.lowest.unicodeScalars.first?.value, high <= low { |
| 31 | priorities = (high...low).compactMap(Unicode.Scalar.init).map { String(Character($0)) } | 35 | return (high...low).compactMap(Unicode.Scalar.init).map { String(Character($0)) } |
| 32 | } else { | ||
| 33 | priorities = [] | ||
| 34 | } | 36 | } |
| 37 | return [] | ||
| 35 | } | 38 | } |
| 36 | 39 | ||
| 37 | /// `text` after `command` runs on its first heading with `answers`, or nil when the command | 40 | /// `text` after `command` runs on its first heading with `answers`, or nil when the command |
Sources/OrgPresentation/AgendaRows.swift +11 −8
| @@ -46,7 +46,7 @@ public struct AgendaEvent: Sendable, Equatable, Identifiable { | |||
| 46 | /// | 46 | /// |
| 47 | /// The gutter holds the time (`08:00`, `13:50–14:30`) or, untimed, a short status: | 47 | /// The gutter holds the time (`08:00`, `13:50–14:30`) or, untimed, a short status: |
| 48 | /// deadlines `Due today`, `Due in 2d`, `3d late`, `Due` (on a day other than today); | 48 | /// deadlines `Due today`, `Due in 2d`, `3d late`, `Due` (on a day other than today); |
| 49 | /// scheduled `Scheduled`, `4d ago`; habits `Habit`; timestamps, diary sexps and | 49 | /// scheduled `Scheduled`, `4d ago`; habits `Habit`, `1d ago` when missed; timestamps, diary sexps and |
| 50 | /// calendar events `All day`; ranges `Day 2/5`; log mode `Closed`, `Clocked`, `State`; TODO | 50 | /// calendar events `All day`; ranges `Day 2/5`; log mode `Closed`, `Clocked`, `State`; TODO |
| 51 | /// and match lists nothing. Ages use `AgendaAge.compact`. | 51 | /// and match lists nothing. Ages use `AgendaAge.compact`. |
| 52 | public struct AgendaRow: Sendable, Equatable, Identifiable { | 52 | public struct AgendaRow: Sendable, Equatable, Identifiable { |
| @@ -102,9 +102,11 @@ public struct AgendaRow: Sendable, Equatable, Identifiable { | |||
| 102 | /// Nil for the time grid and the current-time line. | 102 | /// Nil for the time grid and the current-time line. |
| 103 | public init?(item: AgendaItem, day: Int, today: Int) { | 103 | public init?(item: AgendaItem, day: Int, today: Int) { |
| 104 | if item.kind == .timeGrid || item.kind == .currentTime { return nil } | 104 | if item.kind == .timeGrid || item.kind == .currentTime { return nil } |
| 105 | let timed = item.timeOfDay.map { start in (start, Self.endTime(item.time)) } | ||
| 106 | let planning = item.planningDay | 105 | let planning = item.planningDay |
| 107 | let late = planning.map { $0 < today } ?? false | 106 | let late = planning.map { $0 < today } ?? false |
| 107 | // Carried to today from an earlier day, where its time no longer applies. | ||
| 108 | let carried = late && day == today | ||
| 109 | let timed = carried ? nil : item.timeOfDay.map { start in (start, Self.endTime(item.time)) } | ||
| 108 | var icon: Icon? | 110 | var icon: Icon? |
| 109 | var status: Status = .normal | 111 | var status: Status = .normal |
| 110 | var untimed = "" | 112 | var untimed = "" |
| @@ -121,13 +123,14 @@ public struct AgendaRow: Sendable, Equatable, Identifiable { | |||
| 121 | } | 123 | } |
| 122 | status = late ? .overdue : day == today ? .dueSoon : .normal | 124 | status = late ? .overdue : day == today ? .dueSoon : .normal |
| 123 | case .scheduled, .pastScheduled: | 125 | case .scheduled, .pastScheduled: |
| 126 | let on = planning ?? day | ||
| 127 | let ago = String(localized: "\(AgendaAge.compact(day - on)) ago", bundle: .main) | ||
| 124 | if item.habit != nil { | 128 | if item.habit != nil { |
| 125 | icon = .habit | 129 | icon = .habit |
| 126 | untimed = String(localized: "Habit", bundle: .main) | 130 | untimed = carried ? ago : String(localized: "Habit", bundle: .main) |
| 127 | } else { | 131 | } else { |
| 128 | icon = .scheduled | 132 | icon = .scheduled |
| 129 | let on = planning ?? day | 133 | untimed = on < day ? ago : String(localized: "Scheduled", bundle: .main) |
| 130 | untimed = on < day ? String(localized: "\(AgendaAge.compact(day - on)) ago", bundle: .main) : String(localized: "Scheduled", bundle: .main) | ||
| 131 | } | 134 | } |
| 132 | status = late ? .overdue : .normal | 135 | status = late ? .overdue : .normal |
| 133 | case .timestamp, .sexp: | 136 | case .timestamp, .sexp: |
| @@ -325,8 +328,8 @@ public enum AgendaRows { | |||
| 325 | /// | 328 | /// |
| 326 | /// - Days with no rows are left out unless `showAllDates` (`org-agenda-show-all-dates`); | 329 | /// - Days with no rows are left out unless `showAllDates` (`org-agenda-show-all-dates`); |
| 327 | /// today always stays. | 330 | /// today always stays. |
| 328 | /// - Today's past-scheduled entries and past deadlines (not habits) go in `overdue`, | 331 | /// - Today's past-scheduled entries, habits and past deadlines go in `overdue`, oldest |
| 329 | /// oldest date first, Org's order among the same date. | 332 | /// date first, Org's order among the same date. |
| 330 | /// - Other rows keep the agenda's order (timed by time, then untimed by urgency, habits | 333 | /// - Other rows keep the agenda's order (timed by time, then untimed by urgency, habits |
| 331 | /// after other entries at the same time). | 334 | /// after other entries at the same time). |
| 332 | /// All-day events come first, timed events go among the timed entries by start time, | 335 | /// All-day events come first, timed events go among the timed entries by start time, |
| @@ -349,7 +352,7 @@ public enum AgendaRows { | |||
| 349 | if item.kind == .timeGrid, let time = item.timeOfDay { grid.append((rows.count, time)) } | 352 | if item.kind == .timeGrid, let time = item.timeOfDay { grid.append((rows.count, time)) } |
| 350 | if item.kind == .currentTime { showsNow = true } | 353 | if item.kind == .currentTime { showsNow = true } |
| 351 | guard keep(item), let row = AgendaRow(item: item, day: day.day, today: today) else { continue } | 354 | guard keep(item), let row = AgendaRow(item: item, day: day.day, today: today) else { continue } |
| 352 | if day.day == today, item.habit == nil, let planning = row.planningDay, planning < today { | 355 | if day.day == today, let planning = row.planningDay, planning < today { |
| 353 | overdue.append(row) | 356 | overdue.append(row) |
| 354 | } else { | 357 | } else { |
| 355 | rows.append(row) | 358 | rows.append(row) |
Sources/OrgstarMobile/AgendaScreen.swift +34 −10
| @@ -50,6 +50,8 @@ struct AgendaScreen: View, Equatable { | |||
| 50 | @State private var bulkArchiving = false | 50 | @State private var bulkArchiving = false |
| 51 | @State private var bulkPlanning: BulkPlanning? | 51 | @State private var bulkPlanning: BulkPlanning? |
| 52 | @State private var showingBoard = false | 52 | @State private var showingBoard = false |
| 53 | /// The entry open in its sheet. | ||
| 54 | @State private var editing: AgendaItem? | ||
| 53 | 55 | ||
| 54 | /// A marked entry: its heading line, to find it again. | 56 | /// A marked entry: its heading line, to find it again. |
| 55 | private struct Mark: Hashable { | 57 | private struct Mark: Hashable { |
| @@ -110,6 +112,7 @@ struct AgendaScreen: View, Equatable { | |||
| 110 | } else if case .agenda = agenda.mode { | 112 | } else if case .agenda = agenda.mode { |
| 111 | let _ = model.settingsVersion | 113 | let _ = model.settingsVersion |
| 112 | ForEach(Perf.measure("agenda.groups") { agenda.groups(showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter) }) { group in | 114 | ForEach(Perf.measure("agenda.groups") { agenda.groups(showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter) }) { group in |
| 115 | overdue(group) | ||
| 113 | Section { | 116 | Section { |
| 114 | day(group) | 117 | day(group) |
| 115 | } header: { | 118 | } header: { |
| @@ -122,6 +125,7 @@ struct AgendaScreen: View, Equatable { | |||
| 122 | if block.isAgenda { | 125 | if block.isAgenda { |
| 123 | Section { } header: { Text(block.header).font(.headline) } | 126 | Section { } header: { Text(block.header).font(.headline) } |
| 124 | ForEach(agenda.groups(block, showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter)) { group in | 127 | ForEach(agenda.groups(block, showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter)) { group in |
| 128 | overdue(group) | ||
| 125 | Section { | 129 | Section { |
| 126 | day(group) | 130 | day(group) |
| 127 | } header: { | 131 | } header: { |
| @@ -272,6 +276,13 @@ struct AgendaScreen: View, Equatable { | |||
| 272 | .navigationBarTitleDisplayMode(.inline) | 276 | .navigationBarTitleDisplayMode(.inline) |
| 273 | } | 277 | } |
| 274 | } | 278 | } |
| 279 | .sheet(item: $editing) { item in | ||
| 280 | EntrySheet(item: item, workspace: workspace, session: session) { saved, open in | ||
| 281 | editing = nil | ||
| 282 | if saved { tick += 1 } | ||
| 283 | if let open { model.openRequest = .offset(open.path, open.offset) } | ||
| 284 | } | ||
| 285 | } | ||
| 275 | .sheet(item: $refiling) { item in | 286 | .sheet(item: $refiling) { item in |
| 276 | RefileSheet(targets: workspace.refileTargets(openPath: session.path, document: session.document)) { target in | 287 | RefileSheet(targets: workspace.refileTargets(openPath: session.path, document: session.document)) { target in |
| 277 | refiling = nil | 288 | refiling = nil |
| @@ -401,29 +412,39 @@ struct AgendaScreen: View, Equatable { | |||
| 401 | 412 | ||
| 402 | // MARK: - Days | 413 | // MARK: - Days |
| 403 | 414 | ||
| 404 | private func day(_ group: AgendaDayGroup) -> some View { | 415 | /// Today's entries from earlier days, in a section of their own above today's. |
| 405 | Group { | 416 | @ViewBuilder |
| 406 | if group.isToday, !group.overdue.isEmpty { | 417 | private func overdue(_ group: AgendaDayGroup) -> some View { |
| 418 | if group.isToday, !group.overdue.isEmpty { | ||
| 419 | Section { | ||
| 420 | if overdueExpanded { | ||
| 421 | ForEach(group.overdue) { item in Deferred { row(item, day: group.day) } } | ||
| 422 | } | ||
| 423 | } header: { | ||
| 407 | Button { | 424 | Button { |
| 408 | withAnimation { overdueExpanded.toggle() } | 425 | withAnimation { overdueExpanded.toggle() } |
| 409 | } label: { | 426 | } label: { |
| 410 | HStack(spacing: 6) { | 427 | HStack(spacing: 6) { |
| 411 | Image(systemName: "chevron.right") | ||
| 412 | .font(.caption.weight(.semibold)) | ||
| 413 | .rotationEffect(.degrees(overdueExpanded ? 90 : 0)) | ||
| 414 | Text("Overdue").font(.subheadline.weight(.semibold)) | 428 | Text("Overdue").font(.subheadline.weight(.semibold)) |
| 415 | Text("\(group.overdue.count)").font(.subheadline.monospacedDigit()) | 429 | Text("\(group.overdue.count)").font(.subheadline.monospacedDigit()) |
| 416 | Spacer() | 430 | Spacer() |
| 431 | Image(systemName: "chevron.right") | ||
| 432 | .font(.caption.weight(.semibold)) | ||
| 433 | .rotationEffect(.degrees(overdueExpanded ? 90 : 0)) | ||
| 417 | } | 434 | } |
| 418 | .foregroundStyle(themed(theme.statusColor(.overdue, dark: isDark), .red)) | 435 | .foregroundStyle(themed(theme.statusColor(.overdue, dark: isDark), .red)) |
| 419 | .contentShape(Rectangle()) | 436 | .contentShape(Rectangle()) |
| 420 | } | 437 | } |
| 421 | .buttonStyle(.plain) | 438 | .buttonStyle(.plain) |
| 422 | if overdueExpanded { | 439 | .textCase(nil) |
| 423 | ForEach(group.overdue) { item in Deferred { row(item, day: group.day) } } | 440 | .accessibilityValue(overdueExpanded ? "Expanded" : "Collapsed") |
| 424 | } | ||
| 425 | } | 441 | } |
| 426 | if group.isEmpty { | 442 | } |
| 443 | } | ||
| 444 | |||
| 445 | private func day(_ group: AgendaDayGroup) -> some View { | ||
| 446 | Group { | ||
| 447 | if group.rows.isEmpty { | ||
| 427 | Text("Nothing scheduled").font(.subheadline).foregroundStyle(.secondary) | 448 | Text("Nothing scheduled").font(.subheadline).foregroundStyle(.secondary) |
| 428 | } | 449 | } |
| 429 | // One view per element, so the list counts its rows without building them. | 450 | // One view per element, so the list counts its rows without building them. |
| @@ -658,6 +679,9 @@ struct AgendaScreen: View, Equatable { | |||
| 658 | } else { | 679 | } else { |
| 659 | AgendaRowView(row: row, day: day, theme: theme, dark: isDark).opacity(0.5) | 680 | AgendaRowView(row: row, day: day, theme: theme, dark: isDark).opacity(0.5) |
| 660 | } | 681 | } |
| 682 | } else if let item = row.item, item.path != nil, item.headingLine != nil, item.headingOffset != nil { | ||
| 683 | Button { editing = item } label: { AgendaRowView(row: row, day: day, theme: theme, dark: isDark) } | ||
| 684 | .tint(.primary) | ||
| 661 | } else if let item = row.item, let path = item.path, let offset = item.headingOffset ?? item.markerOffset { | 685 | } else if let item = row.item, let path = item.path, let offset = item.headingOffset ?? item.markerOffset { |
| 662 | NavigationLink(value: ReaderRoute.offset(path, offset)) { AgendaRowView(row: row, day: day, theme: theme, dark: isDark) } | 686 | NavigationLink(value: ReaderRoute.offset(path, offset)) { AgendaRowView(row: row, day: day, theme: theme, dark: isDark) } |
| 663 | } else if let event = row.event { | 687 | } else if let event = row.event { |
Sources/OrgstarMobile/CaptureScreen.swift +2 −2
| @@ -361,7 +361,7 @@ private struct EntryFields: View { | |||
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | /// A date and, when switched on, a time; the answer as a date prompt takes it. | 363 | /// A date and, when switched on, a time; the answer as a date prompt takes it. |
| 364 | private struct DateTimeSheet: View { | 364 | struct DateTimeSheet: View { |
| 365 | let title: String | 365 | let title: String |
| 366 | let initial: Date | 366 | let initial: Date |
| 367 | let done: (String?) -> Void | 367 | let done: (String?) -> Void |
| @@ -393,7 +393,7 @@ private struct DateTimeSheet: View { | |||
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | /// Tags to toggle, from the file and the workspace, and new ones typed in. | 395 | /// Tags to toggle, from the file and the workspace, and new ones typed in. |
| 396 | private struct TagsSheet: View { | 396 | struct TagsSheet: View { |
| 397 | let choices: [String] | 397 | let choices: [String] |
| 398 | let done: ([String]?) -> Void | 398 | let done: ([String]?) -> Void |
| 399 | @State private var selected: [String] | 399 | @State private var selected: [String] |
Sources/OrgstarMobile/EntrySheet.swift added +315
| @@ -0,0 +1,315 @@ | |||
| 1 | #if os(iOS) | ||
| 2 | import OrgApp | ||
| 3 | import OrgCore | ||
| 4 | import OrgDocument | ||
| 5 | import OrgPresentation | ||
| 6 | import SwiftUI | ||
| 7 | |||
| 8 | /// An agenda entry's title, state, priority, dates, tags and notes, changed by the editor's | ||
| 9 | /// commands on a copy of its file and written back as one edit on Done. | ||
| 10 | struct EntrySheet: View { | ||
| 11 | let item: AgendaItem | ||
| 12 | let workspace: WorkspaceModel | ||
| 13 | let session: DocumentSession | ||
| 14 | /// Whether anything was written, and the entry to show in its file. | ||
| 15 | let done: (_ saved: Bool, _ open: (path: String, offset: Int)?) -> Void | ||
| 16 | @Environment(MobileModel.self) private var model | ||
| 17 | @Environment(\.colorScheme) private var colorScheme | ||
| 18 | @State private var draft: DocumentState? | ||
| 19 | @State private var original = "" | ||
| 20 | @State private var offset = 0 | ||
| 21 | @State private var title = "" | ||
| 22 | @State private var notes = "" | ||
| 23 | /// Changes on the copy that undo may take back, and those redo may bring back: the copy of | ||
| 24 | /// an open file has the editor's history too. | ||
| 25 | @State private var steps = 0 | ||
| 26 | @State private var undone = 0 | ||
| 27 | @State private var problem: String? | ||
| 28 | @State private var prompt: PendingPrompt? | ||
| 29 | @State private var planning: Planning? | ||
| 30 | @State private var choosingTags = false | ||
| 31 | @State private var confirmingDiscard = false | ||
| 32 | |||
| 33 | private enum Planning: String, Identifiable { | ||
| 34 | case scheduled = "Scheduled", deadline = "Deadline" | ||
| 35 | var id: String { rawValue } | ||
| 36 | } | ||
| 37 | |||
| 38 | private struct PendingPrompt: Identifiable { | ||
| 39 | let id = UUID() | ||
| 40 | let prompt: Prompt | ||
| 41 | let reply: (String?) -> Void | ||
| 42 | } | ||
| 43 | |||
| 44 | private var fields: EntryFields? { | ||
| 45 | draft.flatMap { EntryFields.read($0.text, at: offset, settings: $0.tree.settings) } | ||
| 46 | } | ||
| 47 | |||
| 48 | private var hasChanges: Bool { | ||
| 49 | guard let draft, let fields else { return false } | ||
| 50 | return draft.text != original || title != fields.title || trimmed(notes) != fields.notes | ||
| 51 | } | ||
| 52 | |||
| 53 | private var isDark: Bool { colorScheme == .dark } | ||
| 54 | |||
| 55 | var body: some View { | ||
| 56 | NavigationStack { | ||
| 57 | Group { | ||
| 58 | if let fields, let draft { | ||
| 59 | form(fields, settings: draft.tree.settings) | ||
| 60 | } else if let problem { | ||
| 61 | ContentUnavailableView("Can't open the entry", systemImage: "exclamationmark.triangle", description: Text(problem)) | ||
| 62 | } else { | ||
| 63 | ProgressView() | ||
| 64 | } | ||
| 65 | } | ||
| 66 | .navigationBarTitleDisplayMode(.inline) | ||
| 67 | .toolbar { | ||
| 68 | ToolbarItemGroup(placement: .topBarLeading) { | ||
| 69 | Button("Cancel", systemImage: "xmark") { | ||
| 70 | if hasChanges { confirmingDiscard = true } else { done(false, nil) } | ||
| 71 | } | ||
| 72 | Button("Undo", systemImage: "arrow.uturn.backward", action: undo).disabled(steps == 0) | ||
| 73 | Button("Redo", systemImage: "arrow.uturn.forward", action: redo).disabled(undone == 0) | ||
| 74 | } | ||
| 75 | ToolbarItem(placement: .primaryAction) { | ||
| 76 | Menu("More", systemImage: "ellipsis") { | ||
| 77 | Button("Open in File", systemImage: "doc.text") { save(open: true) } | ||
| 78 | } | ||
| 79 | .disabled(draft == nil) | ||
| 80 | } | ||
| 81 | ToolbarItem(placement: .confirmationAction) { | ||
| 82 | Button("Done", systemImage: "checkmark") { save() }.disabled(draft == nil) | ||
| 83 | } | ||
| 84 | } | ||
| 85 | .confirmationDialog("Discard your changes?", isPresented: $confirmingDiscard, titleVisibility: .visible) { | ||
| 86 | Button("Discard Changes", role: .destructive) { done(false, nil) } | ||
| 87 | } | ||
| 88 | } | ||
| 89 | .presentationDragIndicator(.visible) | ||
| 90 | .interactiveDismissDisabled(hasChanges) | ||
| 91 | .task { load() } | ||
| 92 | .sheet(item: $prompt) { pending in | ||
| 93 | PromptSheet(prompt: pending.prompt) { answer in | ||
| 94 | prompt = nil | ||
| 95 | pending.reply(answer) | ||
| 96 | } | ||
| 97 | } | ||
| 98 | .sheet(item: $planning) { which in | ||
| 99 | let stamp = which == .scheduled ? fields?.scheduled : fields?.deadline | ||
| 100 | DateTimeSheet(title: which.rawValue, initial: stamp.flatMap(Self.timestamp).map(Self.date) ?? Calendar.current.startOfDay(for: Date())) { answer in | ||
| 101 | planning = nil | ||
| 102 | if let answer { run(SetPlanning(deadline: which == .deadline), ["date": answer]) } | ||
| 103 | } | ||
| 104 | } | ||
| 105 | .sheet(isPresented: $choosingTags) { | ||
| 106 | TagsSheet(selected: fields?.tags ?? [], choices: (try? workspace.index.tags()) ?? []) { tags in | ||
| 107 | choosingTags = false | ||
| 108 | guard let tags, let old = fields?.tags else { return } | ||
| 109 | for tag in old where !tags.contains(tag) { run(ToggleTag(tag: tag, on: false)) } | ||
| 110 | for tag in tags where !old.contains(tag) { run(ToggleTag(tag: tag, on: true)) } | ||
| 111 | } | ||
| 112 | } | ||
| 113 | } | ||
| 114 | |||
| 115 | private func form(_ fields: EntryFields, settings: OrgSettings) -> some View { | ||
| 116 | ScrollView { | ||
| 117 | VStack(alignment: .leading, spacing: 12) { | ||
| 118 | TextField("Title", text: $title, axis: .vertical) | ||
| 119 | .font(.title3.weight(.semibold)) | ||
| 120 | ScrollView(.horizontal, showsIndicators: false) { | ||
| 121 | HStack(spacing: 8) { | ||
| 122 | stateChip(fields, settings: settings) | ||
| 123 | priorityChip(fields, settings: settings) | ||
| 124 | dateChip(.scheduled, fields.scheduled) | ||
| 125 | dateChip(.deadline, fields.deadline) | ||
| 126 | } | ||
| 127 | } | ||
| 128 | Button { | ||
| 129 | choosingTags = true | ||
| 130 | } label: { | ||
| 131 | chip(fields.tags.isEmpty ? String(localized: "Tags") : fields.tags.joined(separator: " "), systemImage: "tag", color: fields.tags.isEmpty ? .secondary : .accentColor) | ||
| 132 | } | ||
| 133 | if let problem { | ||
| 134 | Text(problem).font(.footnote).foregroundStyle(.red) | ||
| 135 | } | ||
| 136 | } | ||
| 137 | .padding() | ||
| 138 | .frame(maxWidth: .infinity, alignment: .leading) | ||
| 139 | .background(Color.accentColor.opacity(0.08)) | ||
| 140 | Divider() | ||
| 141 | TextEditor(text: $notes) | ||
| 142 | .font(.body) | ||
| 143 | .scrollDisabled(true) | ||
| 144 | .scrollContentBackground(.hidden) | ||
| 145 | .frame(minHeight: 240) | ||
| 146 | .overlay(alignment: .topLeading) { | ||
| 147 | if notes.isEmpty { | ||
| 148 | Text("Add notes").foregroundStyle(.tertiary).padding(.top, 8).padding(.leading, 5).allowsHitTesting(false) | ||
| 149 | } | ||
| 150 | } | ||
| 151 | .padding(.horizontal) | ||
| 152 | } | ||
| 153 | .scrollDismissesKeyboard(.interactively) | ||
| 154 | } | ||
| 155 | |||
| 156 | private func stateChip(_ fields: EntryFields, settings: OrgSettings) -> some View { | ||
| 157 | let keywords = settings.todoSequences.flatMap { $0.active.map(\.name) + $0.done.map(\.name) } | ||
| 158 | let color = fields.todo.flatMap { todo in | ||
| 159 | model.theme.todoColor(todo, isDone: settings.todoSequences.contains { $0.done.contains { $0.name == todo } }, dark: isDark)?.swiftUI | ||
| 160 | } ?? .secondary | ||
| 161 | return Menu { | ||
| 162 | ForEach(keywords, id: \.self) { keyword in | ||
| 163 | Button(keyword) { run(SetTodo(keyword: keyword)) } | ||
| 164 | } | ||
| 165 | Button("None") { run(SetTodo(keyword: nil)) } | ||
| 166 | } label: { | ||
| 167 | chip(fields.todo ?? String(localized: "No State"), color: color) | ||
| 168 | } | ||
| 169 | } | ||
| 170 | |||
| 171 | @ViewBuilder | ||
| 172 | private func priorityChip(_ fields: EntryFields, settings: OrgSettings) -> some View { | ||
| 173 | let priorities = CaptureEntry.priorities(settings.priorities) | ||
| 174 | if !priorities.isEmpty { | ||
| 175 | let color = fields.priority.flatMap { model.theme.priorityColor($0, dark: isDark)?.swiftUI } ?? .secondary | ||
| 176 | Menu { | ||
| 177 | ForEach(priorities, id: \.self) { priority in | ||
| 178 | Button("Priority \(priority)") { run(SetPriority(), ["priority": priority]) } | ||
| 179 | } | ||
| 180 | Button("None") { run(SetPriority(), ["priority": " "]) } | ||
| 181 | } label: { | ||
| 182 | chip(fields.priority.map { "#" + $0 } ?? "#", color: color) | ||
| 183 | } | ||
| 184 | .accessibilityLabel(fields.priority.map { "Priority \($0)" } ?? "No priority") | ||
| 185 | } | ||
| 186 | } | ||
| 187 | |||
| 188 | private func dateChip(_ which: Planning, _ value: String?) -> some View { | ||
| 189 | let stamp = value.flatMap(Self.timestamp) | ||
| 190 | return Menu { | ||
| 191 | Button("Today") { set(which, days: 0, keeping: stamp) } | ||
| 192 | Button("Tomorrow") { set(which, days: 1, keeping: stamp) } | ||
| 193 | Button("In a Week") { set(which, days: 7, keeping: stamp) } | ||
| 194 | Button("Pick Date…") { planning = which } | ||
| 195 | if value != nil { | ||
| 196 | Button("Remove", role: .destructive) { run(RemovePlanning(deadline: which == .deadline)) } | ||
| 197 | } | ||
| 198 | } label: { | ||
| 199 | chip(stamp.map { which == .scheduled ? String(localized: "S: \(Self.text($0))") : String(localized: "D: \(Self.text($0))") } | ||
| 200 | ?? (which == .scheduled ? String(localized: "Schedule") : String(localized: "Deadline")), | ||
| 201 | systemImage: which == .scheduled ? "calendar" : "flag", color: stamp == nil ? .secondary : .accentColor) | ||
| 202 | } | ||
| 203 | } | ||
| 204 | |||
| 205 | private func chip(_ text: String, systemImage: String? = nil, color: Color) -> some View { | ||
| 206 | HStack(spacing: 4) { | ||
| 207 | if let systemImage { Image(systemName: systemImage) } | ||
| 208 | Text(text).lineLimit(1) | ||
| 209 | } | ||
| 210 | .font(.subheadline.weight(.medium)) | ||
| 211 | .foregroundStyle(color) | ||
| 212 | .padding(.horizontal, 12) | ||
| 213 | .padding(.vertical, 7) | ||
| 214 | .background(color.opacity(0.14), in: Capsule()) | ||
| 215 | } | ||
| 216 | |||
| 217 | // MARK: - Changes | ||
| 218 | |||
| 219 | private func load() { | ||
| 220 | guard draft == nil else { return } | ||
| 221 | guard let path = item.path, let line = item.headingLine, let near = item.headingOffset, | ||
| 222 | let at = session.locateHeading(path: path, line: line, near: near), let copy = session.copy(of: path), | ||
| 223 | let fields = EntryFields.read(copy.text, at: at, settings: copy.tree.settings) else { | ||
| 224 | problem = "The entry changed or its file can't be read." | ||
| 225 | return | ||
| 226 | } | ||
| 227 | (draft, original, offset, title, notes) = (copy, copy.text, at, fields.title, fields.notes) | ||
| 228 | } | ||
| 229 | |||
| 230 | /// Runs `command` at the heading on the copy, asking what it asks. | ||
| 231 | private func run(_ command: any OrgCommand, _ answers: [String: String] = [:]) { | ||
| 232 | guard var copy = draft else { return } | ||
| 233 | do { | ||
| 234 | switch try copy.run(command, selection: [offset..<offset], answers: answers, options: session.options) { | ||
| 235 | case .commit: | ||
| 236 | problem = nil | ||
| 237 | guard copy.text != draft?.text else { return } | ||
| 238 | draft = copy | ||
| 239 | steps += 1 | ||
| 240 | undone = 0 | ||
| 241 | case .prompt(let request): | ||
| 242 | prompt = PendingPrompt(prompt: request) { answer in | ||
| 243 | if let answer { run(command, answers.merging([request.key: answer]) { $1 }) } | ||
| 244 | } | ||
| 245 | case .failed(let text): | ||
| 246 | problem = text | ||
| 247 | case .external(let request): | ||
| 248 | problem = MobileEditor.unavailable(request, title: command.title) | ||
| 249 | } | ||
| 250 | } catch { | ||
| 251 | problem = "\(error)" | ||
| 252 | } | ||
| 253 | } | ||
| 254 | |||
| 255 | private func undo() { | ||
| 256 | guard steps > 0, var copy = draft, copy.undo() != nil else { return } | ||
| 257 | draft = copy | ||
| 258 | steps -= 1 | ||
| 259 | undone += 1 | ||
| 260 | } | ||
| 261 | |||
| 262 | private func redo() { | ||
| 263 | guard undone > 0, var copy = draft, copy.redo() != nil else { return } | ||
| 264 | draft = copy | ||
| 265 | undone -= 1 | ||
| 266 | steps += 1 | ||
| 267 | } | ||
| 268 | |||
| 269 | /// `days` from today, at the time `stamp` has. | ||
| 270 | private func set(_ which: Planning, days: Int, keeping stamp: Timestamp?) { | ||
| 271 | var day = Calendar.current.date(byAdding: .day, value: days, to: Calendar.current.startOfDay(for: Date())) ?? Date() | ||
| 272 | if let hour = stamp?.start.hour { | ||
| 273 | day = Calendar.current.date(bySettingHour: hour, minute: stamp?.start.minute ?? 0, second: 0, of: day) ?? day | ||
| 274 | } | ||
| 275 | run(SetPlanning(deadline: which == .deadline), ["date": QuestionField.stamp(day, withTime: stamp?.start.hour != nil)]) | ||
| 276 | } | ||
| 277 | |||
| 278 | /// The title and notes onto the copy, and the copy written back to the file. | ||
| 279 | private func save(open: Bool = false) { | ||
| 280 | guard let path = item.path, let fields else { return } | ||
| 281 | if title != fields.title { run(SetHeadingTitle(title: title)) } | ||
| 282 | if trimmed(notes) != fields.notes { run(SetEntryNotes(notes: notes)) } | ||
| 283 | guard let draft else { return } | ||
| 284 | var saved = false | ||
| 285 | if let command = ReplaceChangedText(from: original, to: draft.text) { | ||
| 286 | if case .failed(let text) = session.perform(command, path: path, at: offset, expect: nil) { | ||
| 287 | problem = text | ||
| 288 | return | ||
| 289 | } | ||
| 290 | saved = true | ||
| 291 | } | ||
| 292 | done(saved, open ? (path, offset) : nil) | ||
| 293 | } | ||
| 294 | |||
| 295 | private func trimmed(_ text: String) -> String { | ||
| 296 | var text = text | ||
| 297 | while text.last?.isWhitespace == true { text.removeLast() } | ||
| 298 | return text | ||
| 299 | } | ||
| 300 | |||
| 301 | private static func timestamp(_ value: String) -> Timestamp? { Timestamp.parse("<" + value + ">") } | ||
| 302 | |||
| 303 | private static func date(_ stamp: Timestamp) -> Date { | ||
| 304 | let p = stamp.start | ||
| 305 | return Calendar.current.date(from: DateComponents(year: p.year, month: p.month, day: p.day, hour: p.hour, minute: p.minute)) ?? Date() | ||
| 306 | } | ||
| 307 | |||
| 308 | /// `Sat 17 Oct`, with the time when it has one. | ||
| 309 | private static func text(_ stamp: Timestamp) -> String { | ||
| 310 | let day = date(stamp).formatted(.dateTime.weekday(.abbreviated).day().month(.abbreviated)) | ||
| 311 | guard let hour = stamp.start.hour else { return day } | ||
| 312 | return day + String(format: " %02d:%02d", hour, stamp.start.minute ?? 0) | ||
| 313 | } | ||
| 314 | } | ||
| 315 | #endif | ||
Sources/OrgstarMobile/MobileModel.swift +2 −1
| @@ -321,7 +321,8 @@ final class MobileModel { | |||
| 321 | /// that only changes the badge. | 321 | /// that only changes the badge. |
| 322 | private func updateBadge(_ counts: [Int]) async { | 322 | private func updateBadge(_ counts: [Int]) async { |
| 323 | let center = UNUserNotificationCenter.current() | 323 | let center = UNUserNotificationCenter.current() |
| 324 | guard await badgesEnabled(asking: true) else { return } | 324 | // Onboarding asks first. |
| 325 | guard await badgesEnabled(asking: UserDefaults.standard.bool(forKey: OnboardingScreen.doneKey)) else { return } | ||
| 325 | try? await center.setBadgeCount(counts.first ?? 0) | 326 | try? await center.setBadgeCount(counts.first ?? 0) |
| 326 | center.removePendingNotificationRequests(withIdentifiers: (1..<AgendaSnapshot.dayCount).map(Self.badgeID)) | 327 | center.removePendingNotificationRequests(withIdentifiers: (1..<AgendaSnapshot.dayCount).map(Self.badgeID)) |
| 327 | let today = Calendar.current.startOfDay(for: Date()) | 328 | let today = Calendar.current.startOfDay(for: Date()) |
Sources/OrgstarMobile/OnboardingScreen.swift added +192
| @@ -0,0 +1,192 @@ | |||
| 1 | #if os(iOS) | ||
| 2 | import OrgApp | ||
| 3 | import OrgCore | ||
| 4 | import SwiftUI | ||
| 5 | import UserNotifications | ||
| 6 | |||
| 7 | /// First launch: what the app does, the folder of org files, and the permissions each | ||
| 8 | /// optional feature needs, asked for one at a time and only when the user chooses to. | ||
| 9 | struct OnboardingScreen: View { | ||
| 10 | /// Set once onboarding is done or skipped for a workspace that had folders already. | ||
| 11 | static let doneKey = "onboarded" | ||
| 12 | |||
| 13 | let model: MobileModel | ||
| 14 | let workspace: WorkspaceModel | ||
| 15 | let finish: () -> Void | ||
| 16 | @State private var step = Step.welcome | ||
| 17 | @State private var importing = false | ||
| 18 | @State private var problem: String? | ||
| 19 | |||
| 20 | private enum Step: Int, CaseIterable { | ||
| 21 | case welcome, folder, notifications, calendar, reminders | ||
| 22 | } | ||
| 23 | |||
| 24 | var body: some View { | ||
| 25 | VStack(spacing: 0) { | ||
| 26 | Group { | ||
| 27 | switch step { | ||
| 28 | case .welcome: welcome | ||
| 29 | case .folder: folder | ||
| 30 | case .notifications: notifications | ||
| 31 | case .calendar: calendar | ||
| 32 | case .reminders: reminders | ||
| 33 | } | ||
| 34 | } | ||
| 35 | .frame(maxWidth: 500, maxHeight: .infinity) | ||
| 36 | .padding(.horizontal, 28) | ||
| 37 | .transition(.asymmetric(insertion: .move(edge: .trailing), removal: .move(edge: .leading)).combined(with: .opacity)) | ||
| 38 | .id(step) | ||
| 39 | HStack(spacing: 8) { | ||
| 40 | ForEach(Step.allCases, id: \.self) { s in | ||
| 41 | Circle().fill(s == step ? Color.accentColor : Color.secondary.opacity(0.3)).frame(width: 7, height: 7) | ||
| 42 | } | ||
| 43 | } | ||
| 44 | .accessibilityElement(children: .ignore) | ||
| 45 | .accessibilityLabel("Step \(step.rawValue + 1) of \(Step.allCases.count)") | ||
| 46 | .padding(.bottom, 12) | ||
| 47 | } | ||
| 48 | .tint(model.theme.accentColor) | ||
| 49 | .fileImporter(isPresented: $importing, allowedContentTypes: [.folder]) { result in | ||
| 50 | guard case .success(let url) = result else { return } | ||
| 51 | // Kept for the bookmark; WorkspaceRoot resolves it with access again at launch. | ||
| 52 | _ = url.startAccessingSecurityScopedResource() | ||
| 53 | Task { | ||
| 54 | do { | ||
| 55 | try await workspace.addRoot(url) | ||
| 56 | problem = nil | ||
| 57 | next() | ||
| 58 | } catch { | ||
| 59 | problem = "Can't add \(url.lastPathComponent): \(error.localizedDescription)" | ||
| 60 | } | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | private var welcome: some View { | ||
| 66 | page(symbol: "star.fill", title: "Welcome to orgstar", text: "Your org files on iPhone, in the folders where they already are.") { | ||
| 67 | VStack(alignment: .leading, spacing: 18) { | ||
| 68 | feature("calendar", "The agenda", "Scheduled entries, deadlines and TODOs from all your files.") | ||
| 69 | feature("hand.tap", "Tap to edit", "Change an entry's state, dates, tags and notes in place. Swipe to finish or reschedule.") | ||
| 70 | feature("square.and.pencil", "Capture", "Your capture templates, from the app, the share sheet, widgets and the watch.") | ||
| 71 | } | ||
| 72 | .padding(.top, 8) | ||
| 73 | } actions: { | ||
| 74 | primary("Continue") { next() } | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | private var folder: some View { | ||
| 79 | page(symbol: "folder.fill", title: "Choose your org folder", | ||
| 80 | text: "Pick the folder that holds your org files, in iCloud Drive or another provider. orgstar reads and writes them there; nothing is copied.") { | ||
| 81 | if let problem { Text(problem).font(.footnote).foregroundStyle(.red).multilineTextAlignment(.center) } | ||
| 82 | } actions: { | ||
| 83 | primary("Choose Folder") { importing = true } | ||
| 84 | secondary("Later") { next() } | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | private var notifications: some View { | ||
| 89 | page(symbol: "bell.badge.fill", title: "Notifications", | ||
| 90 | text: "orgstar can notify you before timed entries, as Org's appointment reminders do, and show today's overdue count on its icon.") { | ||
| 91 | EmptyView() | ||
| 92 | } actions: { | ||
| 93 | primary("Allow Notifications") { | ||
| 94 | Task { | ||
| 95 | _ = try? await UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) | ||
| 96 | next() | ||
| 97 | } | ||
| 98 | } | ||
| 99 | secondary("Not Now") { | ||
| 100 | // Off, so the agenda doesn't ask later; Settings turns it back on. | ||
| 101 | model.set("reminders", to: .bool(false)) | ||
| 102 | next() | ||
| 103 | } | ||
| 104 | } | ||
| 105 | } | ||
| 106 | |||
| 107 | private var calendar: some View { | ||
| 108 | page(symbol: "calendar.badge.clock", title: "Calendar events", | ||
| 109 | text: "Show events from Calendar among your agenda's entries. You can choose which calendars in Settings.") { | ||
| 110 | EmptyView() | ||
| 111 | } actions: { | ||
| 112 | primary("Show Calendar Events") { | ||
| 113 | Task { | ||
| 114 | if await model.calendarEvents.requestAccess() { model.set("calendarEvents", to: .bool(true)) } | ||
| 115 | next() | ||
| 116 | } | ||
| 117 | } | ||
| 118 | secondary("Not Now") { next() } | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | private var reminders: some View { | ||
| 123 | page(symbol: "checklist", title: "Reminders app", | ||
| 124 | text: "Show incomplete reminders with a due date from the Reminders app in your agenda, read-only.") { | ||
| 125 | EmptyView() | ||
| 126 | } actions: { | ||
| 127 | primary("Show Reminders") { | ||
| 128 | Task { | ||
| 129 | if await model.reminderLists.requestAccess() { model.set("agendaReminders", to: .bool(true)) } | ||
| 130 | next() | ||
| 131 | } | ||
| 132 | } | ||
| 133 | secondary("Not Now") { next() } | ||
| 134 | } | ||
| 135 | } | ||
| 136 | |||
| 137 | private func next() { | ||
| 138 | guard let following = Step(rawValue: step.rawValue + 1) else { | ||
| 139 | model.reloadConfig() | ||
| 140 | finish() | ||
| 141 | return | ||
| 142 | } | ||
| 143 | withAnimation(.snappy) { step = following } | ||
| 144 | } | ||
| 145 | |||
| 146 | // MARK: - Layout | ||
| 147 | |||
| 148 | private func page<Content: View, Actions: View>( | ||
| 149 | symbol: String, title: LocalizedStringKey, text: LocalizedStringKey, | ||
| 150 | @ViewBuilder content: () -> Content, @ViewBuilder actions: () -> Actions | ||
| 151 | ) -> some View { | ||
| 152 | VStack(spacing: 20) { | ||
| 153 | Spacer(minLength: 24) | ||
| 154 | Image(systemName: symbol) | ||
| 155 | .font(.system(size: 44, weight: .semibold)) | ||
| 156 | .foregroundStyle(Color.accentColor) | ||
| 157 | .frame(width: 96, height: 96) | ||
| 158 | .background(Color.accentColor.opacity(0.12), in: Circle()) | ||
| 159 | .accessibilityHidden(true) | ||
| 160 | Text(title).font(.title.bold()).multilineTextAlignment(.center) | ||
| 161 | Text(text).font(.body).foregroundStyle(.secondary).multilineTextAlignment(.center) | ||
| 162 | content() | ||
| 163 | Spacer(minLength: 24) | ||
| 164 | VStack(spacing: 12) { actions() } | ||
| 165 | } | ||
| 166 | } | ||
| 167 | |||
| 168 | private func feature(_ symbol: String, _ title: LocalizedStringKey, _ text: LocalizedStringKey) -> some View { | ||
| 169 | HStack(alignment: .top, spacing: 14) { | ||
| 170 | Image(systemName: symbol).font(.title2).foregroundStyle(Color.accentColor).frame(width: 32) | ||
| 171 | VStack(alignment: .leading, spacing: 2) { | ||
| 172 | Text(title).font(.headline) | ||
| 173 | Text(text).font(.subheadline).foregroundStyle(.secondary) | ||
| 174 | } | ||
| 175 | } | ||
| 176 | } | ||
| 177 | |||
| 178 | private func primary(_ title: LocalizedStringKey, action: @escaping () -> Void) -> some View { | ||
| 179 | Button(action: action) { | ||
| 180 | Text(title).font(.body.weight(.semibold)).frame(maxWidth: .infinity, minHeight: 50) | ||
| 181 | } | ||
| 182 | .buttonStyle(.borderedProminent) | ||
| 183 | .buttonBorderShape(.capsule) | ||
| 184 | } | ||
| 185 | |||
| 186 | private func secondary(_ title: LocalizedStringKey, action: @escaping () -> Void) -> some View { | ||
| 187 | Button(title, action: action) | ||
| 188 | .font(.body.weight(.medium)) | ||
| 189 | .frame(minHeight: 44) | ||
| 190 | } | ||
| 191 | } | ||
| 192 | #endif | ||
Sources/OrgstarMobile/OrgstarMobileApp.swift +28 −4
| @@ -119,6 +119,8 @@ struct RootView: View { | |||
| 119 | @State private var showingClockReport = false | 119 | @State private var showingClockReport = false |
| 120 | @State private var message: String? | 120 | @State private var message: String? |
| 121 | @Environment(\.scenePhase) private var scenePhase | 121 | @Environment(\.scenePhase) private var scenePhase |
| 122 | @AppStorage(OnboardingScreen.doneKey) private var onboarded = false | ||
| 123 | @State private var onboarding = false | ||
| 122 | 124 | ||
| 123 | private var session: DocumentSession { model.session } | 125 | private var session: DocumentSession { model.session } |
| 124 | 126 | ||
| @@ -129,6 +131,8 @@ struct RootView: View { | |||
| 129 | let workspace: WorkspaceModel | 131 | let workspace: WorkspaceModel |
| 130 | let agenda: AgendaModel | 132 | let agenda: AgendaModel |
| 131 | let active: Bool | 133 | let active: Bool |
| 134 | /// Notifications and badges ask for permission, which onboarding asks for first. | ||
| 135 | let onboarded: Bool | ||
| 132 | let hour: Int | 136 | let hour: Int |
| 133 | 137 | ||
| 134 | private var session: DocumentSession { model.session } | 138 | private var session: DocumentSession { model.session } |
| @@ -137,8 +141,8 @@ struct RootView: View { | |||
| 137 | Color.clear | 141 | Color.clear |
| 138 | // Reminders follow the files, the settings, coming back to the app and the hour. | 142 | // Reminders follow the files, the settings, coming back to the app and the hour. |
| 139 | .task(id: ReminderKey(hidden: HiddenFolders.shared.all, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, | 143 | .task(id: ReminderKey(hidden: HiddenFolders.shared.all, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, |
| 140 | settings: model.settingsVersion, active: active, hour: hour)) { | 144 | settings: model.settingsVersion, active: active, onboarded: onboarded, hour: hour)) { |
| 141 | guard active else { return } | 145 | guard active, onboarded else { return } |
| 142 | try? await Task.sleep(for: .seconds(1)) | 146 | try? await Task.sleep(for: .seconds(1)) |
| 143 | // After the agenda's refresh, whose parsed files these share. | 147 | // After the agenda's refresh, whose parsed files these share. |
| 144 | while agenda.isComputing, !Task.isCancelled { try? await Task.sleep(for: .milliseconds(100)) } | 148 | while agenda.isComputing, !Task.isCancelled { try? await Task.sleep(for: .milliseconds(100)) } |
| @@ -167,6 +171,7 @@ struct RootView: View { | |||
| 167 | var edits: Int | 171 | var edits: Int |
| 168 | var settings: Int | 172 | var settings: Int |
| 169 | var active: Bool | 173 | var active: Bool |
| 174 | var onboarded: Bool | ||
| 170 | var hour: Int | 175 | var hour: Int |
| 171 | } | 176 | } |
| 172 | 177 | ||
| @@ -194,7 +199,26 @@ struct RootView: View { | |||
| 194 | .clockAccessory(model.clock, perform: clock) | 199 | .clockAccessory(model.clock, perform: clock) |
| 195 | .tint(model.theme.accentColor) | 200 | .tint(model.theme.accentColor) |
| 196 | // Until a folder is added there is nothing for the agenda to show. | 201 | // Until a folder is added there is nothing for the agenda to show. |
| 197 | .onAppear { if workspace.rootPaths.isEmpty { tab = .folders } } | 202 | .onAppear { |
| 203 | if workspace.rootPaths.isEmpty { tab = .folders } | ||
| 204 | // First launch only; a workspace from before onboarding existed skips it. | ||
| 205 | guard !onboarded else { return } | ||
| 206 | if workspace.rootPaths.isEmpty, ProcessInfo.processInfo.environment["ORGSTAR_ROOT"] == nil { | ||
| 207 | var transaction = Transaction() | ||
| 208 | transaction.disablesAnimations = true | ||
| 209 | withTransaction(transaction) { onboarding = true } | ||
| 210 | } else { | ||
| 211 | onboarded = true | ||
| 212 | } | ||
| 213 | } | ||
| 214 | .fullScreenCover(isPresented: $onboarding) { | ||
| 215 | OnboardingScreen(model: model, workspace: workspace) { | ||
| 216 | onboarding = false | ||
| 217 | onboarded = true | ||
| 218 | if !workspace.rootPaths.isEmpty { tab = .agenda } | ||
| 219 | } | ||
| 220 | .interactiveDismissDisabled() | ||
| 221 | } | ||
| 198 | .sheet(item: Binding(get: { model.clockPrompts.pending }, set: { if $0 == nil { model.clockPrompts.answer(nil) } })) { pending in | 222 | .sheet(item: Binding(get: { model.clockPrompts.pending }, set: { if $0 == nil { model.clockPrompts.answer(nil) } })) { pending in |
| 199 | ClockPromptSheet(prompt: pending.prompt) { model.clockPrompts.answer($0) } | 223 | ClockPromptSheet(prompt: pending.prompt) { model.clockPrompts.answer($0) } |
| 200 | } | 224 | } |
| @@ -282,7 +306,7 @@ struct RootView: View { | |||
| 282 | hour += 1 | 306 | hour += 1 |
| 283 | } | 307 | } |
| 284 | } | 308 | } |
| 285 | .background { BackgroundWork(model: model, workspace: workspace, agenda: agenda, active: scenePhase == .active, hour: hour) } | 309 | .background { BackgroundWork(model: model, workspace: workspace, agenda: agenda, active: scenePhase == .active, onboarded: onboarded, hour: hour) } |
| 286 | .onContinueUserActivity(CSSearchableItemActionType) { activity in | 310 | .onContinueUserActivity(CSSearchableItemActionType) { activity in |
| 287 | if let path = activity.userInfo?[CSSearchableItemActivityIdentifier] as? String { model.openRequest = .file(path) } | 311 | if let path = activity.userInfo?[CSSearchableItemActivityIdentifier] as? String { model.openRequest = .file(path) } |
| 288 | } | 312 | } |
Tests/OrgCoreTests/EntryFieldsTests.swift added +85
| @@ -0,0 +1,85 @@ | |||
| 1 | import Foundation | ||
| 2 | import Testing | ||
| 3 | @testable import OrgCore | ||
| 4 | |||
| 5 | struct EntryFieldsTests { | ||
| 6 | static let text = """ | ||
| 7 | * TODO [#A] Call bank :work:home: | ||
| 8 | SCHEDULED: <2026-10-17 Sat 18:00> DEADLINE: <2026-10-20 Tue> | ||
| 9 | :PROPERTIES: | ||
| 10 | :ID: x | ||
| 11 | :END: | ||
| 12 | :LOGBOOK: | ||
| 13 | CLOCK: [2026-10-16 Fri 09:00]--[2026-10-16 Fri 09:30] => 0:30 | ||
| 14 | :END: | ||
| 15 | Line one | ||
| 16 | Line two | ||
| 17 | |||
| 18 | ** Child | ||
| 19 | child body | ||
| 20 | |||
| 21 | """ | ||
| 22 | |||
| 23 | @Test func readsTheHeadingPlanningAndNotes() throws { | ||
| 24 | let fields = try #require(EntryFields.read(Self.text, at: 0, settings: .default)) | ||
| 25 | #expect(fields.todo == "TODO") | ||
| 26 | #expect(fields.priority == "A") | ||
| 27 | #expect(fields.title == "Call bank") | ||
| 28 | #expect(fields.tags == ["work", "home"]) | ||
| 29 | #expect(fields.scheduled == "2026-10-17 Sat 18:00") | ||
| 30 | #expect(fields.deadline == "2026-10-20 Tue") | ||
| 31 | #expect(fields.notes == "Line one\nLine two") | ||
| 32 | } | ||
| 33 | |||
| 34 | @Test func readsAPlainHeading() throws { | ||
| 35 | let fields = try #require(EntryFields.read("* Just a title\n", at: 0, settings: .default)) | ||
| 36 | #expect(fields == EntryFields(todo: nil, priority: nil, title: "Just a title", tags: [], scheduled: nil, deadline: nil, notes: "")) | ||
| 37 | #expect(EntryFields.read("no heading\n", at: 0, settings: .default) == nil) | ||
| 38 | } | ||
| 39 | |||
| 40 | @Test func setsTheTitleKeepingKeywordCookieAndTags() { | ||
| 41 | let result = runCommand(SetHeadingTitle(title: "Call the bank"), Self.text, caret: 0) | ||
| 42 | #expect(result.failure == nil) | ||
| 43 | let line = result.text.prefix { $0 != "\n" } | ||
| 44 | #expect(line.hasPrefix("* TODO [#A] Call the bank ")) | ||
| 45 | #expect(line.hasSuffix(" :work:home:")) | ||
| 46 | #expect(runCommand(SetHeadingTitle(title: "Named"), "* TODO\nbody\n", caret: 0).text == "* TODO Named\nbody\n") | ||
| 47 | #expect(runCommand(SetHeadingTitle(title: " Trimmed "), "* Old\n", caret: 0).text == "* Trimmed\n") | ||
| 48 | #expect(runCommand(SetHeadingTitle(title: "Two\nlines\n"), "* Old\n", caret: 0).text == "* Two lines\n") | ||
| 49 | } | ||
| 50 | |||
| 51 | @Test func replacesNotesKeepingMetaDataAndChildren() { | ||
| 52 | let result = runCommand(SetEntryNotes(notes: "New note\n\n"), Self.text, caret: 0) | ||
| 53 | #expect(result.failure == nil) | ||
| 54 | #expect(result.text == Self.text.replacingOccurrences(of: "Line one\nLine two\n", with: "New note\n")) | ||
| 55 | let cleared = runCommand(SetEntryNotes(notes: ""), Self.text, caret: 0).text | ||
| 56 | #expect(cleared == Self.text.replacingOccurrences(of: "Line one\nLine two\n", with: "")) | ||
| 57 | } | ||
| 58 | |||
| 59 | @Test func addsNotesWhereThereWereNone() { | ||
| 60 | #expect(runCommand(SetEntryNotes(notes: "Body"), "* A\n* B\n", caret: 0).text == "* A\nBody\n* B\n") | ||
| 61 | #expect(runCommand(SetEntryNotes(notes: "Body"), "* A", caret: 0).text == "* A\nBody\n") | ||
| 62 | #expect(runCommand(SetEntryNotes(notes: "Body"), "* A\nSCHEDULED: <2026-10-17 Sat>\n", caret: 0).text == "* A\nSCHEDULED: <2026-10-17 Sat>\nBody\n") | ||
| 63 | } | ||
| 64 | } | ||
| 65 | |||
| 66 | struct ReplaceChangedTextTests { | ||
| 67 | @Test func writesTheDifferenceAsOneEdit() throws { | ||
| 68 | let old = "* TODO Call bank\nbody\n* Next\n" | ||
| 69 | let new = "* DONE Call bank\nbody\nmore\n* Next\n" | ||
| 70 | let command = try #require(ReplaceChangedText(from: old, to: new)) | ||
| 71 | #expect(command.edit.range == 2..<21) | ||
| 72 | #expect(runCommand(command, old, caret: 0).text == new) | ||
| 73 | #expect(ReplaceChangedText(from: old, to: old) == nil) | ||
| 74 | } | ||
| 75 | |||
| 76 | @Test func refusesTextThatChangedSince() throws { | ||
| 77 | let command = try #require(ReplaceChangedText(from: "* TODO A\n", to: "* DONE A\n")) | ||
| 78 | #expect(runCommand(command, "* WAIT A\n", caret: 0).failure != nil) | ||
| 79 | } | ||
| 80 | |||
| 81 | @Test func keepsSurrogatePairsWhole() throws { | ||
| 82 | let command = try #require(ReplaceChangedText(from: "* 😀\n", to: "* 😃\n")) | ||
| 83 | #expect(runCommand(command, "* 😀\n", caret: 0).text == "* 😃\n") | ||
| 84 | } | ||
| 85 | } | ||
Tests/OrgPresentationTests/AgendaRowsTests.swift +11 −4
| @@ -31,6 +31,11 @@ struct AgendaRowsTests { | |||
| 31 | :PROPERTIES: | 31 | :PROPERTIES: |
| 32 | :STYLE: habit | 32 | :STYLE: habit |
| 33 | :END: | 33 | :END: |
| 34 | * TODO Walk dog | ||
| 35 | SCHEDULED: <2026-10-03 Sat 18:00 .+1d> | ||
| 36 | :PROPERTIES: | ||
| 37 | :STYLE: habit | ||
| 38 | :END: | ||
| 34 | * Far off | 39 | * Far off |
| 35 | <2026-10-11 Sun> | 40 | <2026-10-11 Sun> |
| 36 | """ | 41 | """ |
| @@ -79,7 +84,10 @@ struct AgendaRowsTests { | |||
| 79 | check("Dentist", "13:50–14:30", .normal, .timestamp) | 84 | check("Dentist", "13:50–14:30", .normal, .timestamp) |
| 80 | check("Birthday", "All day", .normal, .timestamp) | 85 | check("Birthday", "All day", .normal, .timestamp) |
| 81 | check("Conference", "Day 2/3", .normal, .timestamp) | 86 | check("Conference", "Day 2/3", .normal, .timestamp) |
| 82 | check("Stretch", "Habit", .overdue, .habit) | 87 | check("Stretch", "1d ago", .overdue, .habit) |
| 88 | // An earlier day's time says nothing about today. | ||
| 89 | check("Walk dog", "2d ago", .overdue, .habit) | ||
| 90 | #expect(rows["Walk dog"]?.start == nil) | ||
| 83 | #expect(rows["Dentist"]?.start == 1350 && rows["Dentist"]?.end == 1430) | 91 | #expect(rows["Dentist"]?.start == 1350 && rows["Dentist"]?.end == 1430) |
| 84 | let rent = rows["Pay rent"]! | 92 | let rent = rows["Pay rent"]! |
| 85 | #expect(rent.category == "life" && rent.tags == ["home"] && rent.todo == "TODO" && rent.priority == "B" && rent.progress == "0/2") | 93 | #expect(rent.category == "life" && rent.tags == ["home"] && rent.todo == "TODO" && rent.priority == "B" && rent.progress == "0/2") |
| @@ -125,9 +133,8 @@ struct AgendaRowsTests { | |||
| 125 | 133 | ||
| 126 | @Test func overdueEntriesGroupAboveTodayOldestFirst() { | 134 | @Test func overdueEntriesGroupAboveTodayOldestFirst() { |
| 127 | let today = AgendaRows.groups(Self.days(), today: Self.today)[0] | 135 | let today = AgendaRows.groups(Self.days(), today: Self.today)[0] |
| 128 | #expect(today.overdue.map(\.title) == ["Ancient chore", "Pay rent", "Send forms"]) | 136 | #expect(today.overdue.map(\.title) == ["Ancient chore", "Pay rent", "Send forms", "Walk dog", "Stretch"]) |
| 129 | #expect(!today.rows.contains { $0.status == .overdue && $0.icon != .habit }) | 137 | #expect(!today.rows.contains { $0.status == .overdue }) |
| 130 | #expect(today.rows.contains { $0.title == "Stretch" }) | ||
| 131 | #expect(Set(today.rows.map(\.id)).count == today.rows.count) | 138 | #expect(Set(today.rows.map(\.id)).count == today.rows.count) |
| 132 | } | 139 | } |
| 133 | 140 | ||
docs/manual/guide/07-agenda.org +2 −2
| @@ -116,7 +116,7 @@ The entries follow =org-agenda-get-day-entries= with Org's default entry types. | |||
| 116 | | Repeating timestamp =<… +1w>= | On each occurrence within the span | =All day= | | 116 | | Repeating timestamp =<… +1w>= | On each occurrence within the span | =All day= | |
| 117 | | Date range =<…>--<…>= | On every day of the range | =Day 2/5= (day 2 of 5) | | 117 | | Date range =<…>--<…>= | On every day of the range | =Day 2/5= (day 2 of 5) | |
| 118 | | Diary sexp =%%(…)= line or =<%%(…)>= | On each day the sexp applies; see [[*Diary sexps][Diary sexps]] | =All day= | | 118 | | Diary sexp =%%(…)= line or =<%%(…)>= | On each day the sexp applies; see [[*Diary sexps][Diary sexps]] | =All day= | |
| 119 | | Habit (=STYLE: habit=) | On today only, while not done, unless habits only today is off; see [[*Habits][Habits]] | =Habit=, with a consistency graph | | 119 | | Habit (=STYLE: habit=) | On today only, while not done, unless habits only today is off; see [[*Habits][Habits]]; in the Overdue group when scheduled on an earlier day | =Habit=, or =2d ago= when overdue, with a consistency graph | |
| 120 | 120 | ||
| 121 | An entry with a time of day shows the time instead of the status: =08:00=, or =13:50–14:30= with an end time. | 121 | An entry with a time of day shows the time instead of the status: =08:00=, or =13:50–14:30= with an end time. |
| 122 | 122 | ||
| @@ -139,7 +139,7 @@ Days without entries are left out. Today always shows, with =Nothing scheduled= | |||
| 139 | org-agenda-show-all-dates = true | 139 | org-agenda-show-all-dates = true |
| 140 | #+END_SRC | 140 | #+END_SRC |
| 141 | 141 | ||
| 142 | Today's past deadlines and entries scheduled on earlier days, habits excepted, go in a group headed =Overdue= with their count, above today's other entries. The oldest date comes first; entries with the same date keep Org's order. Click or tap the header to collapse or expand the group; it stays as you left it. | 142 | Today's past deadlines and entries and habits scheduled on earlier days go in a group headed =Overdue= with their count, above today's other entries; on iOS it is a section of its own above today. Their left column shows how late they are, not the time of day they had. The oldest date comes first; entries with the same date keep Org's order. Click or tap the header to collapse or expand the group; it stays as you left it. |
| 143 | 143 | ||
| 144 | Days with a time grid show dotted lines at the grid's times among the timed entries, as =org-agenda-time-grid= does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry. An entry at a grid line's time comes before the line. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in =[org-agenda-time-grid]= in =config.toml=, =org-agenda-use-time-grid= turns the grid off, and =org-agenda-show-current-time-in-grid= the now line (see [[file:13-configuration.org][Configuration]]). With the grid off there is no now line, as in Org. | 144 | Days with a time grid show dotted lines at the grid's times among the timed entries, as =org-agenda-time-grid= does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry. An entry at a grid line's time comes before the line. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in =[org-agenda-time-grid]= in =config.toml=, =org-agenda-use-time-grid= turns the grid off, and =org-agenda-show-current-time-in-grid= the now line (see [[file:13-configuration.org][Configuration]]). With the grid off there is no now line, as in Org. |
| 145 | 145 | ||
docs/manual/guide/14-ios.org +4 −4
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | * Overview | 5 | * Overview |
| 6 | 6 | ||
| 7 | The app has three tabs, and opens on Folders until a folder has been added: | 7 | On first launch, a few screens introduce the app, ask for the folder of org files, and offer notifications, Calendar events and Reminders; each permission is asked for only when you choose it, and every one can be changed later in Settings. The app has three tabs, and opens on Folders until a folder has been added: |
| 8 | 8 | ||
| 9 | - Agenda :: the agenda over your folders, with capture. | 9 | - Agenda :: the agenda over your folders, with capture. |
| 10 | - Folders :: the folders of org files you added. Each shows its subfolders and org files; tap a subfolder to open it. | 10 | - Folders :: the folders of org files you added. Each shows its subfolders and org files; tap a subfolder to open it. |
| @@ -33,7 +33,7 @@ There is no way to open a single file from the Files app. Add the folder that co | |||
| 33 | 33 | ||
| 34 | * The reader | 34 | * The reader |
| 35 | 35 | ||
| 36 | Tap a file in Folders, Search or the agenda to read it. | 36 | Tap a file in Folders or Search, or Open in File in an agenda entry's sheet, to read it. |
| 37 | 37 | ||
| 38 | - Tap a heading to fold or unfold it, as =TAB= cycles it on the Mac. A chevron marks headings with content. | 38 | - Tap a heading to fold or unfold it, as =TAB= cycles it on the Mac. A chevron marks headings with content. |
| 39 | - The file opens with the visibility its =#+STARTUP= line asks for, then each heading's =VISIBILITY= property when =#+STARTUP= sets a visibility. Drawers and blocks are folded as =org-cycle-hide-drawer-startup= and =org-cycle-hide-block-startup= say, or as the file's =#+STARTUP= says (=hidedrawers=, =nohideblocks= and the like). Tap a folded drawer's first line or its =…= to open it, and the first line again to fold it. | 39 | - The file opens with the visibility its =#+STARTUP= line asks for, then each heading's =VISIBILITY= property when =#+STARTUP= sets a visibility. Drawers and blocks are folded as =org-cycle-hide-drawer-startup= and =org-cycle-hide-block-startup= say, or as the file's =#+STARTUP= says (=hidedrawers=, =nohideblocks= and the like). Tap a folded drawer's first line or its =…= to open it, and the first line again to fold it. |
| @@ -186,14 +186,14 @@ Tap a result to open it in the reader. A heading result opens at that heading. | |||
| 186 | 186 | ||
| 187 | * The agenda | 187 | * The agenda |
| 188 | 188 | ||
| 189 | The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a group of their own, and a line marks the current time between timed entries. Pull down to refresh. | 189 | The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a section of their own above today, and a line marks the current time between timed entries. Pull down to refresh. |
| 190 | 190 | ||
| 191 | - Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=). | 191 | - Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=). |
| 192 | - Folders (top right, with more than one folder) :: shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in [[file:07-agenda.org][The agenda]]). | 192 | - Folders (top right, with more than one folder) :: shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in [[file:07-agenda.org][The agenda]]). |
| 193 | - The bar at the bottom :: Earlier, Filter, Today, Go to Date, the span (Day, Week, Month or the configured span, and Log Mode, which adds closed entries and clocked time) and Later. | 193 | - The bar at the bottom :: Earlier, Filter, Today, Go to Date, the span (Day, Week, Month or the configured span, and Log Mode, which adds closed entries and clocked time) and Later. |
| 194 | - Filter :: keep or leave out tags and categories of the entries shown, or type a filter as Org's =/= takes it: =+keep= and =-drop= tags or categories, =<0:30= for effort, =/regexp/=. The filter in use shows above the bar. | 194 | - Filter :: keep or leave out tags and categories of the entries shown, or type a filter as Org's =/= takes it: =+keep= and =-drop= tags or categories, =<0:30= for effort, =/regexp/=. The filter in use shows above the bar. |
| 195 | - + on a day's header :: captures an entry scheduled on that day (see [[file:08-capture.org][Capture]]). | 195 | - + on a day's header :: captures an entry scheduled on that day (see [[file:08-capture.org][Capture]]). |
| 196 | - Tap :: an entry to read it, at its heading. | 196 | - Tap :: an entry to open it in a sheet: its title, TODO state, priority, scheduled date, deadline, tags and notes. Changes use the same commands as the editor and are written to the file together on Done, or dropped on Cancel; Undo and Redo step through them. More ▸ Open in File saves and shows the entry in the reader. |
| 197 | - Swipe left :: on a TODO entry for Done, which sets the first done keyword of its sequence, or Next State; on any entry with a heading for Delete, which asks first. | 197 | - Swipe left :: on a TODO entry for Done, which sets the first done keyword of its sequence, or Next State; on any entry with a heading for Delete, which asks first. |
| 198 | - Swipe right :: for Tomorrow, Next Week (next Monday) or Pick Date, which move the entry's scheduled date, or its deadline on a deadline row. | 198 | - Swipe right :: for Tomorrow, Next Week (next Monday) or Pick Date, which move the entry's scheduled date, or its deadline on a deadline row. |
| 199 | - Touch and hold :: an entry for TODO State…, Reschedule, Schedule…, Deadline…, Tags…, Priority…, Clock In, Add to Calendar…, Refile…, Archive…, and Delete…. Delete… removes the heading and every line under it, after asking. Refile… lists each file and the headings in it down to level 3, as the Mac's prompt does; the entry goes to the end of the file, or under the heading, you choose. Search narrows the list by file and heading path. | 199 | - Touch and hold :: an entry for TODO State…, Reschedule, Schedule…, Deadline…, Tags…, Priority…, Clock In, Add to Calendar…, Refile…, Archive…, and Delete…. Delete… removes the heading and every line under it, after asking. Refile… lists each file and the headings in it down to level 3, as the Mac's prompt does; the entry goes to the end of the file, or under the heading, you choose. Search narrows the list by file and heading path. |
l10n/Localizable.xcstrings +306
| @@ -342,6 +342,16 @@ | |||
| 342 | } | 342 | } |
| 343 | } | 343 | } |
| 344 | }, | 344 | }, |
| 345 | "Add notes": { | ||
| 346 | "localizations": { | ||
| 347 | "de": { | ||
| 348 | "stringUnit": { | ||
| 349 | "state": "translated", | ||
| 350 | "value": "Notizen hinzufügen" | ||
| 351 | } | ||
| 352 | } | ||
| 353 | } | ||
| 354 | }, | ||
| 345 | "Add the folder your org files are in, from iCloud Drive or another app's storage.": { | 355 | "Add the folder your org files are in, from iCloud Drive or another app's storage.": { |
| 346 | "localizations": { | 356 | "localizations": { |
| 347 | "de": { | 357 | "de": { |
| @@ -502,6 +512,16 @@ | |||
| 502 | } | 512 | } |
| 503 | } | 513 | } |
| 504 | }, | 514 | }, |
| 515 | "Allow Notifications": { | ||
| 516 | "localizations": { | ||
| 517 | "de": { | ||
| 518 | "stringUnit": { | ||
| 519 | "state": "translated", | ||
| 520 | "value": "Mitteilungen erlauben" | ||
| 521 | } | ||
| 522 | } | ||
| 523 | } | ||
| 524 | }, | ||
| 505 | "Allow orgstar to read your calendars in System Settings ▸ Privacy & Security ▸ Calendars.": { | 525 | "Allow orgstar to read your calendars in System Settings ▸ Privacy & Security ▸ Calendars.": { |
| 506 | "localizations": { | 526 | "localizations": { |
| 507 | "de": { | 527 | "de": { |
| @@ -848,6 +868,26 @@ | |||
| 848 | } | 868 | } |
| 849 | } | 869 | } |
| 850 | }, | 870 | }, |
| 871 | "Calendar events": { | ||
| 872 | "localizations": { | ||
| 873 | "de": { | ||
| 874 | "stringUnit": { | ||
| 875 | "state": "translated", | ||
| 876 | "value": "Kalenderereignisse" | ||
| 877 | } | ||
| 878 | } | ||
| 879 | } | ||
| 880 | }, | ||
| 881 | "Can't open the entry": { | ||
| 882 | "localizations": { | ||
| 883 | "de": { | ||
| 884 | "stringUnit": { | ||
| 885 | "state": "translated", | ||
| 886 | "value": "Der Eintrag kann nicht geöffnet werden" | ||
| 887 | } | ||
| 888 | } | ||
| 889 | } | ||
| 890 | }, | ||
| 851 | "Can't open the index": { | 891 | "Can't open the index": { |
| 852 | "localizations": { | 892 | "localizations": { |
| 853 | "de": { | 893 | "de": { |
| @@ -968,6 +1008,16 @@ | |||
| 968 | } | 1008 | } |
| 969 | } | 1009 | } |
| 970 | }, | 1010 | }, |
| 1011 | "Change an entry's state, dates, tags and notes in place. Swipe to finish or reschedule.": { | ||
| 1012 | "localizations": { | ||
| 1013 | "de": { | ||
| 1014 | "stringUnit": { | ||
| 1015 | "state": "translated", | ||
| 1016 | "value": "Status, Termine, Tags und Notizen eines Eintrags direkt ändern. Wischen, um ihn abzuschließen oder zu verschieben." | ||
| 1017 | } | ||
| 1018 | } | ||
| 1019 | } | ||
| 1020 | }, | ||
| 971 | "Changes apply to this occurrence only.": { | 1021 | "Changes apply to this occurrence only.": { |
| 972 | "localizations": { | 1022 | "localizations": { |
| 973 | "de": { | 1023 | "de": { |
| @@ -1038,6 +1088,16 @@ | |||
| 1038 | } | 1088 | } |
| 1039 | } | 1089 | } |
| 1040 | }, | 1090 | }, |
| 1091 | "Choose Folder": { | ||
| 1092 | "localizations": { | ||
| 1093 | "de": { | ||
| 1094 | "stringUnit": { | ||
| 1095 | "state": "translated", | ||
| 1096 | "value": "Ordner wählen" | ||
| 1097 | } | ||
| 1098 | } | ||
| 1099 | } | ||
| 1100 | }, | ||
| 1041 | "Choose Folder…": { | 1101 | "Choose Folder…": { |
| 1042 | "localizations": { | 1102 | "localizations": { |
| 1043 | "de": { | 1103 | "de": { |
| @@ -1078,6 +1138,16 @@ | |||
| 1078 | } | 1138 | } |
| 1079 | } | 1139 | } |
| 1080 | }, | 1140 | }, |
| 1141 | "Choose your org folder": { | ||
| 1142 | "localizations": { | ||
| 1143 | "de": { | ||
| 1144 | "stringUnit": { | ||
| 1145 | "state": "translated", | ||
| 1146 | "value": "Org-Ordner wählen" | ||
| 1147 | } | ||
| 1148 | } | ||
| 1149 | } | ||
| 1150 | }, | ||
| 1081 | "Choose…": { | 1151 | "Choose…": { |
| 1082 | "localizations": { | 1152 | "localizations": { |
| 1083 | "de": { | 1153 | "de": { |
| @@ -1324,6 +1394,16 @@ | |||
| 1324 | } | 1394 | } |
| 1325 | } | 1395 | } |
| 1326 | }, | 1396 | }, |
| 1397 | "Collapsed": { | ||
| 1398 | "localizations": { | ||
| 1399 | "de": { | ||
| 1400 | "stringUnit": { | ||
| 1401 | "state": "translated", | ||
| 1402 | "value": "Eingeklappt" | ||
| 1403 | } | ||
| 1404 | } | ||
| 1405 | } | ||
| 1406 | }, | ||
| 1327 | "Colors": { | 1407 | "Colors": { |
| 1328 | "localizations": { | 1408 | "localizations": { |
| 1329 | "de": { | 1409 | "de": { |
| @@ -1544,6 +1624,16 @@ | |||
| 1544 | } | 1624 | } |
| 1545 | } | 1625 | } |
| 1546 | }, | 1626 | }, |
| 1627 | "D: %@": { | ||
| 1628 | "localizations": { | ||
| 1629 | "de": { | ||
| 1630 | "stringUnit": { | ||
| 1631 | "state": "translated", | ||
| 1632 | "value": "F: %@" | ||
| 1633 | } | ||
| 1634 | } | ||
| 1635 | } | ||
| 1636 | }, | ||
| 1547 | "Daily Notes": { | 1637 | "Daily Notes": { |
| 1548 | "localizations": { | 1638 | "localizations": { |
| 1549 | "de": { | 1639 | "de": { |
| @@ -1814,6 +1904,26 @@ | |||
| 1814 | } | 1904 | } |
| 1815 | } | 1905 | } |
| 1816 | }, | 1906 | }, |
| 1907 | "Discard Changes": { | ||
| 1908 | "localizations": { | ||
| 1909 | "de": { | ||
| 1910 | "stringUnit": { | ||
| 1911 | "state": "translated", | ||
| 1912 | "value": "Änderungen verwerfen" | ||
| 1913 | } | ||
| 1914 | } | ||
| 1915 | } | ||
| 1916 | }, | ||
| 1917 | "Discard your changes?": { | ||
| 1918 | "localizations": { | ||
| 1919 | "de": { | ||
| 1920 | "stringUnit": { | ||
| 1921 | "state": "translated", | ||
| 1922 | "value": "Änderungen verwerfen?" | ||
| 1923 | } | ||
| 1924 | } | ||
| 1925 | } | ||
| 1926 | }, | ||
| 1817 | "Done": { | 1927 | "Done": { |
| 1818 | "localizations": { | 1928 | "localizations": { |
| 1819 | "de": { | 1929 | "de": { |
| @@ -2169,6 +2279,16 @@ | |||
| 2169 | } | 2279 | } |
| 2170 | } | 2280 | } |
| 2171 | }, | 2281 | }, |
| 2282 | "Expanded": { | ||
| 2283 | "localizations": { | ||
| 2284 | "de": { | ||
| 2285 | "stringUnit": { | ||
| 2286 | "state": "translated", | ||
| 2287 | "value": "Ausgeklappt" | ||
| 2288 | } | ||
| 2289 | } | ||
| 2290 | } | ||
| 2291 | }, | ||
| 2172 | "Export": { | 2292 | "Export": { |
| 2173 | "localizations": { | 2293 | "localizations": { |
| 2174 | "de": { | 2294 | "de": { |
| @@ -3412,6 +3532,16 @@ | |||
| 3412 | } | 3532 | } |
| 3413 | } | 3533 | } |
| 3414 | }, | 3534 | }, |
| 3535 | "No State": { | ||
| 3536 | "localizations": { | ||
| 3537 | "de": { | ||
| 3538 | "stringUnit": { | ||
| 3539 | "state": "translated", | ||
| 3540 | "value": "Kein Status" | ||
| 3541 | } | ||
| 3542 | } | ||
| 3543 | } | ||
| 3544 | }, | ||
| 3415 | "No agenda files": { | 3545 | "No agenda files": { |
| 3416 | "localizations": { | 3546 | "localizations": { |
| 3417 | "de": { | 3547 | "de": { |
| @@ -3573,6 +3703,16 @@ | |||
| 3573 | } | 3703 | } |
| 3574 | } | 3704 | } |
| 3575 | }, | 3705 | }, |
| 3706 | "No priority": { | ||
| 3707 | "localizations": { | ||
| 3708 | "de": { | ||
| 3709 | "stringUnit": { | ||
| 3710 | "state": "translated", | ||
| 3711 | "value": "Keine Priorität" | ||
| 3712 | } | ||
| 3713 | } | ||
| 3714 | } | ||
| 3715 | }, | ||
| 3576 | "None": { | 3716 | "None": { |
| 3577 | "localizations": { | 3717 | "localizations": { |
| 3578 | "de": { | 3718 | "de": { |
| @@ -3663,6 +3803,16 @@ | |||
| 3663 | } | 3803 | } |
| 3664 | } | 3804 | } |
| 3665 | }, | 3805 | }, |
| 3806 | "Notifications": { | ||
| 3807 | "localizations": { | ||
| 3808 | "de": { | ||
| 3809 | "stringUnit": { | ||
| 3810 | "state": "translated", | ||
| 3811 | "value": "Mitteilungen" | ||
| 3812 | } | ||
| 3813 | } | ||
| 3814 | } | ||
| 3815 | }, | ||
| 3666 | "Notify before timed agenda entries": { | 3816 | "Notify before timed agenda entries": { |
| 3667 | "localizations": { | 3817 | "localizations": { |
| 3668 | "de": { | 3818 | "de": { |
| @@ -3773,6 +3923,16 @@ | |||
| 3773 | } | 3923 | } |
| 3774 | } | 3924 | } |
| 3775 | }, | 3925 | }, |
| 3926 | "Open in File": { | ||
| 3927 | "localizations": { | ||
| 3928 | "de": { | ||
| 3929 | "stringUnit": { | ||
| 3930 | "state": "translated", | ||
| 3931 | "value": "In Datei öffnen" | ||
| 3932 | } | ||
| 3933 | } | ||
| 3934 | } | ||
| 3935 | }, | ||
| 3776 | "Open orgstar": { | 3936 | "Open orgstar": { |
| 3777 | "localizations": { | 3937 | "localizations": { |
| 3778 | "de": { | 3938 | "de": { |
| @@ -4029,6 +4189,16 @@ | |||
| 4029 | } | 4189 | } |
| 4030 | } | 4190 | } |
| 4031 | }, | 4191 | }, |
| 4192 | "Pick the folder that holds your org files, in iCloud Drive or another provider. orgstar reads and writes them there; nothing is copied.": { | ||
| 4193 | "localizations": { | ||
| 4194 | "de": { | ||
| 4195 | "stringUnit": { | ||
| 4196 | "state": "translated", | ||
| 4197 | "value": "Wähle den Ordner mit deinen Org-Dateien, in iCloud Drive oder bei einem anderen Anbieter. orgstar liest und schreibt sie dort; nichts wird kopiert." | ||
| 4198 | } | ||
| 4199 | } | ||
| 4200 | } | ||
| 4201 | }, | ||
| 4032 | "Plot": { | 4202 | "Plot": { |
| 4033 | "localizations": { | 4203 | "localizations": { |
| 4034 | "de": { | 4204 | "de": { |
| @@ -4249,6 +4419,16 @@ | |||
| 4249 | } | 4419 | } |
| 4250 | } | 4420 | } |
| 4251 | }, | 4421 | }, |
| 4422 | "Redo": { | ||
| 4423 | "localizations": { | ||
| 4424 | "de": { | ||
| 4425 | "stringUnit": { | ||
| 4426 | "state": "translated", | ||
| 4427 | "value": "Wiederholen" | ||
| 4428 | } | ||
| 4429 | } | ||
| 4430 | } | ||
| 4431 | }, | ||
| 4252 | "Refile…": { | 4432 | "Refile…": { |
| 4253 | "localizations": { | 4433 | "localizations": { |
| 4254 | "de": { | 4434 | "de": { |
| @@ -4319,6 +4499,16 @@ | |||
| 4319 | } | 4499 | } |
| 4320 | } | 4500 | } |
| 4321 | }, | 4501 | }, |
| 4502 | "Reminders app": { | ||
| 4503 | "localizations": { | ||
| 4504 | "de": { | ||
| 4505 | "stringUnit": { | ||
| 4506 | "state": "translated", | ||
| 4507 | "value": "Erinnerungen-App" | ||
| 4508 | } | ||
| 4509 | } | ||
| 4510 | } | ||
| 4511 | }, | ||
| 4322 | "Remove": { | 4512 | "Remove": { |
| 4323 | "localizations": { | 4513 | "localizations": { |
| 4324 | "de": { | 4514 | "de": { |
| @@ -4499,6 +4689,16 @@ | |||
| 4499 | } | 4689 | } |
| 4500 | } | 4690 | } |
| 4501 | }, | 4691 | }, |
| 4692 | "S: %@": { | ||
| 4693 | "localizations": { | ||
| 4694 | "de": { | ||
| 4695 | "stringUnit": { | ||
| 4696 | "state": "translated", | ||
| 4697 | "value": "G: %@" | ||
| 4698 | } | ||
| 4699 | } | ||
| 4700 | } | ||
| 4701 | }, | ||
| 4502 | "Same as Font": { | 4702 | "Same as Font": { |
| 4503 | "localizations": { | 4703 | "localizations": { |
| 4504 | "de": { | 4704 | "de": { |
| @@ -4569,6 +4769,16 @@ | |||
| 4569 | } | 4769 | } |
| 4570 | } | 4770 | } |
| 4571 | }, | 4771 | }, |
| 4772 | "Schedule": { | ||
| 4773 | "localizations": { | ||
| 4774 | "de": { | ||
| 4775 | "stringUnit": { | ||
| 4776 | "state": "translated", | ||
| 4777 | "value": "Planen" | ||
| 4778 | } | ||
| 4779 | } | ||
| 4780 | } | ||
| 4781 | }, | ||
| 4572 | "Scheduled": { | 4782 | "Scheduled": { |
| 4573 | "localizations": { | 4783 | "localizations": { |
| 4574 | "de": { | 4784 | "de": { |
| @@ -4589,6 +4799,16 @@ | |||
| 4589 | } | 4799 | } |
| 4590 | } | 4800 | } |
| 4591 | }, | 4801 | }, |
| 4802 | "Scheduled entries, deadlines and TODOs from all your files.": { | ||
| 4803 | "localizations": { | ||
| 4804 | "de": { | ||
| 4805 | "stringUnit": { | ||
| 4806 | "state": "translated", | ||
| 4807 | "value": "Geplante Einträge, Fristen und TODOs aus all deinen Dateien." | ||
| 4808 | } | ||
| 4809 | } | ||
| 4810 | } | ||
| 4811 | }, | ||
| 4592 | "Schedule…": { | 4812 | "Schedule…": { |
| 4593 | "localizations": { | 4813 | "localizations": { |
| 4594 | "de": { | 4814 | "de": { |
| @@ -4919,6 +5139,16 @@ | |||
| 4919 | } | 5139 | } |
| 4920 | } | 5140 | } |
| 4921 | }, | 5141 | }, |
| 5142 | "Show events from Calendar among your agenda's entries. You can choose which calendars in Settings.": { | ||
| 5143 | "localizations": { | ||
| 5144 | "de": { | ||
| 5145 | "stringUnit": { | ||
| 5146 | "state": "translated", | ||
| 5147 | "value": "Ereignisse aus Kalender zwischen den Einträgen deiner Agenda zeigen. Welche Kalender, wählst du in den Einstellungen." | ||
| 5148 | } | ||
| 5149 | } | ||
| 5150 | } | ||
| 5151 | }, | ||
| 4922 | "Show events from Calendar in the agenda.": { | 5152 | "Show events from Calendar in the agenda.": { |
| 4923 | "localizations": { | 5153 | "localizations": { |
| 4924 | "de": { | 5154 | "de": { |
| @@ -4969,6 +5199,16 @@ | |||
| 4969 | } | 5199 | } |
| 4970 | } | 5200 | } |
| 4971 | }, | 5201 | }, |
| 5202 | "Show incomplete reminders with a due date from the Reminders app in your agenda, read-only.": { | ||
| 5203 | "localizations": { | ||
| 5204 | "de": { | ||
| 5205 | "stringUnit": { | ||
| 5206 | "state": "translated", | ||
| 5207 | "value": "Offene Erinnerungen mit Fälligkeitsdatum aus der Erinnerungen-App in deiner Agenda zeigen, schreibgeschützt." | ||
| 5208 | } | ||
| 5209 | } | ||
| 5210 | } | ||
| 5211 | }, | ||
| 4972 | "Show or Hide Backlinks": { | 5212 | "Show or Hide Backlinks": { |
| 4973 | "localizations": { | 5213 | "localizations": { |
| 4974 | "de": { | 5214 | "de": { |
| @@ -5149,6 +5389,22 @@ | |||
| 5149 | } | 5389 | } |
| 5150 | } | 5390 | } |
| 5151 | }, | 5391 | }, |
| 5392 | "Step %lld of %lld": { | ||
| 5393 | "localizations": { | ||
| 5394 | "de": { | ||
| 5395 | "stringUnit": { | ||
| 5396 | "state": "translated", | ||
| 5397 | "value": "Schritt %1$lld von %2$lld" | ||
| 5398 | } | ||
| 5399 | }, | ||
| 5400 | "en": { | ||
| 5401 | "stringUnit": { | ||
| 5402 | "state": "new", | ||
| 5403 | "value": "Step %1$lld of %2$lld" | ||
| 5404 | } | ||
| 5405 | } | ||
| 5406 | } | ||
| 5407 | }, | ||
| 5152 | "Stop Timer": { | 5408 | "Stop Timer": { |
| 5153 | "localizations": { | 5409 | "localizations": { |
| 5154 | "de": { | 5410 | "de": { |
| @@ -5393,6 +5649,16 @@ | |||
| 5393 | } | 5649 | } |
| 5394 | } | 5650 | } |
| 5395 | }, | 5651 | }, |
| 5652 | "Tap to edit": { | ||
| 5653 | "localizations": { | ||
| 5654 | "de": { | ||
| 5655 | "stringUnit": { | ||
| 5656 | "state": "translated", | ||
| 5657 | "value": "Zum Bearbeiten tippen" | ||
| 5658 | } | ||
| 5659 | } | ||
| 5660 | } | ||
| 5661 | }, | ||
| 5396 | "Template": { | 5662 | "Template": { |
| 5397 | "localizations": { | 5663 | "localizations": { |
| 5398 | "de": { | 5664 | "de": { |
| @@ -5443,6 +5709,16 @@ | |||
| 5443 | } | 5709 | } |
| 5444 | } | 5710 | } |
| 5445 | }, | 5711 | }, |
| 5712 | "The agenda": { | ||
| 5713 | "localizations": { | ||
| 5714 | "de": { | ||
| 5715 | "stringUnit": { | ||
| 5716 | "state": "translated", | ||
| 5717 | "value": "Die Agenda" | ||
| 5718 | } | ||
| 5719 | } | ||
| 5720 | } | ||
| 5721 | }, | ||
| 5446 | "The agenda reads the org files at the top of each folder you add.": { | 5722 | "The agenda reads the org files at the top of each folder you add.": { |
| 5447 | "localizations": { | 5723 | "localizations": { |
| 5448 | "de": { | 5724 | "de": { |
| @@ -5987,6 +6263,16 @@ | |||
| 5987 | } | 6263 | } |
| 5988 | } | 6264 | } |
| 5989 | }, | 6265 | }, |
| 6266 | "Your capture templates, from the app, the share sheet, widgets and the watch.": { | ||
| 6267 | "localizations": { | ||
| 6268 | "de": { | ||
| 6269 | "stringUnit": { | ||
| 6270 | "state": "translated", | ||
| 6271 | "value": "Deine Erfassungsvorlagen, in der App, im Teilen-Menü, in Widgets und auf der Watch." | ||
| 6272 | } | ||
| 6273 | } | ||
| 6274 | } | ||
| 6275 | }, | ||
| 5990 | "Your habits and how consistently you've kept them.": { | 6276 | "Your habits and how consistently you've kept them.": { |
| 5991 | "localizations": { | 6277 | "localizations": { |
| 5992 | "de": { | 6278 | "de": { |
| @@ -5997,6 +6283,16 @@ | |||
| 5997 | } | 6283 | } |
| 5998 | } | 6284 | } |
| 5999 | }, | 6285 | }, |
| 6286 | "Your org files on iPhone, in the folders where they already are.": { | ||
| 6287 | "localizations": { | ||
| 6288 | "de": { | ||
| 6289 | "stringUnit": { | ||
| 6290 | "state": "translated", | ||
| 6291 | "value": "Deine Org-Dateien auf dem iPhone, in den Ordnern, in denen sie schon liegen." | ||
| 6292 | } | ||
| 6293 | } | ||
| 6294 | } | ||
| 6295 | }, | ||
| 6000 | "Your own bindings go in %@, on top of the preset.": { | 6296 | "Your own bindings go in %@, on top of the preset.": { |
| 6001 | "localizations": { | 6297 | "localizations": { |
| 6002 | "de": { | 6298 | "de": { |
| @@ -6076,6 +6372,16 @@ | |||
| 6076 | } | 6372 | } |
| 6077 | } | 6373 | } |
| 6078 | }, | 6374 | }, |
| 6375 | "orgstar can notify you before timed entries, as Org's appointment reminders do, and show today's overdue count on its icon.": { | ||
| 6376 | "localizations": { | ||
| 6377 | "de": { | ||
| 6378 | "stringUnit": { | ||
| 6379 | "state": "translated", | ||
| 6380 | "value": "orgstar kann dich vor Einträgen mit Uhrzeit benachrichtigen, wie Orgs Terminerinnerungen, und die Zahl der heute überfälligen Einträge auf dem Symbol zeigen." | ||
| 6381 | } | ||
| 6382 | } | ||
| 6383 | } | ||
| 6384 | }, | ||
| 6079 | "orgstar edits a folder of plain-text org files in place. Add the folder your notes are in, or start a new one. Nothing is copied or moved, and you can add more folders later with File ▸ Add Folder….": { | 6385 | "orgstar edits a folder of plain-text org files in place. Add the folder your notes are in, or start a new one. Nothing is copied or moved, and you can add more folders later with File ▸ Add Folder….": { |
| 6080 | "localizations": { | 6386 | "localizations": { |
| 6081 | "de": { | 6387 | "de": { |