Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add background image configuration for lock screen

AmanRajSinghMourya1f8da4bcf13b
diff --git a/mobile/packages/lock_screen/assets/2.0x/locker_lockscreen_background.png b/mobile/packages/lock_screen/assets/2.0x/locker_lockscreen_background.png
new file mode 100644
index 0000000000..e35e07f867
Binary files /dev/null and b/mobile/packages/lock_screen/assets/2.0x/locker_lockscreen_background.png differ
diff --git a/mobile/packages/lock_screen/assets/3.0x/locker_lockscreen_background.png b/mobile/packages/lock_screen/assets/3.0x/locker_lockscreen_background.png
new file mode 100644
index 0000000000..4b429c3570
Binary files /dev/null and b/mobile/packages/lock_screen/assets/3.0x/locker_lockscreen_background.png differ
diff --git a/mobile/packages/lock_screen/assets/locker_lockscreen_background.png b/mobile/packages/lock_screen/assets/locker_lockscreen_background.png
new file mode 100644
index 0000000000..1a7219f931
Binary files /dev/null and b/mobile/packages/lock_screen/assets/locker_lockscreen_background.png differ
diff --git a/mobile/packages/lock_screen/lib/lock_screen_config.dart b/mobile/packages/lock_screen/lib/lock_screen_config.dart
index e40afb24e5..21dac928d4 100644
--- a/mobile/packages/lock_screen/lib/lock_screen_config.dart
+++ b/mobile/packages/lock_screen/lib/lock_screen_config.dart
@@ -14,6 +14,7 @@ class LockScreenConfig {
final Color? pinBoxBorderColor;
final Color? pinBoxBackgroundColor;
final bool useDynamicColors;
+ final String backgroundImagePath;
const LockScreenConfig({
required this.titleWidget,
@@ -25,6 +26,7 @@ class LockScreenConfig {
this.pinBoxBorderColor,
this.pinBoxBackgroundColor,
this.useDynamicColors = false,
+ required this.backgroundImagePath,
});
/// Default configuration for Auth app
@@ -38,6 +40,7 @@ class LockScreenConfig {
pinBoxBorderColor: Color.fromRGBO(45, 194, 98, 1.0),
pinBoxBackgroundColor: null,
useDynamicColors: false,
+ backgroundImagePath: 'assets/loading_photos_background.png',
);
/// Configuration for Locker app
@@ -51,6 +54,7 @@ class LockScreenConfig {
pinBoxBorderColor: null,
pinBoxBackgroundColor: null,
useDynamicColors: true,
+ backgroundImagePath: 'packages/ente_lock_screen/assets/locker_lockscreen_background.png',
);
/// Get current configuration based on AppThemeConfig
diff --git a/mobile/packages/lock_screen/lib/ui/lock_screen.dart b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
index df0409a99e..10f4af54d6 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
@@ -4,6 +4,7 @@ import 'dart:math';
import 'package:ente_accounts/ente_accounts.dart';
import 'package:ente_configuration/base_configuration.dart';
import 'package:ente_lock_screen/auth_util.dart';
+import 'package:ente_lock_screen/lock_screen_config.dart';
import 'package:ente_lock_screen/lock_screen_settings.dart';
import 'package:ente_lock_screen/ui/app_lock.dart';
import 'package:ente_strings/ente_strings.dart';
@@ -86,8 +87,8 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
decoration: BoxDecoration(
image: DecorationImage(
opacity: _platformBrightness == Brightness.light ? 0.08 : 0.12,
- image: const ExactAssetImage(
- 'assets/loading_photos_background.png',
+ image: ExactAssetImage(
+ LockScreenConfig.current.backgroundImagePath,
),
fit: BoxFit.cover,
),