Merge branch 'develop' into feature/url_opener

This commit is contained in:
Christian Putzke 2025-09-22 06:03:18 +02:00
commit d369791f27
22 changed files with 599 additions and 49 deletions

View File

@ -208,19 +208,15 @@ struct ShareBookmarkView: View {
} }
private func addCustomTag() { private func addCustomTag() {
let trimmed = viewModel.searchText.trimmingCharacters(in: .whitespacesAndNewlines) let splitLabels = LabelUtils.splitLabelsFromInput(viewModel.searchText)
guard !trimmed.isEmpty else { return } let availableLabels = viewModel.labels.map { $0.name }
let currentLabels = Array(viewModel.selectedLabels)
let uniqueLabels = LabelUtils.filterUniqueLabels(splitLabels, currentLabels: currentLabels, availableLabels: availableLabels)
let lowercased = trimmed.lowercased() for label in uniqueLabels {
let allExisting = Set(viewModel.labels.map { $0.name.lowercased() }) viewModel.selectedLabels.insert(label)
let allSelected = Set(viewModel.selectedLabels.map { $0.lowercased() })
if allExisting.contains(lowercased) || allSelected.contains(lowercased) {
// Tag already exists, don't add
return
} else {
viewModel.selectedLabels.insert(trimmed)
viewModel.searchText = ""
} }
viewModel.searchText = ""
} }
} }

View File

@ -436,7 +436,7 @@
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = URLShare/URLShare.entitlements; CODE_SIGN_ENTITLEMENTS = URLShare/URLShare.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 24; CURRENT_PROJECT_VERSION = 25;
DEVELOPMENT_TEAM = 8J69P655GN; DEVELOPMENT_TEAM = 8J69P655GN;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = URLShare/Info.plist; INFOPLIST_FILE = URLShare/Info.plist;
@ -469,7 +469,7 @@
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = URLShare/URLShare.entitlements; CODE_SIGN_ENTITLEMENTS = URLShare/URLShare.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 24; CURRENT_PROJECT_VERSION = 25;
DEVELOPMENT_TEAM = 8J69P655GN; DEVELOPMENT_TEAM = 8J69P655GN;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = URLShare/Info.plist; INFOPLIST_FILE = URLShare/Info.plist;
@ -624,7 +624,7 @@
CODE_SIGN_ENTITLEMENTS = readeck/readeck.entitlements; CODE_SIGN_ENTITLEMENTS = readeck/readeck.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 24; CURRENT_PROJECT_VERSION = 25;
DEVELOPMENT_ASSET_PATHS = "\"readeck/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"readeck/Preview Content\"";
DEVELOPMENT_TEAM = 8J69P655GN; DEVELOPMENT_TEAM = 8J69P655GN;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
@ -668,7 +668,7 @@
CODE_SIGN_ENTITLEMENTS = readeck/readeck.entitlements; CODE_SIGN_ENTITLEMENTS = readeck/readeck.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 24; CURRENT_PROJECT_VERSION = 25;
DEVELOPMENT_ASSET_PATHS = "\"readeck/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"readeck/Preview Content\"";
DEVELOPMENT_TEAM = 8J69P655GN; DEVELOPMENT_TEAM = 8J69P655GN;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;

View File

@ -0,0 +1,13 @@
import Foundation
extension String {
/// Returns a localized version of the string using NSLocalizedString
var localized: String {
return NSLocalizedString(self, comment: "")
}
/// Returns a localized version of the string with comment
func localized(comment: String) -> String {
return NSLocalizedString(self, comment: comment)
}
}

View File

@ -0,0 +1,29 @@
import Foundation
struct LabelUtils {
/// Splits a label input string by spaces and returns individual trimmed labels
/// - Parameter input: The input string containing one or more labels separated by spaces
/// - Returns: Array of individual trimmed labels, excluding empty strings
static func splitLabelsFromInput(_ input: String) -> [String] {
return input
.components(separatedBy: " ")
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
.filter { !$0.isEmpty }
}
/// Filters out labels that already exist in current or available labels
/// - Parameters:
/// - labels: Array of labels to filter
/// - currentLabels: Currently selected labels
/// - availableLabels: Available labels (optional)
/// - Returns: Array of unique labels that don't already exist
static func filterUniqueLabels(_ labels: [String], currentLabels: [String], availableLabels: [String] = []) -> [String] {
let currentSet = Set(currentLabels.map { $0.lowercased() })
let availableSet = Set(availableLabels.map { $0.lowercased() })
return labels.filter { label in
let lowercased = label.lowercased()
return !currentSet.contains(lowercased) && !availableSet.contains(lowercased)
}
}
}

