Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ ersten Store-Veröffentlichung.

## [Unreleased]

### Hinzugefügt

- Verlangt ein Umami-Server die Bestätigung in zwei Schritten, die für das Konto noch nicht eingerichtet ist, erklärt die Anmeldung jetzt, dass sie zuerst in der Umami-Weboberfläche eingerichtet werden muss, statt leere Ansichten zu zeigen.
- Meldet ein Umami-Server beim Anmelden, dass noch das Standardpasswort gesetzt ist, weist ein schließbarer Hinweis im Dashboard darauf hin, es in der Umami-Weboberfläche zu ändern.
- Lässt sich eine gewählte Cohort nicht mehr auswerten, weil sie eine von Umami abgeschaffte Aktion nutzt, erklärt die Website-Ansicht das und bietet an, ohne Cohort weiterzuarbeiten, statt leere Kacheln zu zeigen.

### Geändert
- Fehlermeldungen bei Anmeldung und Serverfehlern erscheinen jetzt auch auf Englisch, wenn das Gerät nicht auf Deutsch eingestellt ist.
- Die deutschen Fehlermeldungen sprechen jetzt wie der Rest der App mit Du an.
- Neue Lizenz: GNU AGPL v3.0 statt GPL-3.0: Die Pflicht, Änderungen offenzulegen, gilt jetzt auch für den Betrieb als Webdienst.

### Sonstiges
Expand Down
20 changes: 20 additions & 0 deletions InsightFlow/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"dashboard.offlineData %@" = "Offline – Letzte Daten von %@";
"dashboard.offlineExpired" = "Offline – gecachte Daten sind zu alt";
"detail.offline" = "Offline – Daten nicht verfügbar";
"detail.cohortNeedsUpdate" = "Diese Cohort lässt sich auf dem Server nicht mehr auswerten, vermutlich wegen einer Aktion, die Umami nicht mehr unterstützt. Aktualisiere sie in der Umami-Weboberfläche.";
"detail.cohortNeedsUpdate.clear" = "Ohne Cohort anzeigen";
"dashboard.passwordChangeRequired" = "Für dieses Umami-Konto ist noch das Standardpasswort gesetzt. Ändere es bitte in der Umami-Weboberfläche.";
"dashboard.reorder.hint" = "Halte und ziehe um die Reihenfolge zu andern";
"dashboard.edit.button" = "Dashboard anpassen";
"dashboard.edit.order" = "Reihenfolge";
Expand Down Expand Up @@ -418,12 +421,29 @@
"error.generic" = "Ein Fehler ist aufgetreten";
"error.network" = "Netzwerkfehler";
"error.auth" = "Anmeldung fehlgeschlagen";
"error.twoFactorSetupRequired" = "Dein Umami-Server verlangt für dieses Konto die Bestätigung in zwei Schritten. Richte sie zuerst in der Umami-Weboberfläche ein und melde dich dann hier erneut an.";
"error.cohortNeedsUpdate" = "Die gewählte Cohort lässt sich nicht auswerten. Sie nutzt vermutlich eine Aktion, die Umami nicht mehr unterstützt. Aktualisiere die Cohort in der Umami-Weboberfläche oder wähle eine andere.";
"error.invalidURL" = "Ungültige Server-URL";
"error.notAuthenticated" = "Nicht angemeldet";
"error.invalidCredentials" = "Ungültige Anmeldedaten";
"error.invalidResponse" = "Ungültige Server-Antwort";
"error.unauthorized" = "Nicht autorisiert - bitte überprüfe deine Anmeldedaten";
"error.server %lld" = "Serverfehler: %lld";

// MARK: - Fehler der Umami-Schnittstelle und des Schlüsselbunds
"error.api.notConfigured" = "API ist nicht konfiguriert";
"error.api.invalidURL" = "Ungültige URL";
"error.api.invalidResponse" = "Ungültige Server-Antwort";
"error.api.authenticationFailed" = "Anmeldung fehlgeschlagen";
"error.api.unauthorized" = "Nicht autorisiert";
"error.api.server %lld" = "Server-Fehler (%lld)";
"error.api.twoFactorInvalidCode" = "Der Bestätigungscode ist ungültig";
"error.api.twoFactorLocked" = "Zu viele Fehlversuche. Bitte versuche es später erneut.";
"error.api.twoFactorRequired" = "Für dieses Konto ist eine Bestätigung in zwei Schritten aktiv. Bitte melde dich über die Anmeldemaske an.";
"error.api.umamiCloudRequiresAPIKey" = "Umami Cloud verwendet keine Anmeldung mit Benutzername und Passwort. Bitte erzeuge in Umami unter Einstellungen → API keys einen Schlüssel und trage ihn hier ein.";
"error.api.invalidAPIKey" = "Der API-Schlüssel wurde nicht akzeptiert. Bitte prüfe ihn in Umami unter Einstellungen → API keys.";
"error.keychain.saveFailed %@" = "Keychain Speicherfehler: %@";
"error.keychain.encodingFailed" = "Wert konnte nicht als UTF-8 kodiert werden";
"error.plausible.sitesAPIUnavailable" = "Diese Funktion benötigt die Plausible Sites-API, die es nur in Plausible Cloud und Enterprise gibt. Selbst gehostete Community-Edition-Server bieten sie nicht an.";

// MARK: - Account Switcher
Expand Down
20 changes: 20 additions & 0 deletions InsightFlow/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"dashboard.offlineData %@" = "Offline – Last data from %@";
"dashboard.offlineExpired" = "Offline – cached data is too old to display";
"detail.offline" = "Offline – data unavailable";
"detail.cohortNeedsUpdate" = "This cohort can no longer be evaluated by the server, probably because it uses an action Umami no longer supports. Update it in the Umami web interface.";
"detail.cohortNeedsUpdate.clear" = "Show without cohort";
"dashboard.passwordChangeRequired" = "This Umami account still uses the default password. Please change it in the Umami web interface.";
"dashboard.reorder.hint" = "Hold and drag to reorder";
"dashboard.edit.button" = "Customize Dashboard";
"dashboard.edit.order" = "Order";
Expand Down Expand Up @@ -417,12 +420,29 @@
"error.generic" = "An error occurred";
"error.network" = "Network Error";
"error.auth" = "Login Failed";
"error.twoFactorSetupRequired" = "Your Umami server requires two-step verification for this account. Set it up in the Umami web interface first, then sign in here again.";
"error.cohortNeedsUpdate" = "The selected cohort can't be evaluated. It probably uses an action Umami no longer supports. Update the cohort in the Umami web interface or choose another one.";
"error.invalidURL" = "Invalid server URL";
"error.notAuthenticated" = "Not authenticated";
"error.invalidCredentials" = "Invalid credentials";
"error.invalidResponse" = "Invalid server response";
"error.unauthorized" = "Unauthorized - please check your credentials";
"error.server %lld" = "Server error: %lld";

// MARK: - Umami API and keychain errors
"error.api.notConfigured" = "API is not configured";
"error.api.invalidURL" = "Invalid URL";
"error.api.invalidResponse" = "Invalid server response";
"error.api.authenticationFailed" = "Login failed";
"error.api.unauthorized" = "Not authorized";
"error.api.server %lld" = "Server error (%lld)";
"error.api.twoFactorInvalidCode" = "The verification code is invalid";
"error.api.twoFactorLocked" = "Too many failed attempts. Please try again later.";
"error.api.twoFactorRequired" = "Two-step verification is active for this account. Please sign in using the login screen.";
"error.api.umamiCloudRequiresAPIKey" = "Umami Cloud does not use sign-in with username and password. Please create a key in Umami under Settings → API keys and enter it here.";
"error.api.invalidAPIKey" = "The API key was not accepted. Please check it in Umami under Settings → API keys.";
"error.keychain.saveFailed %@" = "Keychain save error: %@";
"error.keychain.encodingFailed" = "Value could not be encoded as UTF-8";
"error.plausible.sitesAPIUnavailable" = "This function requires the Plausible Sites API, which is only available in Plausible Cloud and Enterprise. Self-hosted Community Edition servers do not provide it.";

// MARK: - Account Switcher
Expand Down
1 change: 1 addition & 0 deletions InsightFlow/Services/AccountManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class AccountManager: ObservableObject {
func removeAccount(_ account: AnalyticsAccount) {
accounts.removeAll { $0.id == account.id }
KeychainService.deleteCredentials(for: account.id.uuidString)
PasswordChangeNotice.record(accountId: account.id, required: false)
saveAccounts()

// If we removed the active account, switch to another one
Expand Down
5 changes: 3 additions & 2 deletions InsightFlow/Services/KeychainService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ enum KeychainError: LocalizedError {
var errorDescription: String? {
switch self {
case .saveFailed(let status):
return "Keychain Speicherfehler: \(status)"
// Als Text, sonst setzt die Lokalisierung Tausendertrennzeichen in den Statuscode.
return String(localized: "error.keychain.saveFailed \(String(status))")
case .encodingFailed:
return "Wert konnte nicht als UTF-8 kodiert werden"
return String(localized: "error.keychain.encodingFailed")
}
}
}
Expand Down
30 changes: 30 additions & 0 deletions InsightFlow/Services/PasswordChangeNotice.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Foundation

/// Merkt sich Konten, für die Umami (ab 3.5) beim Login noch das Standardpasswort meldet.
enum PasswordChangeNotice {
static let storageKey = "umami.passwordChangeNotice"

/// Kommagetrennte Konto-IDs, damit `@AppStorage` die Liste direkt beobachten kann.
static func accountIds(in raw: String) -> Set<String> {
Set(raw.split(separator: ",").map(String.init).filter { !$0.isEmpty })
}

static func updated(_ raw: String, accountId: UUID, required: Bool) -> String {
var ids = accountIds(in: raw)
if required {
ids.insert(accountId.uuidString)
} else {
ids.remove(accountId.uuidString)
}
return ids.sorted().joined(separator: ",")
}

static func isMarked(_ raw: String, accountId: UUID) -> Bool {
accountIds(in: raw).contains(accountId.uuidString)
}

static func record(accountId: UUID, required: Bool, defaults: UserDefaults = .standard) {
let raw = defaults.string(forKey: storageKey) ?? ""
defaults.set(updated(raw, accountId: accountId, required: required), forKey: storageKey)
}
}
Loading
Loading