fix(blocker): cooldown-elapsed modal platform-specific (no Android text on iOS)
Modal zeigte auf iOS "Du kannst den ReBreak-Bedienungshilfe-Dienst jetzt in den Einstellungen ausschalten" — Bedienungshilfe/Accessibility-Service ist ein Android-Konzept, existiert auf iOS nicht. iOS: NEFilter + Family Controls werden von forceDisable() vollständig abgeschaltet, User muss nichts in Settings tun. Neue iOS-Variante zeigt nur "Cooldown abgelaufen — Schutz deaktiviert." + OK, kein Settings-Button. Android: unverändert (a11y-Service braucht Settings-Deeplink). i18n DE/EN/FR/AR: cooldown_elapsed_message_ios neu.
This commit is contained in:
parent
312c668ae9
commit
306a8fda30
@ -1,5 +1,5 @@
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { Alert, AppState, type AppStateStatus } from 'react-native';
|
||||
import { Alert, AppState, Platform, type AppStateStatus } from 'react-native';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
protection,
|
||||
@ -54,11 +54,17 @@ export function useProtectionState(): UseProtectionStateReturn {
|
||||
const cooldownDisabledNoticeShownRef = useRef(false);
|
||||
|
||||
// Freundlicher Hinweis nachdem der Cooldown abgelaufen ist und der Schutz
|
||||
// (inkl. Tamper-Lock) abgeschaltet wurde. Android: a11y-Service kann sich
|
||||
// nicht selbst deaktivieren → User zu den Einstellungen leiten.
|
||||
// abgeschaltet wurde.
|
||||
// Android: a11y-Service (Bedienungshilfe) kann sich nicht selbst
|
||||
// deaktivieren → User braucht Settings-Deeplink.
|
||||
// iOS: NEFilter + Family Controls werden von forceDisable() vollständig
|
||||
// abgeschaltet — User muss NICHTS in den Einstellungen tun.
|
||||
// Kein "Bedienungshilfe"-Text (gibt es auf iOS nicht), kein
|
||||
// Settings-Button.
|
||||
const showCooldownElapsedNotice = useCallback(() => {
|
||||
if (cooldownDisabledNoticeShownRef.current) return;
|
||||
cooldownDisabledNoticeShownRef.current = true;
|
||||
if (Platform.OS === 'android') {
|
||||
Alert.alert(
|
||||
t('blocker.cooldown_elapsed_title'),
|
||||
t('blocker.cooldown_elapsed_message'),
|
||||
@ -72,6 +78,13 @@ export function useProtectionState(): UseProtectionStateReturn {
|
||||
},
|
||||
],
|
||||
);
|
||||
} else {
|
||||
Alert.alert(
|
||||
t('blocker.cooldown_elapsed_title'),
|
||||
t('blocker.cooldown_elapsed_message_ios'),
|
||||
[{ text: t('common.ok'), style: 'cancel' }],
|
||||
);
|
||||
}
|
||||
}, [t]);
|
||||
|
||||
const fetchState = useCallback(async (showLoading = false) => {
|
||||
|
||||
@ -340,6 +340,7 @@
|
||||
"more_info_title": "تعطيل الحماية",
|
||||
"cooldown_elapsed_title": "الحماية معطّلة",
|
||||
"cooldown_elapsed_message": "انتهت التهدئة — تم تعطيل الحماية. يمكنك الآن إيقاف خدمة إمكانية الوصول لـ ReBreak من الإعدادات.",
|
||||
"cooldown_elapsed_message_ios": "انتهت التهدئة — تم تعطيل الحماية.",
|
||||
"cooldown_elapsed_open_settings": "فتح الإعدادات",
|
||||
"app_lock_coming_soon_badge": "قريباً",
|
||||
"app_lock_coming_soon_desc": "قفل التطبيق قادم قريباً — الحماية نشطة بالفعل.",
|
||||
|
||||
@ -354,6 +354,7 @@
|
||||
"more_info_title": "Schutz deaktivieren",
|
||||
"cooldown_elapsed_title": "Schutz ist aus",
|
||||
"cooldown_elapsed_message": "Der Cooldown ist abgelaufen — der Schutz wurde deaktiviert. Du kannst den ReBreak-Bedienungshilfe-Dienst jetzt in den Einstellungen ausschalten.",
|
||||
"cooldown_elapsed_message_ios": "Der Cooldown ist abgelaufen — der Schutz wurde deaktiviert.",
|
||||
"cooldown_elapsed_open_settings": "Einstellungen öffnen",
|
||||
"app_lock_coming_soon_badge": "Bald",
|
||||
"app_lock_coming_soon_desc": "App-Sperre wird bald verfügbar — Schutz ist bereits aktiv.",
|
||||
|
||||
@ -354,6 +354,7 @@
|
||||
"more_info_title": "Disable protection",
|
||||
"cooldown_elapsed_title": "Protection is off",
|
||||
"cooldown_elapsed_message": "The cooldown has elapsed — protection was disabled. You can now turn off the ReBreak accessibility service in Settings.",
|
||||
"cooldown_elapsed_message_ios": "The cooldown has elapsed — protection was disabled.",
|
||||
"cooldown_elapsed_open_settings": "Open Settings",
|
||||
"app_lock_coming_soon_badge": "Soon",
|
||||
"app_lock_coming_soon_desc": "App lock coming soon — filter protection is already active.",
|
||||
|
||||
@ -338,6 +338,7 @@
|
||||
"more_info_title": "Désactiver la protection",
|
||||
"cooldown_elapsed_title": "La protection est désactivée",
|
||||
"cooldown_elapsed_message": "La pause de sécurité est terminée — la protection a été désactivée. Vous pouvez maintenant désactiver le service d'accessibilité ReBreak dans les Réglages.",
|
||||
"cooldown_elapsed_message_ios": "La pause de sécurité est terminée — la protection a été désactivée.",
|
||||
"cooldown_elapsed_open_settings": "Ouvrir les Réglages",
|
||||
"app_lock_coming_soon_badge": "Bientôt",
|
||||
"app_lock_coming_soon_desc": "Verrouillage de l'app bientôt disponible — la protection par filtre est déjà active.",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user