Code + Identity-Rename zur Vorbereitung auf Apple-Dev-Portal-Aktion (Bundle ev.mana.wordeck, App-Group group.ev.mana.wordeck, AASA applinks:wordeck.com). Build bleibt funktional, aber gegen die neue text-only-API können image-occlusion-Creates 422 zurückgeben — das wird mit der Wordeck-Native v1.0-Welle (parallele Apple-Aktion) sauber gemacht. Umbenennung: - 41 Files: cardecky/Cardecky → wordeck/Wordeck (Display, Strings, Kommentare) - 57 Files: CardsNative → WordeckNative, CardsAPI → WordeckAPI, CardsTheme → WordeckTheme, CardsBrand → WordeckBrand, CardsWidget → WordeckWidget, CardsDueWidget → WordeckDueWidget - Bundle-ID ev.mana.cardecky → ev.mana.wordeck (project.yml, Info.plist, entitlements, Keychain-Service, App-Group) - AASA applinks:cardecky.mana.how → applinks:wordeck.com - API-Base cardecky-api.mana.how → api.wordeck.com - 10 Files renamed (App-Entry, API-Extensions, Theme, Widget, Entitlements, Tests) - xcodeproj regenerated via xcodegen → WordeckNative.xcodeproj - MaskRegionsTests.swift gelöscht (image-occlusion entfällt mit Wordeck text-only) Forgejo-Repo git.mana.how/till/cards-native → wordeck-native umbenannt (Auto-Redirect aktiv). Lokales Verzeichnis Code/cards-native/ bleibt vorerst — wird beim nächsten Apple-Setup mit Bundle-Test umbenannt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
60 lines
1.9 KiB
Swift
60 lines
1.9 KiB
Swift
import SwiftUI
|
|
|
|
/// Mini-Editor in der Share-Extension. User kann den Text noch
|
|
/// anpassen, dann "Speichern" → PendingShare landet in der Haupt-App.
|
|
struct ShareEditorView: View {
|
|
let initialText: String
|
|
let sourceURL: String?
|
|
let onSave: (String) -> Void
|
|
let onCancel: () -> Void
|
|
|
|
@State private var text: String
|
|
|
|
init(
|
|
text: String,
|
|
sourceURL: String?,
|
|
onSave: @escaping (String) -> Void,
|
|
onCancel: @escaping () -> Void
|
|
) {
|
|
initialText = text
|
|
self.sourceURL = sourceURL
|
|
self.onSave = onSave
|
|
self.onCancel = onCancel
|
|
_text = State(initialValue: text)
|
|
}
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
Form {
|
|
Section("Vorderseite") {
|
|
TextField("Text", text: $text, axis: .vertical)
|
|
.lineLimit(4 ... 10)
|
|
}
|
|
if let sourceURL {
|
|
Section("Quelle") {
|
|
Text(sourceURL)
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
.lineLimit(1)
|
|
}
|
|
}
|
|
Section {
|
|
Text("Wähle das Ziel-Deck in der Wordeck-App.")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
}
|
|
.navigationTitle("Als Karte speichern")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
.toolbar {
|
|
ToolbarItem(placement: .cancellationAction) {
|
|
Button("Abbrechen", action: onCancel)
|
|
}
|
|
ToolbarItem(placement: .confirmationAction) {
|
|
Button("Speichern") { onSave(text) }
|
|
.disabled(text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|