View File

@ -18,6 +18,34 @@
"%lld/%lld" = "%1$lld/%2$lld"; "%lld/%lld" = "%1$lld/%2$lld";
"12 min • Today • example.com" = "12 min • Today • example.com"; "12 min • Today • example.com" = "12 min • Today • example.com";
"Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly." = "Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly."; "Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly." = "Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly.";
/* Legal & Privacy */
"Legal & Privacy" = "Legal & Privacy";
"Privacy Policy" = "Privacy Policy";
"Legal Notice" = "Legal Notice";
"Report an Issue" = "Report an Issue";
"Contact Support" = "Contact Support";
/* Navigation & States */
"All" = "All";
"Unread" = "Unread";
"Favorites" = "Favorites";
"Archive" = "Archive";
"Search" = "Search";
"Settings" = "Settings";
"Articles" = "Articles";
"Videos" = "Videos";
"Pictures" = "Pictures";
"Tags" = "Tags";
/* Settings Sections */
"Font Settings" = "Font Settings";
"Appearance" = "Appearance";
"Cache Settings" = "Cache Settings";
"General Settings" = "General Settings";
"Server Settings" = "Server Settings";
"Server Connection" = "Server Connection";
"Add" = "Add"; "Add" = "Add";
"Add new tag:" = "Add new tag:"; "Add new tag:" = "Add new tag:";
"all" = "all"; "all" = "all";

View File

@ -5,4 +5,153 @@
Created by conversion from Localizable.xcstrings Created by conversion from Localizable.xcstrings
*/ */
"all" = "Ale";
"" = "";
"(%lld found)" = "(%lld gefunden)";
"%" = "%";
"%@ (%lld)" = "%1$@ (%2$lld)";
"%lld" = "%lld";
"%lld articles in the queue" = "%lld Artikel in der Warteschlange";
"%lld bookmark%@ synced successfully" = "%1$lld Lesezeichen%2$@ erfolgreich synchronisiert";
"%lld bookmark%@ waiting for sync" = "%1$lld Lesezeichen%2$@ warten auf Synchronisation";
"%lld min" = "%lld Min";
"%lld." = "%lld.";
"%lld/%lld" = "%1$lld/%2$lld";
"12 min • Today • example.com" = "12 Min • Heute • example.com";
"Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly." = "Aktiviere die Vorlese-Funktion, um deine Artikel vorlesen zu lassen. Dies ist eine sehr frühe Vorschau und funktioniert möglicherweise noch nicht perfekt.";
/* Legal & Privacy */
"Legal & Privacy" = "Rechtliches & Datenschutz";
"Privacy Policy" = "Datenschutzerklärung";
"Legal Notice" = "Impressum";
"Report an Issue" = "Problem melden";
"Contact Support" = "Support kontaktieren";
/* Navigation & States */
"All" = "Alle";
"Unread" = "Ungelesen";
"Favorites" = "Favoriten";
"Archive" = "Archiv";
"Search" = "Suchen";
"Settings" = "Einstellungen";
"Articles" = "Artikel";
"Videos" = "Videos";
"Pictures" = "Bilder";
"Tags" = "Labels";
/* Settings Sections */
"Font Settings" = "Schriftart-Einstellungen";
"Appearance" = "Darstellung";
"Cache Settings" = "Cache-Einstellungen";
"General Settings" = "Allgemeine Einstellungen";
"Server Settings" = "Server-Einstellungen";
"Server Connection" = "Server-Verbindung";
"Add" = "Hinzufügen";
"Add new tag:" = "Neues Label hinzufügen:";
"all" = "alle";
"All tags selected" = "Alle Labels ausgewählt";
"Archive" = "Archivieren";
"Archive bookmark" = "Lesezeichen archivieren";
"Are you sure you want to delete this bookmark? This action cannot be undone." = "Dieses Lesezeichen wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.";
"Are you sure you want to log out? This will delete all your login credentials and return you to setup." = "Wirklich abmelden? Dies löscht alle Anmeldedaten und führt zurück zur Einrichtung.";
"Available tags" = "Verfügbare Labels";
"Cancel" = "Abbrechen";
"Category-specific Levels" = "Kategorie-spezifische Level";
"Changes take effect immediately. Lower log levels include higher ones (Debug includes all, Critical includes only critical messages)." = "Änderungen werden sofort wirksam. Niedrigere Log-Level enthalten höhere (Debug enthält alle, Critical nur kritische Nachrichten).";
"Close" = "Schließen";
"Configure log levels and categories" = "Log-Level und Kategorien konfigurieren";
"Critical" = "Kritisch";
"Debug" = "Debug";
"DEBUG BUILD" = "DEBUG BUILD";
"Debug Settings" = "Debug-Einstellungen";
"Delete" = "Löschen";
"Delete Bookmark" = "Lesezeichen löschen";
"Developer: Ilyas Hallak" = "Entwickler: Ilyas Hallak";
"Done" = "Fertig";
"Enter an optional title..." = "Optionalen Titel eingeben...";
"Enter your Readeck server details to get started." = "Readeck-Server-Details eingeben, um zu beginnen.";
"Error" = "Fehler";
"Error: %@" = "Fehler: %@";
"Favorite" = "Favorit";
"Finished reading?" = "Fertig gelesen?";
"Font" = "Schrift";
"Font family" = "Schriftart";
"Font Settings" = "Schrift-Einstellungen";
"Font size" = "Schriftgröße";
"From Bremen with 💚" = "Aus Bremen mit 💚";
"General" = "Allgemein";
"Global Level" = "Globales Level";
"Global Minimum Level" = "Globales Minimum-Level";
"Global Settings" = "Globale Einstellungen";
"https://example.com" = "https://example.com";
"https://readeck.example.com" = "https://readeck.example.com";
"Include Source Location" = "Quellort einschließen";
"Info" = "Info";
"Jump to last read position (%lld%%)" = "Zur letzten Leseposition springen (%lld%%)";
"Key" = "Schlüssel";
"Level for %@" = "Level für %@";
"Loading %@" = "Lade %@";
"Loading article..." = "Artikel wird geladen...";
"Logging Configuration" = "Logging-Konfiguration";
"Login & Save" = "Anmelden & Speichern";
"Logout" = "Abmelden";
"Logs below this level will be filtered out globally" = "Logs unter diesem Level werden global herausgefiltert";
"Manage Labels" = "Labels verwalten";
"Mark as favorite" = "Als Favorit markieren";
"More" = "Mehr";
"New Bookmark" = "Neues Lesezeichen";
"No articles in the queue" = "Keine Artikel in der Warteschlange";
"No bookmarks" = "Keine Lesezeichen";
"No bookmarks found in %@." = "Keine Lesezeichen in %@ gefunden.";
"No bookmarks found." = "Keine Lesezeichen gefunden.";
"No results" = "Keine Ergebnisse";
"Notice" = "Hinweis";
"OK" = "OK";
"Optional: Custom title" = "Optional: Benutzerdefinierter Titel";
"Password" = "Passwort";
"Paste" = "Einfügen";
"Please wait while we fetch your bookmarks..." = "Bitte warten, während die Lesezeichen geladen werden...";
"Preview" = "Vorschau";
"Progress: %lld%%" = "Fortschritt: %lld%%";
"Re-login & Save" = "Erneut anmelden & Speichern";
"Read Aloud Feature" = "Vorlese-Funktion";
"Read article aloud" = "Artikel vorlesen";
"Read-aloud Queue" = "Vorlese-Warteschlange";
"readeck Bookmark Title" = "readeck Lesezeichen-Titel";
"Reading %lld/%lld: " = "Lese %1$lld/%2$lld: ";
"Remove" = "Entfernen";
"Reset" = "Zurücksetzen";
"Reset to Defaults" = "Auf Standardwerte zurücksetzen";
"Restore" = "Wiederherstellen";
"Resume listening" = "Zuhören fortsetzen";
"Save bookmark" = "Lesezeichen speichern";
"Save Bookmark" = "Lesezeichen speichern";
"Saving..." = "Speichern...";
"Search" = "Suchen";
"Search or add new tag..." = "Suchen oder neues Label hinzufügen...";
"Search results" = "Suchergebnisse";
"Search..." = "Suchen...";
"Searching..." = "Suche...";
"Select a bookmark or tag" = "Lesezeichen oder Label auswählen";
"Selected tags" = "Ausgewählte Labels";
"Server Endpoint" = "Server-Endpunkt";
"Server not reachable - saving locally" = "Server nicht erreichbar - speichere lokal";
"Settings" = "Einstellungen";
"Show Performance Logs" = "Performance-Logs anzeigen";
"Show Timestamps" = "Zeitstempel anzeigen";
"Speed" = "Geschwindigkeit";
"Syncing with server..." = "Synchronisiere mit Server...";
"Theme" = "Design";
"This is how your bookmark descriptions and article text will appear in the app. The quick brown fox jumps over the lazy dog." = "So werden Lesezeichen-Beschreibungen und Artikeltexte in der App angezeigt. Franz jagt im komplett verwahrlosten Taxi quer durch Bayern.";
"Try Again" = "Erneut versuchen";
"Unable to load bookmarks" = "Lesezeichen können nicht geladen werden";
"Unarchive Bookmark" = "Lesezeichen aus Archiv entfernen";
"URL in clipboard:" = "URL in Zwischenablage:";
"Username" = "Benutzername";
"Version %@" = "Version %@";
"Warning" = "Warnung";
"Your current server connection and login credentials." = "Aktuelle Serververbindung und Anmeldedaten.";
"Your Password" = "Passwort";
"Your Username" = "Benutzername";

