VHS-Karten integriert, Bildzoom ergänzt und Chat-IDs korrigiert
Unterschriftenerfassung dauerhaft auf Deutsch anzeigen, lokale VHS-Buildkonfiguration und Regressionstests ergänzen sowie Version auf 357.0.0+357 anheben.
This commit is contained in:
1 parent
c0b667c4ee
commit
5e7babf265
26 files changed
+752
-93
No files matched your search
@@ -56,8 +56,8 @@ class AppLocalizations {
|
||||
}
|
||||
|
||||
// Hilfsmethode für einfachen Zugriff
|
||||
static String tr(String key) {
|
||||
return _instance._translations[_instance._currentLanguage.code]?[key] ??
|
||||
static String tr(String key, {AppLanguage? language}) {
|
||||
return _instance._translations[(language ?? _instance._currentLanguage).code]?[key] ??
|
||||
_instance._translations['de']?[key] ??
|
||||
key;
|
||||
}
|
||||
|
||||
+5
-5
@@ -489,22 +489,22 @@ bool isJobTooFarInFuture(Job job) {
|
||||
return ordertime > dateTimeThreshold;
|
||||
}
|
||||
|
||||
Future<bool> taskDialogSecurityException(BuildContext context) async {
|
||||
Future<bool> taskDialogSecurityException(BuildContext context, {AppLanguage? language}) async {
|
||||
final result = await showDialog<bool>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (dialogContext) {
|
||||
return AlertDialog(
|
||||
title: Text('attention'.tr),
|
||||
content: Text('close_dialog_warning'.tr),
|
||||
title: Text(AppLocalizations.tr('attention', language: language)),
|
||||
content: Text(AppLocalizations.tr('close_dialog_warning', language: language)),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(dialogContext).pop(true),
|
||||
child: Text('close'.tr),
|
||||
child: Text(AppLocalizations.tr('close', language: language)),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(dialogContext).pop(false),
|
||||
child: Text('back'.tr),
|
||||
child: Text(AppLocalizations.tr('back', language: language)),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
class VhsMapAccess {
|
||||
VhsMapAccess(this.uri);
|
||||
|
||||
final Uri uri;
|
||||
static const int maxAuthenticationAttempts = 3;
|
||||
int _authenticationAttempts = 0;
|
||||
|
||||
static bool _isValidUri(Uri value) =>
|
||||
value.scheme == 'https' &&
|
||||
value.hasAuthority &&
|
||||
value.host.isNotEmpty &&
|
||||
value.userInfo.isEmpty &&
|
||||
value.port > 0 &&
|
||||
value.port <= 65535;
|
||||
|
||||
bool get isValid => _isValidUri(uri);
|
||||
|
||||
bool allowsNavigation(Uri target) =>
|
||||
isValid && _isValidUri(target) && target.origin == uri.origin;
|
||||
|
||||
// Die WebView liefert bei Authentifizierungsanfragen nur Host und Realm.
|
||||
bool allowsAuthentication(String host) =>
|
||||
isValid && host.toLowerCase() == uri.host.toLowerCase();
|
||||
|
||||
bool tryAuthentication(String host) {
|
||||
if (!allowsAuthentication(host) ||
|
||||
_authenticationAttempts >= maxAuthenticationAttempts) {
|
||||
return false;
|
||||
}
|
||||
_authenticationAttempts++;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user