Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove unused background image assets and related configuration from lock screen

AmanRajSinghMouryaddc9a1e27f07
diff --git a/mobile/apps/auth/assets/2.0x/loading_photos_background.png b/mobile/apps/auth/assets/2.0x/loading_photos_background.png
deleted file mode 100644
index 74d1045e5c..0000000000
Binary files a/mobile/apps/auth/assets/2.0x/loading_photos_background.png and /dev/null differ
diff --git a/mobile/apps/auth/assets/3.0x/loading_photos_background.png b/mobile/apps/auth/assets/3.0x/loading_photos_background.png
deleted file mode 100644
index d49cdaa712..0000000000
Binary files a/mobile/apps/auth/assets/3.0x/loading_photos_background.png and /dev/null differ
diff --git a/mobile/apps/auth/assets/loading_photos_background.png b/mobile/apps/auth/assets/loading_photos_background.png
deleted file mode 100644
index 268b484476..0000000000
Binary files a/mobile/apps/auth/assets/loading_photos_background.png and /dev/null differ
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
deleted file mode 100644
index e35e07f867..0000000000
Binary files a/mobile/packages/lock_screen/assets/2.0x/locker_lockscreen_background.png and /dev/null 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
deleted file mode 100644
index 4b429c3570..0000000000
Binary files a/mobile/packages/lock_screen/assets/3.0x/locker_lockscreen_background.png and /dev/null differ
diff --git a/mobile/packages/lock_screen/assets/locker_lockscreen_background.png b/mobile/packages/lock_screen/assets/locker_lockscreen_background.png
deleted file mode 100644
index 1a7219f931..0000000000
Binary files a/mobile/packages/lock_screen/assets/locker_lockscreen_background.png and /dev/null differ
diff --git a/mobile/packages/lock_screen/lib/lock_screen_config.dart b/mobile/packages/lock_screen/lib/lock_screen_config.dart
index 21dac928d4..e40afb24e5 100644
--- a/mobile/packages/lock_screen/lib/lock_screen_config.dart
+++ b/mobile/packages/lock_screen/lib/lock_screen_config.dart
@@ -14,7 +14,6 @@ class LockScreenConfig {
final Color? pinBoxBorderColor;
final Color? pinBoxBackgroundColor;
final bool useDynamicColors;
- final String backgroundImagePath;
const LockScreenConfig({
required this.titleWidget,
@@ -26,7 +25,6 @@ class LockScreenConfig {
this.pinBoxBorderColor,
this.pinBoxBackgroundColor,
this.useDynamicColors = false,
- required this.backgroundImagePath,
});
/// Default configuration for Auth app
@@ -40,7 +38,6 @@ class LockScreenConfig {
pinBoxBorderColor: Color.fromRGBO(45, 194, 98, 1.0),
pinBoxBackgroundColor: null,
useDynamicColors: false,
- backgroundImagePath: 'assets/loading_photos_background.png',
);
/// Configuration for Locker app
@@ -54,7 +51,6 @@ 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 10f4af54d6..3ffa552274 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
@@ -4,7 +4,6 @@ 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';
@@ -38,7 +37,6 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
int invalidAttemptCount = 0;
int remainingTimeInSeconds = 0;
final _lockscreenSetting = LockScreenSettings.instance;
- late Brightness _platformBrightness;
// Suppress auto-auth only for the initial manual presentation.
bool _suppressAutoPrompt = false;
@@ -57,8 +55,6 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
_showLockScreen(source: "postFrameInit");
}
});
- _platformBrightness =
- SchedulerBinding.instance.platformDispatcher.platformBrightness;
}
@override
@@ -83,121 +79,108 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
if (isTimerRunning) return;
_showLockScreen(source: "tap");
},
- child: Container(
- decoration: BoxDecoration(
- image: DecorationImage(
- opacity: _platformBrightness == Brightness.light ? 0.08 : 0.12,
- image: ExactAssetImage(
- LockScreenConfig.current.backgroundImagePath,
- ),
- fit: BoxFit.cover,
- ),
- ),
- child: Center(
- child: Column(
- children: [
- const Spacer(),
- SizedBox(
- height: 120,
- width: 120,
- child: Stack(
- alignment: Alignment.center,
- children: [
- Container(
- width: 82,
- height: 82,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- gradient: LinearGradient(
- colors: [
- Colors.grey.shade500.withValues(alpha: 0.2),
- Colors.grey.shade50.withValues(alpha: 0.1),
- Colors.grey.shade400.withValues(alpha: 0.2),
- Colors.grey.shade300.withValues(alpha: 0.4),
- ],
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(1.0),
- child: Container(
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: colorTheme.backgroundBase,
- ),
- ),
+ child: Center(
+ child: Column(
+ children: [
+ const Spacer(),
+ SizedBox(
+ height: 120,
+ width: 120,
+ child: Stack(
+ alignment: Alignment.center,
+ children: [
+ Container(
+ width: 82,
+ height: 82,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ gradient: LinearGradient(
+ colors: [
+ Colors.grey.shade500.withValues(alpha: 0.2),
+ Colors.grey.shade50.withValues(alpha: 0.1),
+ Colors.grey.shade400.withValues(alpha: 0.2),
+ Colors.grey.shade300.withValues(alpha: 0.4),
+ ],
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
),
),
- SizedBox(
- height: 75,
- width: 75,
- child: TweenAnimationBuilder<double>(
- tween: Tween<double>(
- begin: isTimerRunning ? 0 : 1,
- end: isTimerRunning
- ? _getFractionOfTimeElapsed()
- : 1,
- ),
- duration: const Duration(seconds: 1),
- builder: (context, value, _) =>
- CircularProgressIndicator(
- backgroundColor: colorTheme.fillFaintPressed,
- value: value,
- color: colorTheme.primary400,
- strokeWidth: 1.5,
+ child: Padding(
+ padding: const EdgeInsets.all(1.0),
+ child: Container(
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: colorTheme.backgroundBase,
),
),
),
- Icon(
- Icons.lock,
- size: 30,
- color: colorTheme.textBase,
+ ),
+ SizedBox(
+ height: 75,
+ width: 75,
+ child: TweenAnimationBuilder<double>(
+ tween: Tween<double>(
+ begin: isTimerRunning ? 0 : 1,
+ end: isTimerRunning ? _getFractionOfTimeElapsed() : 1,
+ ),
+ duration: const Duration(seconds: 1),
+ builder: (context, value, _) =>
+ CircularProgressIndicator(
+ backgroundColor: colorTheme.fillFaintPressed,
+ value: value,
+ color: colorTheme.primary400,
+ strokeWidth: 1.5,
+ ),
),
- ],
- ),
+ ),
+ Icon(
+ Icons.lock,
+ size: 30,
+ color: colorTheme.textBase,
+ ),
+ ],
),
- const Spacer(),
- isTimerRunning
- ? Stack(
- alignment: Alignment.center,
- children: [
- Text(
- context.strings.tooManyIncorrectAttempts,
- style: textTheme.small,
- )
- .animate(
- delay: const Duration(milliseconds: 2000),
- )
- .fadeOut(
- duration: 400.ms,
- curve: Curves.easeInOutCirc,
- ),
- Text(
- _formatTime(remainingTimeInSeconds),
- style: textTheme.small,
- )
- .animate(
- delay: const Duration(milliseconds: 2250),
- )
- .fadeIn(
- duration: 400.ms,
- curve: Curves.easeInOutCirc,
- ),
- ],
- )
- : GestureDetector(
- onTap: () => _showLockScreen(source: "tap"),
- child: Text(
- context.strings.tapToUnlock,
+ ),
+ const Spacer(),
+ isTimerRunning
+ ? Stack(
+ alignment: Alignment.center,
+ children: [
+ Text(
+ context.strings.tooManyIncorrectAttempts,
style: textTheme.small,
- ),
+ )
+ .animate(
+ delay: const Duration(milliseconds: 2000),
+ )
+ .fadeOut(
+ duration: 400.ms,
+ curve: Curves.easeInOutCirc,
+ ),
+ Text(
+ _formatTime(remainingTimeInSeconds),
+ style: textTheme.small,
+ )
+ .animate(
+ delay: const Duration(milliseconds: 2250),
+ )
+ .fadeIn(
+ duration: 400.ms,
+ curve: Curves.easeInOutCirc,
+ ),
+ ],
+ )
+ : GestureDetector(
+ onTap: () => _showLockScreen(source: "tap"),
+ child: Text(
+ context.strings.tapToUnlock,
+ style: textTheme.small,
),
- const Padding(
- padding: EdgeInsets.only(bottom: 24),
- ),
- ],
- ),
+ ),
+ const Padding(
+ padding: EdgeInsets.only(bottom: 24),
+ ),
+ ],
),
),
),