mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
feat: Add show details button to sync items
This commit is contained in:
parent
fefd2d9ad9
commit
0f4f829718
3 changed files with 23 additions and 3 deletions
|
|
@ -125,6 +125,10 @@ class AuthGuard extends AutoRouteGuard {
|
|||
|
||||
@override
|
||||
Future<void> onNavigation(NavigationResolver resolver, StackRouter router) async {
|
||||
if (resolver.route == router.current.route) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ref.read(userProvider) != null ||
|
||||
resolver.routeName == const LoginRoute().routeName ||
|
||||
resolver.routeName == SplashRoute().routeName) {
|
||||
|
|
|
|||
|
|
@ -92,8 +92,7 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
|
|||
children: [
|
||||
if (baseItem != null) ...{
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
spacing: 16,
|
||||
children: [
|
||||
SizedBox(
|
||||
|
|
@ -193,7 +192,10 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
|
|||
),
|
||||
},
|
||||
if (children?.isNotEmpty == true) ...[
|
||||
const Divider(),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Divider(),
|
||||
),
|
||||
...children!.map(
|
||||
(e) => ChildSyncWidget(syncedChild: e),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:background_downloader/background_downloader.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:iconsax_plus/iconsax_plus.dart';
|
||||
|
|
@ -51,6 +52,19 @@ class SyncOptionsButton extends ConsumerWidget {
|
|||
final enqueuedTasks = syncTasks.where((element) => element.status == TaskStatus.enqueued).toList();
|
||||
final pausedTasks = syncTasks.where((element) => element.status == TaskStatus.paused).toList();
|
||||
return <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
child: Row(
|
||||
spacing: 12,
|
||||
children: [
|
||||
const Icon(IconsaxPlusLinear.arrow_right),
|
||||
Text(context.localized.showDetails),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
syncedItem.itemModel?.navigateTo(context);
|
||||
context.maybePop();
|
||||
},
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: Row(
|
||||
spacing: 12,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue