mirror of
https://github.com/immich-app/immich.git
synced 2025-07-31 15:08:44 -04:00
chore: migration continue button (#20000)
* feat: add toggle to switch between Isar and Sqlite * reset sqlite on beta * start sync on app open in new timeline * fix lint * migrate hashes when new timeline is selected * migrate hashes immediately after beta is enabled * show loading indicator in change timeline page * some stylings * fix some styling issue * release resources on isolate close * replace route and styling * handle migration back to old timeline * check if a provider is mounted before calling dispose on it * styling * styling and button --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
8491fe459d
commit
546f841b2c
@ -373,7 +373,7 @@
|
||||
"admin_password": "Admin Password",
|
||||
"administration": "Administration",
|
||||
"advanced": "Advanced",
|
||||
"advanced_settings_beta_timeline_subtitle": "Try the new app experience.",
|
||||
"advanced_settings_beta_timeline_subtitle": "Try the new app experience",
|
||||
"advanced_settings_beta_timeline_title": "Beta Timeline",
|
||||
"advanced_settings_enable_alternate_media_filter_subtitle": "Use this option to filter media during sync based on alternate criteria. Only try this if you have issues with the app detecting all albums.",
|
||||
"advanced_settings_enable_alternate_media_filter_title": "[EXPERIMENTAL] Use alternate device album sync filter",
|
||||
|
@ -57,14 +57,6 @@ class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {
|
||||
await ref.read(backgroundSyncProvider).cancel();
|
||||
}
|
||||
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
context.replaceRoute(
|
||||
widget.switchingToBeta
|
||||
? const TabShellRoute()
|
||||
: const TabControllerRoute(),
|
||||
);
|
||||
});
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
HapticFeedback.heavyImpact();
|
||||
@ -104,7 +96,7 @@ class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {
|
||||
duration: Durations.long4,
|
||||
child: hasMigrated
|
||||
? Text(
|
||||
"Migration success. Navigating to the new timeline...",
|
||||
"Migration success!",
|
||||
style: context.textTheme.titleMedium,
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
@ -115,6 +107,20 @@ class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (hasMigrated)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16.0),
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
context.replaceRoute(
|
||||
widget.switchingToBeta
|
||||
? const TabShellRoute()
|
||||
: const TabControllerRoute(),
|
||||
);
|
||||
},
|
||||
child: const Text("Continue"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -143,7 +143,7 @@ class _MobileLayout extends StatelessWidget {
|
||||
.toList();
|
||||
return ListView(
|
||||
physics: const ClampingScrollPhysics(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
padding: const EdgeInsets.only(top: 10.0, bottom: 56),
|
||||
children: [
|
||||
const BetaTimelineListTile(),
|
||||
...settings,
|
||||
|
@ -81,7 +81,9 @@ class AssetNotifier extends StateNotifier<bool> {
|
||||
await _albumService.refreshDeviceAlbums();
|
||||
} finally {
|
||||
_getAllAssetInProgress = false;
|
||||
state = false;
|
||||
if (mounted) {
|
||||
state = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,13 +100,27 @@ class _BetaTimelineListTileState extends ConsumerState<BetaTimelineListTile>
|
||||
[ChangeExperienceRoute(switchingToBeta: value)],
|
||||
);
|
||||
},
|
||||
child: const Text("Yes"),
|
||||
child: Text(
|
||||
"YES",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: context.primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
context.pop();
|
||||
},
|
||||
child: const Text("No"),
|
||||
child: Text(
|
||||
"NO",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: context.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
@ -116,18 +130,18 @@ class _BetaTimelineListTileState extends ConsumerState<BetaTimelineListTile>
|
||||
|
||||
final gradientColors = [
|
||||
Color.lerp(
|
||||
context.primaryColor.withValues(alpha: 0.5),
|
||||
context.primaryColor.withValues(alpha: 0.3),
|
||||
context.primaryColor.withValues(alpha: 0.1),
|
||||
_gradientAnimation.value,
|
||||
)!,
|
||||
Color.lerp(
|
||||
context.primaryColor.withValues(alpha: 0.2),
|
||||
context.primaryColor.withValues(alpha: 0.4),
|
||||
context.primaryColor.withValues(alpha: 0.6),
|
||||
_gradientAnimation.value,
|
||||
)!,
|
||||
Color.lerp(
|
||||
context.primaryColor.withValues(alpha: 0.1),
|
||||
context.primaryColor.withValues(alpha: 0.3),
|
||||
context.primaryColor.withValues(alpha: 0.5),
|
||||
_gradientAnimation.value,
|
||||
)!,
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user