Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Update sodium libs references

Prateek Sunal895e65e2c4df
diff --git a/mobile/apps/auth/macos/Podfile.lock b/mobile/apps/auth/macos/Podfile.lock
index e85fd3dca3..887245c0b8 100644
--- a/mobile/apps/auth/macos/Podfile.lock
+++ b/mobile/apps/auth/macos/Podfile.lock
@@ -47,7 +47,8 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- - sodium_libs (2.2.1):
+ - "sodium_libs (3.4.6+1)":
+ - Flutter
- FlutterMacOS
- sqflite_darwin (0.0.4):
- Flutter
@@ -102,7 +103,7 @@ DEPENDENCIES:
- sentry_flutter (from `Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos`)
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- - sodium_libs (from `Flutter/ephemeral/.symlinks/plugins/sodium_libs/macos`)
+ - sodium_libs (from `Flutter/ephemeral/.symlinks/plugins/sodium_libs/darwin`)
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
- sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin`)
- tray_manager (from `Flutter/ephemeral/.symlinks/plugins/tray_manager/macos`)
@@ -157,7 +158,7 @@ EXTERNAL SOURCES:
shared_preferences_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
sodium_libs:
- :path: Flutter/ephemeral/.symlinks/plugins/sodium_libs/macos
+ :path: Flutter/ephemeral/.symlinks/plugins/sodium_libs/darwin
sqflite_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin
sqlite3_flutter_libs:
@@ -192,7 +193,7 @@ SPEC CHECKSUMS:
sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684
share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
- sodium_libs: b9459e5bfc1185349f43472e79fc5d8e526b2bda
+ sodium_libs: ecc719aba13e1077057a4f550592d80bf68e9d69
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
sqlite3_flutter_libs: e7fc8c9ea2200ff3271f08f127842131746b70e2
diff --git a/mobile/packages/ente_crypto_dart_adapter/pubspec.lock b/mobile/packages/ente_crypto_dart_adapter/pubspec.lock
index c930ec07da..cf1ee8b529 100644
--- a/mobile/packages/ente_crypto_dart_adapter/pubspec.lock
+++ b/mobile/packages/ente_crypto_dart_adapter/pubspec.lock
@@ -274,4 +274,4 @@ packages:
version: "2.1.0"
sdks:
dart: ">=3.8.0 <4.0.0"
- flutter: ">=3.29.0"
+ flutter: ">=3.32.0"
diff --git a/mobile/packages/lock_screen/lib/auth_util.dart b/mobile/packages/lock_screen/lib/auth_util.dart
index eda15edd92..0361a9bbfd 100644
--- a/mobile/packages/lock_screen/lib/auth_util.dart
+++ b/mobile/packages/lock_screen/lib/auth_util.dart
@@ -4,7 +4,6 @@ import 'package:ente_lock_screen/local_authentication_service.dart';
import 'package:ente_lock_screen/lock_screen_settings.dart';
import 'package:ente_strings/ente_strings.dart';
import 'package:flutter/cupertino.dart';
-import 'package:flutter_local_authentication/flutter_local_authentication.dart';
import 'package:local_auth/local_auth.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_darwin/types/auth_messages_ios.dart';
@@ -31,8 +30,8 @@ Future<bool> requestAuthentication(
);
}
if (Platform.isLinux) {
- // Linux uses flutter_local_authentication
- return await FlutterLocalAuthentication().authenticate();
+ // Device lock is temporarily disabled on Linux.
+ return true;
} else {
await LocalAuthentication().stopAuthentication();
final l10n = context.strings;
diff --git a/mobile/packages/lock_screen/lib/local_authentication_service.dart b/mobile/packages/lock_screen/lib/local_authentication_service.dart
index b265255108..5742b86b3a 100644
--- a/mobile/packages/lock_screen/lib/local_authentication_service.dart
+++ b/mobile/packages/lock_screen/lib/local_authentication_service.dart
@@ -11,7 +11,6 @@ import 'package:ente_utils/platform_util.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:flutter_local_authentication/flutter_local_authentication.dart';
import 'package:local_auth/local_auth.dart';
import 'package:logging/logging.dart';
@@ -139,9 +138,10 @@ class LocalAuthenticationService {
Future<bool> isLocalAuthSupportedOnDevice() async {
try {
- return Platform.isLinux
- ? await FlutterLocalAuthentication().canAuthenticate()
- : await LocalAuthentication().isDeviceSupported();
+ if (Platform.isLinux) {
+ return false;
+ }
+ return await LocalAuthentication().isDeviceSupported();
} on MissingPluginException {
return false;
}
diff --git a/mobile/packages/lock_screen/lib/lock_screen_settings.dart b/mobile/packages/lock_screen/lib/lock_screen_settings.dart
index 95e5a82f66..ca33934c4f 100644
--- a/mobile/packages/lock_screen/lib/lock_screen_settings.dart
+++ b/mobile/packages/lock_screen/lib/lock_screen_settings.dart
@@ -227,6 +227,9 @@ class LockScreenSettings {
}
bool shouldShowSystemLockScreen() {
+ if (Platform.isLinux) {
+ return false;
+ }
if (_preferences.containsKey(keyShouldShowLockScreen)) {
return _preferences.getBool(keyShouldShowLockScreen)!;
} else {
@@ -235,6 +238,9 @@ class LockScreenSettings {
}
Future<void> setSystemLockScreen(bool value) {
+ if (Platform.isLinux) {
+ return _preferences.setBool(keyShouldShowLockScreen, false);
+ }
return _preferences.setBool(keyShouldShowLockScreen, value);
}
diff --git a/mobile/packages/lock_screen/lib/ui/lock_screen.dart b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
index c8db507457..788ac11bf4 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
@@ -323,7 +323,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
? false
: await requestAuthentication(
context,
- context.strings.authToViewSecrets,
+ context.strings.unlock,
isOpeningApp: true,
);
_logger.finest("LockScreen Result $result $currentTimestamp");
diff --git a/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart b/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
index 12c5cb9427..0eb2391473 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
@@ -174,6 +174,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
Widget build(BuildContext context) {
final colorTheme = getEnteColorScheme(context);
final textTheme = getEnteTextTheme(context);
+ final bool showDeviceLockOption = !Platform.isLinux;
return Scaffold(
body: ConstrainedCustomScrollView(
slivers: <Widget>[
@@ -239,32 +240,37 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- MenuItemWidget(
- captionedTextWidget: CaptionedTextWidget(
- title: context.strings.deviceLock,
+ if (showDeviceLockOption) ...[
+ MenuItemWidget(
+ captionedTextWidget:
+ CaptionedTextWidget(
+ title: context.strings.deviceLock,
+ ),
+ surfaceExecutionStates: false,
+ alignCaptionedTextToLeft: true,
+ isTopBorderRadiusRemoved: false,
+ isBottomBorderRadiusRemoved: true,
+ menuItemColor: colorTheme.fillFaint,
+ trailingIcon: isSystemLockEnabled
+ ? Icons.check
+ : null,
+ trailingIconColor:
+ colorTheme.textBase,
+ onTap: () => _deviceLock(),
),
- surfaceExecutionStates: false,
- alignCaptionedTextToLeft: true,
- isTopBorderRadiusRemoved: false,
- isBottomBorderRadiusRemoved: true,
- menuItemColor: colorTheme.fillFaint,
- trailingIcon: isSystemLockEnabled
- ? Icons.check
- : null,
- trailingIconColor: colorTheme.textBase,
- onTap: () => _deviceLock(),
- ),
- DividerWidget(
- dividerType: DividerType.menuNoIcon,
- bgColor: colorTheme.fillFaint,
- ),
+ DividerWidget(
+ dividerType: DividerType.menuNoIcon,
+ bgColor: colorTheme.fillFaint,
+ ),
+ ],
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: context.strings.pinLock,
),
surfaceExecutionStates: false,
alignCaptionedTextToLeft: true,
- isTopBorderRadiusRemoved: true,
+ isTopBorderRadiusRemoved:
+ showDeviceLockOption,
isBottomBorderRadiusRemoved: true,
menuItemColor: colorTheme.fillFaint,
trailingIcon:
diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arb
index 337bac72b7..9bce30ef11 100644
--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb
+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb
@@ -619,6 +619,10 @@
"@tapToUnlock": {
"description": "Message prompting user to tap to unlock"
},
+ "unlock": "unlock",
+ "@unlock": {
+ "description": "Short action label used as the system authentication reason when unlocking the app"
+ },
"areYouSureYouWantToLogout": "Are you sure you want to logout?",
"@areYouSureYouWantToLogout": {
"description": "Confirmation message before logout"