View File

@ -18,6 +18,34 @@
"%lld/%lld" = "%1$lld/%2$lld"; "%lld/%lld" = "%1$lld/%2$lld";
"12 min • Today • example.com" = "12 min • Today • example.com"; "12 min • Today • example.com" = "12 min • Today • example.com";
"Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly." = "Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly."; "Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly." = "Activate the Read Aloud Feature to read aloud your articles. This is a really early preview and might not work perfectly.";
/* Legal & Privacy */
"Legal & Privacy" = "Legal & Privacy";
"Privacy Policy" = "Privacy Policy";
"Legal Notice" = "Legal Notice";
"Report an Issue" = "Report an Issue";
"Contact Support" = "Contact Support";
/* Navigation & States */
"All" = "All";
"Unread" = "Unread";
"Favorites" = "Favorites";
"Archive" = "Archive";
"Search" = "Search";
"Settings" = "Settings";
"Articles" = "Articles";
"Videos" = "Videos";
"Pictures" = "Pictures";
"Tags" = "Tags";
/* Settings Sections */
"Font Settings" = "Font Settings";
"Appearance" = "Appearance";
"Cache Settings" = "Cache Settings";
"General Settings" = "General Settings";
"Server Settings" = "Server Settings";
"Server Connection" = "Server Connection";
"Add" = "Add"; "Add" = "Add";
"Add new tag:" = "Add new tag:"; "Add new tag:" = "Add new tag:";
"all" = "all"; "all" = "all";

View File

