mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -07: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
|
@override
|
||||||
Future<void> onNavigation(NavigationResolver resolver, StackRouter router) async {
|
Future<void> onNavigation(NavigationResolver resolver, StackRouter router) async {
|
||||||
|
if (resolver.route == router.current.route) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ref.read(userProvider) != null ||
|
if (ref.read(userProvider) != null ||
|
||||||
resolver.routeName == const LoginRoute().routeName ||
|
resolver.routeName == const LoginRoute().routeName ||
|
||||||
resolver.routeName == SplashRoute().routeName) {
|
resolver.routeName == SplashRoute().routeName) {
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,7 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
|
||||||
children: [
|
children: [
|
||||||
if (baseItem != null) ...{
|
if (baseItem != null) ...{
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.max,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
spacing: 16,
|
spacing: 16,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -193,7 +192,10 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
if (children?.isNotEmpty == true) ...[
|
if (children?.isNotEmpty == true) ...[
|
||||||
const Divider(),
|
const Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 16),
|
||||||
|
child: Divider(),
|
||||||
|
),
|
||||||
...children!.map(
|
...children!.map(
|
||||||
(e) => ChildSyncWidget(syncedChild: e),
|
(e) => ChildSyncWidget(syncedChild: e),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:background_downloader/background_downloader.dart';
|
import 'package:background_downloader/background_downloader.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:iconsax_plus/iconsax_plus.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 enqueuedTasks = syncTasks.where((element) => element.status == TaskStatus.enqueued).toList();
|
||||||
final pausedTasks = syncTasks.where((element) => element.status == TaskStatus.paused).toList();
|
final pausedTasks = syncTasks.where((element) => element.status == TaskStatus.paused).toList();
|
||||||
return <PopupMenuEntry>[
|
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(
|
PopupMenuItem(
|
||||||
child: Row(
|
child: Row(
|
||||||
spacing: 12,
|
spacing: 12,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue