Commit 3191c129ca

3191c129ca5c91d95f0675eb7ae26f1a551be7f6

parent: 07c7646a1e

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-22 21:18 UTC

iOS: Redo on Undo's long press, the only-pane message, one orgstar+ marker

Close Pane with one pane says so instead of doing nothing. Every paid
item in the Export menu ends in "(orgstar+)" while it is locked.

Ref #222

Layout: unified · split

Changed files (5)
Sources/OrgstarMobile/EditorScreen.swift +16 −9 · view
@@ -23,8 +23,8 @@ struct EditorScreen: View {
2323 var isFocused = true
2424 /// Focus came to this screen's pane.
2525 var onFocus: () -> Void = {}
26 /// The pane commands (`app.split-right` …), which the split runs.
27 var onPaneCommand: ((String) -> Void)? = nil
26 /// The pane commands (`app.split-right` …), which the split runs; returns why one did nothing.
27 var onPaneCommand: ((String) -> String?)? = nil
2828 @State private var editor: MobileEditor?
2929 /// This screen's view of the editor.
3030 @State private var textView: UITextView?
@@ -133,7 +133,14 @@ struct EditorScreen: View {
133133 if pane?.conflict != nil {
134134 Button("Conflict", systemImage: "exclamationmark.triangle") { sheet = .conflict }
135135 }
136 Button("Undo", systemImage: "arrow.uturn.backward") { editor?.run("edit.undo") }
136 // Redo on a long press, as the system's back buttons offer history.
137 Menu {
138 Button("Redo", systemImage: "arrow.uturn.forward") { editor?.run("edit.redo") }
139 } label: {
140 Label("Undo", systemImage: "arrow.uturn.backward")
141 } primaryAction: {
142 editor?.run("edit.undo")
143 }
137144 Menu("More", systemImage: "ellipsis.circle") {
138145 Button("Commands", systemImage: "command") { sheet = .palette }
139146 Button("Word Count", systemImage: "textformat.123") { message = wordCount() }
@@ -196,12 +203,12 @@ struct EditorScreen: View {
196203 Button("Recovered Versions", systemImage: "clock.arrow.circlepath") { sheet = .recovery }
197204 if onPaneCommand != nil, sizeClass == .regular {
198205 Menu("Panes", systemImage: "rectangle.split.2x1") {
199 Button("Split Pane Right", systemImage: "rectangle.split.2x1") { onPaneCommand?("app.split-right") }
200 Button("Split Pane Below", systemImage: "rectangle.split.1x2") { onPaneCommand?("app.split-below") }
206 Button("Split Pane Right", systemImage: "rectangle.split.2x1") { _ = onPaneCommand?("app.split-right") }
207 Button("Split Pane Below", systemImage: "rectangle.split.1x2") { _ = onPaneCommand?("app.split-below") }
201208 if inSplit {
202 Button("Next Pane", systemImage: "arrow.right.square") { onPaneCommand?("app.pane-next") }
203 Button("Close Pane", systemImage: "xmark.square") { onPaneCommand?("app.pane-close") }
204 Button("Close Other Panes", systemImage: "square") { onPaneCommand?("app.pane-only") }
209 Button("Next Pane", systemImage: "arrow.right.square") { _ = onPaneCommand?("app.pane-next") }
210 Button("Close Pane", systemImage: "xmark.square") { _ = onPaneCommand?("app.pane-close") }
211 Button("Close Other Panes", systemImage: "square") { _ = onPaneCommand?("app.pane-only") }
205212 }
206213 }
207214 }
@@ -471,7 +478,7 @@ struct EditorScreen: View {
471478 editor.onAppCommand = { id in
472479 if let feature = ProFeature.required(byCommand: id), !ProAccess.shared.allows(feature) { return }
473480 if Self.paneCommands.contains(id) {
474 if let onPaneCommand { onPaneCommand(id) } else { message = MobileEditor.unavailable(command: id) }
481 if let onPaneCommand { if let text = onPaneCommand(id) { message = text } } else { message = MobileEditor.unavailable(command: id) }
475482 } else if id == "app.save" {
476483 _ = session.save(path)
477484 } else if id == "app.archive" {
Sources/OrgstarMobile/EditorSplitScreen.swift +3 −3 · view
@@ -37,7 +37,7 @@ final class EditorSplit {
3737
3838 var isSplit: Bool { layout.panes.count > 1 }
3939
40 /// Runs a pane command; false when it does nothing here.
40 /// Runs a pane command; returns why it did nothing, or nil.
4141 func run(_ id: String, session: DocumentSession, store: MobileEditorStore) -> String? {
4242 switch id {
4343 case "app.split-right", "app.split-below":
@@ -49,7 +49,7 @@ final class EditorSplit {
4949 case "app.pane-next":
5050 focused = layout.next(after: focused)
5151 case "app.pane-close":
52 guard isSplit else { return "Attempt to delete the only pane" }
52 guard isSplit else { return String(localized: "This is the only pane.", comment: "Close Pane with one pane") }
5353 close(focused, session: session, store: store)
5454 case "app.pane-only":
5555 for id in layout.panes where id != focused { close(id, session: session, store: store) }
@@ -105,7 +105,7 @@ struct EditorSplitScreen: View {
105105 path: file, offset: id == split.layout.panes.first ? offset : nil, workspace: workspace, session: session,
106106 givenPane: pane, inSplit: split.isSplit, isFocused: split.focused == id,
107107 onFocus: { split.focused = id },
108 onPaneCommand: { command in _ = split.run(command, session: session, store: model.editors) }
108 onPaneCommand: { split.run($0, session: session, store: model.editors) }
109109 )
110110 .id(id)
111111 .overlay(alignment: .top) {
Sources/OrgstarMobile/ExportMenu.swift +6 −2 · view
@@ -197,7 +197,7 @@ struct ExportMenu: View {
197197 if let calendars = AgendaCalendars(model: model) {
198198 Divider()
199199 if OrgExport.Format.icalendar.locked {
200 Button("Agenda Files to iCalendar (orgstar+)") { ProAccess.shared.allows(.export) }
200 Button("\(String(localized: "Export Agenda Files to iCalendar")) (orgstar+)", systemImage: "calendar") { ProAccess.shared.allows(.export) }
201201 } else {
202202 Button("Export Agenda Files to iCalendar", systemImage: "calendar") { report(calendars.exportEach()) }
203203 ShareLink(item: calendars, preview: SharePreview(calendars.fileName)) {
@@ -206,7 +206,11 @@ struct ExportMenu: View {
206206 }
207207 }
208208 Divider()
209 Button("Copy as Rich Text", systemImage: "doc.on.doc") { if ProAccess.shared.allows(.export) { report(Self.copy(path: path, text: text, theme: model.theme)) } }
209 if ProAccess.shared.isUnlocked {
210 Button("Copy as Rich Text", systemImage: "doc.on.doc") { report(Self.copy(path: path, text: text, theme: model.theme)) }
211 } else {
212 Button("\(String(localized: "Copy as Rich Text")) (orgstar+)", systemImage: "doc.on.doc") { ProAccess.shared.allows(.export) }
213 }
210214 }
211215 }
212216
docs/manual/guide/14-ios.org +3 −3 · view
@@ -51,7 +51,7 @@ The editor folds headings, drawers and blocks (tap a fold's =…= to open it, an
5151The toolbar has:
5252
5353- Conflict :: shown while the file and your edits conflict; opens the conflict sheet.
54- Undo
54- Undo :: touch and hold it for Redo.
5555- More :: Commands, Clock In, Show Markup, Recent Entries, Export, Sync Conflict Copies, and Recovered Versions.
5656
5757Messages from commands show at the top of the editor, and at the bottom of the reader, for a few seconds; tap one to dismiss it. VoiceOver reads each message as it appears.
@@ -70,7 +70,7 @@ On iPad, the editor can show a file in several panes, as a Mac window does (see
7070
7171The focused pane has a line along its top and the toolbar acts on it; tap in a pane to focus it. Every pane shows the same buffer: text typed in one shows in the others at once, and folds, narrowing and styles are the buffer's. The caret and scroll position are each pane's own, and so is undo: Undo in a pane undoes what was typed or changed in that pane. A link to another file opens it on its own screen, leaving the panes as they are.
7272
73Each iPad window (scene), opened from the app switcher or by dragging the app from the Dock, has its own tabs, screens and panes over the same open files, so a file edited in one window shows the edit in the others. The pane commands aren't offered on iPhone or in a narrow window.
73Each iPad window (scene), opened from the app switcher or by dragging the app from the Dock, has its own tabs, screens and panes over the same open files, so a file edited in one window shows the edit in the others. The pane commands aren't offered on iPhone or in a narrow window. Close Pane with one pane says "This is the only pane."
7474
7575** Saving
7676
@@ -339,7 +339,7 @@ PDF export follows =pdf-margin=, =pdf-font= and =pdf-page-numbers= in =config.to
339339
340340Body Only in the Export menu leaves out the title and the page around the text in HTML, Markdown, LaTeX and Plain Text (ASCII), and is kept for each file; the other formats say they have no body-only export while it is on. Export Subtree…, in the editor's Export menu, shares the subtree at the caret in any of the formats.
341341
342The Export menu also has Export Agenda Files to iCalendar, which writes an =.ics= beside each agenda file, and Combine Agenda Files into iCalendar, which shares one calendar of them all. Commands has these, Copy as Rich Text, and Export to HTML and Open, which shows the HTML export in Quick Look.
342The Export menu also has Export Agenda Files to iCalendar, which writes an =.ics= beside each agenda file, and Combine Agenda Files into iCalendar, which shares one calendar of them all. Commands has these, Copy as Rich Text, and Export to HTML and Open, which shows the HTML export in Quick Look. Without orgstar+, the Export menu's items that need it end in "(orgstar+)" and open the orgstar+ screen.
343343
344344Publishing works from Commands as on the Mac, with the =[[publish]]= projects in =config.toml=. A project that publishes outside your folders asks for a folder the first time, and uses it from then on. See [[file:12-export.org][Export]].
345345
l10n/Localizable.xcstrings +35 −34 · view
@@ -3180,40 +3180,6 @@
31803180 }
31813181 }
31823182 },
3183 "Agenda Files to iCalendar (orgstar+)": {
3184 "localizations": {
3185 "de": {
3186 "stringUnit": {
3187 "state": "translated",
3188 "value": "Agenda-Dateien nach iCalendar (orgstar+)"
3189 }
3190 },
3191 "es": {
3192 "stringUnit": {
3193 "state": "translated",
3194 "value": "Archivos de agenda a iCalendar (orgstar+)"
3195 }
3196 },
3197 "fr": {
3198 "stringUnit": {
3199 "state": "translated",
3200 "value": "Fichiers d'agenda vers iCalendar (orgstar+)"
3201 }
3202 },
3203 "ja": {
3204 "stringUnit": {
3205 "state": "translated",
3206 "value": "アジェンダファイルをiCalendarに書き出す(orgstar+)"
3207 }
3208 },
3209 "pt-BR": {
3210 "stringUnit": {
3211 "state": "translated",
3212 "value": "Arquivos da Agenda para iCalendar (orgstar+)"
3213 }
3214 }
3215 }
3216 },
32173183 "Agenda clear": {
32183184 "localizations": {
32193185 "de": {
@@ -36880,6 +36846,41 @@
3688036846 }
3688136847 }
3688236848 },
36849 "This is the only pane.": {
36850 "comment": "Close Pane with one pane",
36851 "localizations": {
36852 "de": {
36853 "stringUnit": {
36854 "state": "translated",
36855 "value": "Dies ist der einzige Bereich."
36856 }
36857 },
36858 "es": {
36859 "stringUnit": {
36860 "state": "translated",
36861 "value": "Este es el único panel."
36862 }
36863 },
36864 "fr": {
36865 "stringUnit": {
36866 "state": "translated",
36867 "value": "C'est le seul volet."
36868 }
36869 },
36870 "ja": {
36871 "stringUnit": {
36872 "state": "translated",
36873 "value": "ペインはこれだけです。"
36874 }
36875 },
36876 "pt-BR": {
36877 "stringUnit": {
36878 "state": "translated",
36879 "value": "Este é o único painel."
36880 }
36881 }
36882 }
36883 },
3688336884 "This sqlite block can't run here: %@.": {
3688436885 "comment": "An sqlite block refused before it ran",
3688536886 "localizations": {
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