Commit 796bcfb8 authored by Kourser's avatar Kourser
Browse files

1.3.0: dated journal titles, Pages browser, configurable shortcuts

- A new journal entry starts with today's date as its title instead of
  offering an empty title; an untouched entry is neither published nor
  kept as a draft.
- Sidebar: Tags, Collections and Recent entries (Mac) collapse, with the
  state remembered; Linux gets collapsible Workspace, Tags, Collections.
- Pages: on Mac, selecting Pages or a folder shows its folders and pages
  as a grid, file-manager style, instead of an empty column; Linux uses
  the same grid.
- Obsidian-style keyboard shortcuts, configurable in Settings > Keyboard
  shortcuts on Mac and Linux; on Mac the Format menu carries the Markdown
  commands.
- Linux: Visual / raw Markdown switch and an editing toolbar that stays
  visible while a long note scrolls.
- Debug builds accept launch arguments to open a section, a command or a
  settings category, for screen checks.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 22b14943
Loading
Loading
Loading
Loading
+52 −5
Changes for App/Features/Journal/JournalComposeView.swift: 52 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -57,6 +57,10 @@ struct JournalComposeView: View {
    @State private var showsAttachmentSidebar = true
    #endif
    @State private var text = ""
    /// Ce que l'éditeur a écrit lui-même dans une note neuve (la date du jour
    /// en titre, la question choisie) : tant que rien d'autre n'est écrit, la
    /// note reste vide et n'est pas publiée.
    @State private var seededText: String?
    @State private var markdownEditor = JournalEditorController()
    @State private var markdownPreview = false
    @State private var photo: Data?
@@ -193,7 +197,7 @@ struct JournalComposeView: View {
            if usesToolbarTools { markdownToolbar }
            #endif
            ZStack(alignment: .topLeading) {
                JournalWritingCanvas(text: $text, editor: markdownEditor, rawMarkdown: markdownEditor.rawMarkdown, photo: photo, photoFilename: "\((editing?.id ?? draftID).uuidString.lowercased()).jpg", images: attachedImages, focusRequest: focusRequest) { editingText = usesToolbarTools ? false : $0 }
                JournalWritingCanvas(text: $text, editor: markdownEditor, rawMarkdown: markdownEditor.rawMarkdown, photo: photo, photoFilename: "\((editing?.id ?? draftID).uuidString.lowercased()).jpg", images: attachedImages, focusRequest: focusRequest, cursorAtEndOnFocus: seededText != nil && text == seededText) { editingText = usesToolbarTools ? false : $0 }
                    .disabled(!draftReady)
                    .opacity(markdownPreview ? 0 : 1)
                    .allowsHitTesting(!markdownPreview)
@@ -312,6 +316,11 @@ struct JournalComposeView: View {
        .focusedSceneValue(\.journalFindCommand, JournalCommand { markdownEditor.find() })
        .focusedSceneValue(\.journalExportCommand, editing != nil && !hasChanges ? JournalCommand(perform: exportPage) : nil)
        .focusedSceneValue(\.journalRecordCommand, draftReady && !saving && audioContext == nil && !showCamera && !showHandwriting ? JournalCommand(perform: startVoice) : nil)
        .focusedSceneValue(\.journalEditorCommand, draftReady ? JournalEditorCommand(apply: { shortcut in
            markdownEditor.apply(MarkdownAction(shortcut))
        }, toggleMode: {
            markdownEditor.resign(); markdownEditor.rawMarkdown.toggle(); markdownPreview = false
        }) : nil)
        #endif
        #if !os(macOS)
        // La zone d'écriture est un `UITextView` : `placement: .keyboard` ne
@@ -1045,14 +1054,17 @@ struct JournalComposeView: View {
        .disabled(!draftReady || loadingPhoto || loadingAttachments || !vault.configurationReadable)
    }

    private var hasContent: Bool { !text.isEmpty || photo != nil || place != nil || handwriting != nil || audio != nil || !attachments.isEmpty || knowledge.board?.cards.isEmpty == false }
    /// Le texte écrit par l'utilisateur, sans ce que l'éditeur a amorcé.
    private var writtenText: String { text == seededText ? "" : text }

    private var hasContent: Bool { !writtenText.isEmpty || photo != nil || place != nil || handwriting != nil || audio != nil || !attachments.isEmpty || knowledge.board?.cards.isEmpty == false }

    /// Une entrée sans tag ni collection n'en porte aucune trace sur le disque.
    /// Une photo seule, une note manuscrite seule ou un enregistrement seul
    /// valent un souvenir : exiger du texte renvoyait un bouton grisé sans rien
    /// dire.
    private var hasSomethingToSave: Bool {
        !text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
        !writtenText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
            || handwriting != nil || audio != nil || photo != nil || !attachments.isEmpty || knowledge.board?.cards.isEmpty == false
    }

@@ -1234,8 +1246,10 @@ struct JournalComposeView: View {
    private func preserveDraft() {
        guard draftReady, !closingForLock,
              vault.configurationReadable else { return }
        // Un titre amorcé seul (la date du jour) ne vaut pas brouillon : la
        // session efface alors le brouillon au lieu de le garder.
        draftSession.update(JournalDraft(id: draftID, sourceFilename: originalEditing?.filename,
                                        createdAt: entryDate, text: text, photo: photo, extraPhotos: extraPhotos, attachments: attachments, knowledge: knowledge, place: place, handwriting: handwriting, audio: audio, document: document,
                                        createdAt: entryDate, text: writtenText, photo: photo, extraPhotos: extraPhotos, attachments: attachments, knowledge: knowledge, place: place, handwriting: handwriting, audio: audio, document: document,
                                        organization: storedOrganization),
)
        scheduleAutosave()
@@ -1320,7 +1334,19 @@ struct JournalComposeView: View {
                organization = draft.organization ?? organization
            }
            guard !Task.isCancelled else { return }
            if let prompt, text.isEmpty, editing == nil { text = prompt + "\n\n" }
            if text.isEmpty, editing == nil {
                // Une entrée du journal prend la date du jour pour titre, sans
                // proposer de « Titre » à remplir ; une page garde le sien.
                if (document?.kind ?? .journal) == .journal {
                    let day = entryDate.formatted(.dateTime.weekday(.wide).day().month(.wide).year().locale(AppLanguage.locale))
                    text = day.prefix(1).uppercased() + day.dropFirst() + "\n\n" + (prompt.map { $0 + "\n\n" } ?? "")
                    seededText = text
                    focusRequest += 1
                } else if let prompt {
                    text = prompt + "\n\n"
                    seededText = text
                }
            }
            draftReady = true
        } catch {
            errorMessage = String(localized: "Le brouillon ne peut pas être repris. Ouvrez le coffre ou réessayez ; il reste conservé sur cet appareil.", bundle: AppLanguage.bundle, locale: AppLanguage.locale)
@@ -1556,3 +1582,24 @@ struct JournalComposeView: View {
    }

}

extension MarkdownAction {
    /// L'action Markdown d'un raccourci clavier (Réglages › Raccourcis).
    init(_ shortcut: MarkdownShortcut) {
        switch shortcut {
        case .heading(let level): self = .heading(level)
        case .bold: self = .bold
        case .italic: self = .italic
        case .strike: self = .strike
        case .inlineCode: self = .inlineCode
        case .link: self = .link
        case .bullet: self = .bullet
        case .numbered: self = .numbered
        case .task: self = .task
        case .toggleTask: self = .toggleTask
        case .quote: self = .quote
        case .indent: self = .indent
        case .outdent: self = .outdent
        }
    }
}
+9 −1
Changes for App/Features/Journal/JournalWritingCanvas.swift: 9 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ struct JournalWritingCanvas: UIViewRepresentable {
    var photoFilename: String?
    var images: [String: Data] = [:]
    var focusRequest: Int = 0
    /// Une note neuve dont l'éditeur a écrit le titre : on écrit à la suite.
    var cursorAtEndOnFocus = false
    var onEditingChanged: (Bool) -> Void = { _ in }
    @Environment(\.dynamicTypeSize) private var dynamicTypeSize

@@ -224,7 +226,13 @@ struct JournalWritingCanvas: UIViewRepresentable {
        view.isEditable = context.environment.isEnabled
        if context.coordinator.lastFocusRequest != focusRequest {
            context.coordinator.lastFocusRequest = focusRequest
            if view.isEditable { DispatchQueue.main.async { view.becomeFirstResponder() } }
            if view.isEditable {
                let end = cursorAtEndOnFocus
                DispatchQueue.main.async {
                    view.becomeFirstResponder()
                    if end { view.selectedRange = NSRange(location: view.text.utf16.count, length: 0) }
                }
            }
        }
        context.coordinator.text = $text
        context.coordinator.onEditingChanged = onEditingChanged
+144 −3
Changes for App/Features/LibraryView.swift: 144 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -279,6 +279,14 @@ struct LibraryView: View {
    @State private var anniversaries: [JournalSummary] = []
    @State private var prompt = ""
    @AppStorage(AppPreference.promptsEnabled) private var promptsEnabled = true
    #if os(macOS) && DEBUG
    @Environment(\.openSettings) private var openSettings
    #endif
    // Sections du volet que l'on replie quand elles s'allongent ; l'état est
    // retenu d'un lancement à l'autre.
    @AppStorage("sidebar.tags.expanded") private var tagsExpanded = true
    @AppStorage("sidebar.collections.expanded") private var collectionsExpanded = true
    @AppStorage("sidebar.recent.expanded") private var recentExpanded = true
    private struct VoiceOverviewID: Equatable {
        let memos: [Memo]
        let appLocked: Bool
@@ -510,6 +518,8 @@ struct LibraryView: View {
            .id(file.filename)
        } else if let memo = openedMemo, let model {
            MemoDetailView(memo: memo, model: model).id(memo.id)
        } else if workspaceSection == .pages {
            pagesBrowser
        } else {
            // Rien de choisi : un repère discret plutôt qu'une page blanche.
            // Pas de phrase — elle demanderait une traduction de plus, et le
@@ -525,6 +535,112 @@ struct LibraryView: View {
    }
    #endif

    /// Pages, façon gestionnaire de fichiers : les dossiers et les pages du
    /// dossier choisi, en grille. Un clic ouvre ; le menu contextuel et le
    /// glisser-déposer sont ceux du volet.
    @ViewBuilder private var pagesBrowser: some View {
        let documents = orderedDocuments(in: selectedFolders)
        VStack(alignment: .leading, spacing: 0) {
            HStack(spacing: 6) {
                Button("Pages") { selectWorkspace(.pages) }
                    .buttonStyle(.plain)
                    .fontWeight(selectedFolders.isEmpty ? .semibold : .regular)
                    .onDrop(of: [Self.noteDragType], delegate: dropDelegate([]))
                ForEach(Array(selectedFolders.enumerated()), id: \.element) { index, id in
                    Image(systemName: "chevron.right").font(.caption).foregroundStyle(Color.secondaryText)
                    let path = Array(selectedFolders.prefix(index + 1))
                    Button { selectWorkspace(.pages, folders: path) } label: {
                        Text(verbatim: journalSummaries.first(where: { $0.kind == .folder && $0.file.id == id }).map(sidebarTitle) ?? "…")
                    }
                    .buttonStyle(.plain)
                    .fontWeight(index == selectedFolders.count - 1 ? .semibold : .regular)
                    .onDrop(of: [Self.noteDragType], delegate: dropDelegate(path))
                }
                Spacer()
                Button { askFolder(selectedFolders) } label: { Label("Nouveau dossier", systemImage: "folder.badge.plus") }
                    .disabled(selectedFolders.count >= 12)
                Button { beginPage(folders: selectedFolders) } label: { Label("Nouvelle page", systemImage: "doc.badge.plus") }
                    .buttonStyle(.borderedProminent)
            }
            .padding(.horizontal, 20).padding(.vertical, 12)
            Divider()
            if documents.isEmpty {
                VStack(spacing: 12) {
                    Image(systemName: "folder").font(.system(size: 44, weight: .light))
                        .foregroundStyle(Color.accessibleAccent).accessibilityHidden(true)
                    Text(selectedFolders.isEmpty ? "Aucune page" : "Ce dossier est vide.").journalFont(.title3, weight: .semibold)
                }
                .frame(maxWidth: .infinity, maxHeight: .infinity)
            } else {
                ScrollView {
                    LazyVGrid(columns: [GridItem(.adaptive(minimum: 132, maximum: 170), spacing: 14)], alignment: .leading, spacing: 16) {
                        ForEach(documents, id: \.file.filename) { summary in
                            pagesBrowserTile(summary)
                        }
                    }
                    .padding(20)
                }
                .onDrop(of: [Self.noteDragType], delegate: dropDelegate(selectedFolders))
            }
        }
        .background(JournalBackdrop())
        .accessibilityIdentifier("journal.pages.browser")
    }

    @ViewBuilder private func pagesBrowserTile(_ summary: JournalSummary) -> some View {
        let folder = summary.kind == .folder
        let path = selectedFolders + [summary.file.id]
        let count = folder ? orderedDocuments(in: path).count : 0
        Button {
            if folder { selectWorkspace(.pages, folders: path) } else { openSidebarNote(summary.file) }
        } label: {
            VStack(spacing: 8) {
                Image(systemName: folder ? "folder.fill" : (summary.photoCount > 0 ? "photo" : "doc.text"))
                    .font(.system(size: 40, weight: .light))
                    .foregroundStyle(folder ? Color.accessibleAccent : Color.secondaryText)
                    .frame(height: 48)
                Text(verbatim: sidebarTitle(summary))
                    .lineLimit(2).multilineTextAlignment(.center)
                    .journalFont(.callout, weight: folder ? .semibold : .regular)
                Group {
                    if folder {
                        if count == 0 { Text("Vide") } else { Text("\(count) élément(s)") }
                    } else if let date = summary.updatedAt ?? summary.createdAt {
                        Text(date.formatted(.dateTime.day().month(.abbreviated).year().locale(AppLanguage.locale)))
                    }
                }
                .journalFont(.caption).foregroundStyle(Color.secondaryText)
            }
            .padding(12)
            .frame(maxWidth: .infinity, minHeight: 132)
            .background(RoundedRectangle(cornerRadius: 12).fill(JournalStyle.paper))
            .overlay {
                RoundedRectangle(cornerRadius: 12)
                    .strokeBorder(folder && targetedFolder == path ? Color.accessibleAccent : JournalStyle.border, lineWidth: folder && targetedFolder == path ? 2 : 0.5)
            }
            .contentShape(RoundedRectangle(cornerRadius: 12))
        }
        .buttonStyle(.plain)
        .help(sidebarTitle(summary))
        .onDrag { dragProvider(summary) }
        .modifier(BrowserFolderDrop(enabled: folder, type: Self.noteDragType, delegate: dropDelegate(path)))
        .contextMenu {
            if folder {
                Button("Nouvelle page", systemImage: "doc.badge.plus") { beginPage(folders: path) }
                Button("Nouveau dossier", systemImage: "folder.badge.plus") { askFolder(path) }
                Divider()
                Button("Renommer le dossier", systemImage: "pencil") { askRename(summary) }.disabled(summary.unreadable)
                Button("Déplacer le dossier", systemImage: "folder") { prepareMove(summary) }
                    .disabled(isMoving || summary.hasConflict || summary.unreadable)
                Button("Supprimer le dossier", systemImage: "trash", role: .destructive) { deletingFolder = summary }
                    .disabled(isMoving || summary.hasConflict || summary.unreadable)
            } else {
                pageActions(summary)
            }
        }
        .accessibilityIdentifier(folder ? "journal.pages.browser.folder" : "journal.pages.browser.page")
    }

    @ViewBuilder private var calendarWorkspaceView: some View {
        VStack(spacing: 0) {
            #if !os(macOS)
@@ -639,6 +755,21 @@ struct LibraryView: View {
            // de lui-même quand on sort de ce qu'il a rapatrié.
            calendars.visibleMonth = day
        }
        #if DEBUG
        // Vérification des écrans sans piloter l'interface : un argument de
        // lancement ouvre une section ou déclenche une commande. Absent des
        // versions publiées.
        .task {
            let defaults = UserDefaults.standard
            if defaults.string(forKey: "EnvorennUITestSection") == "pages" { selectWorkspace(.pages) }
            if defaults.string(forKey: "EnvorennUITestAction") == "write" {
                try? await Task.sleep(for: .seconds(1)); performCommand(.write)
            }
            #if os(macOS)
            if defaults.string(forKey: "EnvorennUITestSettings") != nil { openSettings() }
            #endif
        }
        #endif
        .onOpenURL { url in
            // « Ouvrir dans Envorenn » depuis Dictaphone ou Fichiers : rien
            // n'entre dans le coffre sans passer par la revue d'import.
@@ -3144,7 +3275,7 @@ struct LibraryView: View {
            nativeFolderRows([])
        }

        Section {
        Section(isExpanded: $tagsExpanded) {
            if organizationNames.tags.isEmpty {
                Text("Mots-clés associés aux notes.").journalFont(.caption)
                    .foregroundStyle(Color.secondaryText).selectionDisabled()
@@ -3161,7 +3292,7 @@ struct LibraryView: View {
            }
        }

        Section {
        Section(isExpanded: $collectionsExpanded) {
            if organizationNames.collections.isEmpty {
                Text("Regroupez des pages sans les déplacer.").journalFont(.caption)
                    .foregroundStyle(Color.secondaryText).selectionDisabled()
@@ -3179,7 +3310,7 @@ struct LibraryView: View {
            }
        }

        Section("Entrées récentes") {
        Section("Entrées récentes", isExpanded: $recentExpanded) {
            if journalLoading { ProgressView().controlSize(.small).selectionDisabled() }
            if journalSummaries.isEmpty && !journalLoading {
                Text("Aucune note").journalFont(.footnote)
@@ -3199,6 +3330,16 @@ struct LibraryView: View {

    // Volet natif, partagé par le Mac et l'iPad.

    /// Une tuile de dossier reçoit les pages qu'on y dépose ; une tuile de page non.
    private struct BrowserFolderDrop: ViewModifier {
        let enabled: Bool
        let type: String
        let delegate: JournalNoteDropDelegate
        func body(content: Content) -> some View {
            if enabled { content.onDrop(of: [type], delegate: delegate) } else { content }
        }
    }

    /// Ce que le volet sélectionne. Une seule valeur gouverne la section, le
    /// dossier, le tag, la collection et la note ouverte : c'est ce qu'une
    /// liste source native sait tenir, là où le volet dessiné à la main
+123
Changes for App/Features/Settings/KeyboardShortcutsSettingsView.swift: 123 added lines, 0 removed lines.
Original line number Diff line number Diff line
#if os(macOS)
import AppKit
import SwiftUI

/// Réglages › Raccourcis clavier : chaque commande, son raccourci, et de quoi
/// le changer, le retirer ou revenir au défaut.
///
/// Un raccourci déjà pris par une autre commande lui est retiré, et la ligne
/// le dit : deux commandes ne partagent jamais une même combinaison.
struct KeyboardShortcutsSettingsView: View {
    @AppStorage(KeyboardShortcuts.storageKey) private var shortcuts = ""
    @State private var recording: ShortcutAction?
    @State private var monitor: Any?
    @State private var notice: String?

    var body: some View {
        Form {
            Section {
                Text("Cliquez sur un raccourci, puis tapez la nouvelle combinaison. Échap annule.")
                    .foregroundStyle(Color.secondaryText)
                if let notice {
                    Text(verbatim: notice).foregroundStyle(Color.warning)
                }
            }
            ForEach(ShortcutAction.Group.allCases) { group in
                Section(group.title) {
                    ForEach(ShortcutAction.allCases.filter { $0.group == group }) { action in
                        row(action)
                    }
                }
            }
            Section {
                Button("Rétablir les raccourcis par défaut") {
                    stopRecording()
                    shortcuts = ""
                    notice = nil
                }
                .disabled(shortcuts.isEmpty || shortcuts == "{}")
            }
        }
        .onDisappear(perform: stopRecording)
        .accessibilityIdentifier("settings.shortcuts")
    }

    @ViewBuilder private func row(_ action: ShortcutAction) -> some View {
        let combo = KeyboardShortcuts.combo(for: action, in: shortcuts)
        let customized = KeyboardShortcuts.overrides(shortcuts)[action.rawValue] != nil
        LabeledContent {
            HStack(spacing: 6) {
                Button {
                    recording == action ? stopRecording() : startRecording(action)
                } label: {
                    Group {
                        if recording == action {
                            Text("Tapez le raccourci…")
                        } else if let combo {
                            Text(verbatim: combo.display).monospaced()
                        } else {
                            Text("Aucun")
                        }
                    }
                    .frame(minWidth: 120)
                }
                .accessibilityIdentifier("settings.shortcut.\(action.rawValue)")
                Button { set(action, nil) } label: { Image(systemName: "xmark.circle") }
                    .buttonStyle(.borderless).help("Retirer le raccourci")
                    .disabled(combo == nil)
                Button { reset(action) } label: { Image(systemName: "arrow.uturn.backward") }
                    .buttonStyle(.borderless).help("Rétablir le raccourci par défaut")
                    .disabled(!customized)
            }
        } label: {
            Text(action.title)
        }
    }

    private func startRecording(_ action: ShortcutAction) {
        stopRecording()
        recording = action
        notice = nil
        monitor = NSEvent.addLocalMonitorForEvents(matching: .keyDown) { event in
            guard let target = recording else { return event }
            if event.keyCode == 53 { stopRecording(); return nil } // Échap
            let flags = event.modifierFlags.intersection(.deviceIndependentFlagsMask)
            guard flags.contains(.command) || flags.contains(.control) || flags.contains(.option),
                  let key = event.charactersIgnoringModifiers?.lowercased(), key.count == 1,
                  !key.unicodeScalars.contains(where: { CharacterSet.controlCharacters.contains($0) }) else {
                NSSound.beep()
                return nil
            }
            let combo = KeyCombo(key, command: flags.contains(.command), shift: flags.contains(.shift),
                                 option: flags.contains(.option), control: flags.contains(.control))
            set(target, combo)
            stopRecording()
            return nil
        }
    }

    private func stopRecording() {
        if let monitor { NSEvent.removeMonitor(monitor) }
        monitor = nil
        recording = nil
    }

    private func set(_ action: ShortcutAction, _ combo: KeyCombo?) {
        var overrides = KeyboardShortcuts.overrides(shortcuts)
        if let combo, let other = KeyboardShortcuts.action(using: combo, in: shortcuts, except: action) {
            overrides[other.rawValue] = .some(nil)
            notice = String(localized: "Raccourci retiré de « \(other.localizedTitle) ».",
                            bundle: AppLanguage.bundle, locale: AppLanguage.locale)
        }
        if combo == action.defaultCombo { overrides.removeValue(forKey: action.rawValue) }
        else { overrides[action.rawValue] = .some(combo) }
        shortcuts = KeyboardShortcuts.encode(overrides)
    }

    private func reset(_ action: ShortcutAction) {
        var overrides = KeyboardShortcuts.overrides(shortcuts)
        overrides.removeValue(forKey: action.rawValue)
        shortcuts = KeyboardShortcuts.encode(overrides)
    }
}
#endif
+10 −1
Changes for App/Features/Settings/SettingsView.swift: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -85,6 +85,11 @@ struct SettingsView: View {
        // sélectionne sa catégorie au lieu d'empiler une seconde copie du même
        // écran par-dessus la liste.
        _macCategory = State(initialValue: page == .sync ? .sync : (page == .vault ? .privacy : .writing))
        #if DEBUG
        if let category = UserDefaults.standard.string(forKey: "EnvorennUITestSettings").flatMap(MacSettingsCategory.init(rawValue:)) {
            _macCategory = State(initialValue: category)
        }
        #endif
        _path = State(initialValue: page == .vault ? [.vault] : [])
        #else
        _path = State(initialValue: page.map { [$0] } ?? [])
@@ -132,6 +137,8 @@ struct SettingsView: View {
            switch macCategory ?? .writing {
            case .writing:
                Form { writingSection; captureSection }
            case .shortcuts:
                KeyboardShortcutsSettingsView()
            case .appearance:
                Form { appearanceSection; languageSection }
            case .privacy:
@@ -439,12 +446,13 @@ struct SettingsView: View {

#if os(macOS)
enum MacSettingsCategory: String, CaseIterable, Identifiable {
    case writing, appearance, privacy, sync, calendars, help, about
    case writing, appearance, shortcuts, privacy, sync, calendars, help, about
    var id: String { rawValue }
    var title: LocalizedStringKey {
        switch self {
        case .writing: "Écriture"
        case .appearance: "Affichage"
        case .shortcuts: "Raccourcis clavier"
        case .privacy: "Confidentialité"
        case .sync: "Synchronisation"
        case .calendars: "Calendriers"
@@ -456,6 +464,7 @@ enum MacSettingsCategory: String, CaseIterable, Identifiable {
        switch self {
        case .writing: "pencil"
        case .appearance: "textformat.size"
        case .shortcuts: "keyboard"
        case .privacy: "lock.shield"
        case .sync: "arrow.triangle.2.circlepath"
        case .calendars: "calendar"
Loading