@ -73,15 +73,12 @@ class BookmarkLabelsViewModel {
@MainActor @MainActor
func addLabel(to bookmarkId: String, label: String) async { func addLabel(to bookmarkId: String, label: String) async {
let individualLabels = label let splitLabels = LabelUtils.splitLabelsFromInput(label)
.components(separatedBy: " ") let uniqueLabels = LabelUtils.filterUniqueLabels(splitLabels, currentLabels: currentLabels)
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
.filter { !$0.isEmpty }
.filter { !currentLabels.contains($0) }
guard !individualLabels.isEmpty else { return } guard !uniqueLabels.isEmpty else { return }
await addLabels(to: bookmarkId, labels: individualLabels) await addLabels(to: bookmarkId, labels: uniqueLabels)
newLabelText = "" newLabelText = ""
searchText = "" searchText = ""
} }

View File

@ -5,6 +5,8 @@
// Created by Ilyas Hallak on 01.07.25. // Created by Ilyas Hallak on 01.07.25.
// //
import Foundation
enum BookmarkState: String, CaseIterable { enum BookmarkState: String, CaseIterable {
case all = "all" case all = "all"
case unread = "unread" case unread = "unread"
@ -14,13 +16,13 @@ enum BookmarkState: String, CaseIterable {
var displayName: String { var displayName: String {
switch self { switch self {
case .all: case .all:
return "All" return NSLocalizedString("All", comment: "")
case .unread: case .unread:
return "Unread" return NSLocalizedString("Unread", comment: "")
case .favorite: case .favorite:
return "Favorites" return NSLocalizedString("Favorites", comment: "")
case .archived: case .archived:
return "Archive" return NSLocalizedString("Archive", comment: "")
} }
} }

View File

@ -103,12 +103,12 @@ struct PadSidebarView: View {
case .tags: case .tags:
NavigationStack { NavigationStack {
LabelsView(selectedTag: $selectedTag) LabelsView(selectedTag: $selectedTag)
.navigationDestination(item: $selectedTag) { label in }
BookmarksView(state: .all, type: [], selectedBookmark: $selectedBookmark, tag: label.name) .navigationDestination(item: $selectedTag) { label in
.navigationTitle("\(label.name) (\(label.count))") BookmarksView(state: .all, type: [], selectedBookmark: $selectedBookmark, tag: label.name)
.onDisappear { .navigationTitle("\(label.name) (\(label.count))")
selectedTag = nil .onDisappear {
} selectedTag = nil
} }
} }
} }

View File

@ -5,6 +5,8 @@
// Created by Ilyas Hallak on 01.07.25. // Created by Ilyas Hallak on 01.07.25.
// //
import Foundation
enum SidebarTab: Hashable, CaseIterable, Identifiable { enum SidebarTab: Hashable, CaseIterable, Identifiable {
case search, all, unread, favorite, archived, article, videos, pictures, tags, settings case search, all, unread, favorite, archived, article, videos, pictures, tags, settings
@ -12,16 +14,16 @@ enum SidebarTab: Hashable, CaseIterable, Identifiable {
var label: String { var label: String {
switch self { switch self {
case .all: return "All" case .all: return NSLocalizedString("All", comment: "")
case .unread: return "Unread" case .unread: return NSLocalizedString("Unread", comment: "")
case .favorite: return "Favorites" case .favorite: return NSLocalizedString("Favorites", comment: "")
case .archived: return "Archive" case .archived: return NSLocalizedString("Archive", comment: "")
case .search: return "Search" case .search: return NSLocalizedString("Search", comment: "")
case .settings: return "Settings" case .settings: return NSLocalizedString("Settings", comment: "")
case .article: return "Articles" case .article: return NSLocalizedString("Articles", comment: "")
case .videos: return "Videos" case .videos: return NSLocalizedString("Videos", comment: "")
case .pictures: return "Pictures" case .pictures: return NSLocalizedString("Pictures", comment: "")
case .tags: return "Tags" case .tags: return NSLocalizedString("Tags", comment: "")
} }
} }

View File

@ -16,7 +16,7 @@ struct AppearanceSettingsView: View {
var body: some View { var body: some View {
VStack(spacing: 20) { VStack(spacing: 20) {
SectionHeader(title: "Appearance", icon: "paintbrush") SectionHeader(title: "Appearance".localized, icon: "paintbrush")
.padding(.bottom, 4) .padding(.bottom, 4)
// Theme Section // Theme Section

View File

@ -9,7 +9,7 @@ struct CacheSettingsView: View {
var body: some View { var body: some View {
VStack(spacing: 20) { VStack(spacing: 20) {
SectionHeader(title: "Cache Settings", icon: "internaldrive") SectionHeader(title: "Cache Settings".localized, icon: "internaldrive")
.padding(.bottom, 4) .padding(.bottom, 4)
VStack(spacing: 12) { VStack(spacing: 12) {

View File

@ -16,7 +16,7 @@ struct FontSettingsView: View {
var body: some View { var body: some View {
VStack(spacing: 20) { VStack(spacing: 20) {
SectionHeader(title: "Font Settings", icon: "textformat") SectionHeader(title: "Font Settings".localized, icon: "textformat")
.padding(.bottom, 4) .padding(.bottom, 4)
// Font Family Picker // Font Family Picker

View File

@ -0,0 +1,96 @@
import SwiftUI
struct LegalNoticeView: View {
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationView {
ScrollView {
VStack(alignment: .leading, spacing: 20) {
Text("Legal Notice")
.font(.largeTitle)
.fontWeight(.bold)
.padding(.bottom, 10)
VStack(alignment: .leading, spacing: 16) {
sectionView(
title: "App Publisher",
content: """
Ilyas Hallak
Albert-Bischof-Str. 18
28357 Bremen
Germany
Email: hi@ilyashallak.de
"""
)
sectionView(
title: "Content Responsibility",
content: "The publisher is responsible for the content of this application in accordance with applicable laws."
)
sectionView(
title: "App Information",
content: """
readeck iOS - Bookmark Management Client
Version: \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown")
Build: \(Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Unknown")
This app is an open source client for readeck bookmark management.
"""
)
sectionView(
title: "License",
content: "This software is released under the MIT License. The source code is available at the official repository."
)
sectionView(
title: "Disclaimer",
content: "The app is provided \"as is\" without warranty of any kind. The publisher assumes no liability for damages arising from the use of this application."
)
// TODO: Add business registration details if needed
// sectionView(
// title: "Business Registration",
// content: """
// [Business Registration Number]
// [Tax ID / VAT Number]
// [Responsible Authority]
// """
// )
}
}
.padding()
}
.navigationTitle("")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("Done") {
dismiss()
}
}
}
}
}
@ViewBuilder
private func sectionView(title: String, content: String) -> some View {
VStack(alignment: .leading, spacing: 8) {
Text(title)
.font(.headline)
.fontWeight(.semibold)
Text(content)
.font(.body)
.foregroundColor(.primary)
}
.padding(.vertical, 4)
}
}
#Preview {
LegalNoticeView()
}

View File

@ -0,0 +1,125 @@
import SwiftUI
struct LegalPrivacySettingsView: View {
@State private var showingPrivacyPolicy = false
@State private var showingLegalNotice = false
var body: some View {
VStack(spacing: 20) {
SectionHeader(title: "Legal & Privacy".localized, icon: "doc.text")
.padding(.bottom, 4)
VStack(spacing: 16) {
// Privacy Policy
Button(action: {
showingPrivacyPolicy = true
}) {
HStack {
Text(NSLocalizedString("Privacy Policy", comment: ""))
.font(.headline)
.foregroundColor(.primary)
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(Color(.systemBackground))
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.buttonStyle(.plain)
// Legal Notice
Button(action: {
showingLegalNotice = true
}) {
HStack {
Text(NSLocalizedString("Legal Notice", comment: ""))
.font(.headline)
.foregroundColor(.primary)
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(Color(.systemBackground))
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.buttonStyle(.plain)
Divider()
.padding(.vertical, 8)
// Support Section
VStack(spacing: 12) {
// Report an Issue
Button(action: {
if let url = URL(string: "https://github.com/ilyas-hallak/readeck-ios/issues") {
UIApplication.shared.open(url)
}
}) {
HStack {
Text(NSLocalizedString("Report an Issue", comment: ""))
.font(.headline)
.foregroundColor(.primary)
Spacer()
Image(systemName: "arrow.up.right")
.font(.caption)
.foregroundColor(.secondary)
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(Color(.systemBackground))
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.buttonStyle(.plain)
// Contact Support
Button(action: {
if let url = URL(string: "mailto:hi@ilyashallak.de?subject=readeck%20iOS") {
UIApplication.shared.open(url)
}
}) {
HStack {
Text(NSLocalizedString("Contact Support", comment: ""))
.font(.headline)
.foregroundColor(.primary)
Spacer()
Image(systemName: "arrow.up.right")
.font(.caption)
.foregroundColor(.secondary)
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(Color(.systemBackground))
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.buttonStyle(.plain)
}
}
}
.sheet(isPresented: $showingPrivacyPolicy) {
PrivacyPolicyView()
}
.sheet(isPresented: $showingLegalNotice) {
LegalNoticeView()
}
}
}
#Preview {
LegalPrivacySettingsView()
.cardStyle()
.padding()
}

View File

@ -0,0 +1,82 @@
import SwiftUI
struct PrivacyPolicyView: View {
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationView {
ScrollView {
VStack(alignment: .leading, spacing: 20) {
Text("Privacy Policy")
.font(.largeTitle)
.fontWeight(.bold)
.padding(.bottom, 10)
Text("Last updated: September 20, 2025")
.font(.caption)
.foregroundColor(.secondary)
VStack(alignment: .leading, spacing: 16) {
sectionView(
title: "Data Collection",
content: "readeck iOS does not collect, store, or transmit any personal data. The app operates as a client for your personal readeck server and all data remains on your device or your own server infrastructure."
)
sectionView(
title: "Local Storage",
content: "The app stores bookmarks locally on your device using CoreData for offline access. Login credentials are securely stored in the iOS Keychain. No data is shared with third parties."
)
sectionView(
title: "Server Communication",
content: "The app communicates only with your configured readeck server to synchronize bookmarks. No analytics, tracking, or telemetry data is collected or transmitted."
)
sectionView(
title: "Third-Party Services",
content: "This app does not use any third-party analytics, advertising, or tracking services. It does not integrate with social media platforms or other external services."
)
sectionView(
title: "Your Rights",
content: "Since no personal data is collected, processed, or stored by us, there is no personal data to access, modify, or delete from our side. All your data is under your control on your device and server."
)
sectionView(
title: "Contact",
content: "If you have questions about this privacy policy, please contact us at: hi@ilyashallak.de"
)
}
}
.padding()
}
.navigationTitle("")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("Done") {
dismiss()
}
}
}
}
}
@ViewBuilder
private func sectionView(title: String, content: String) -> some View {
VStack(alignment: .leading, spacing: 8) {
Text(title)
.font(.headline)
.fontWeight(.semibold)
Text(content)
.font(.body)
.foregroundColor(.primary)
}
.padding(.vertical, 4)
}
}
#Preview {
PrivacyPolicyView()
}

View File

@ -33,6 +33,9 @@ struct SettingsContainerView: View {
SettingsServerView() SettingsServerView()
.cardStyle() .cardStyle()
LegalPrivacySettingsView()
.cardStyle()
// Debug-only Logging Configuration // Debug-only Logging Configuration
if Bundle.main.isDebugBuild { if Bundle.main.isDebugBuild {
debugSettingsSection debugSettingsSection

View File

@ -16,7 +16,7 @@ struct SettingsGeneralView: View {
var body: some View { var body: some View {
VStack(spacing: 20) { VStack(spacing: 20) {
SectionHeader(title: "General Settings", icon: "gear") SectionHeader(title: "General Settings".localized, icon: "gear")
.padding(.bottom, 4) .padding(.bottom, 4)
VStack(alignment: .leading, spacing: 12) { VStack(alignment: .leading, spacing: 12) {

View File

@ -18,7 +18,7 @@ struct SettingsServerView: View {
var body: some View { var body: some View {
VStack(spacing: 20) { VStack(spacing: 20) {
SectionHeader(title: viewModel.isSetupMode ? "Server Settings" : "Server Connection", icon: "server.rack") SectionHeader(title: viewModel.isSetupMode ? "Server Settings".localized : "Server Connection".localized, icon: "server.rack")
.padding(.bottom, 4) .padding(.bottom, 4)
Text(viewModel.isSetupMode ? Text(viewModel.isSetupMode ?

Binary file not shown.

Binary file not shown.