mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
(fix/feat): [Clients] Update interaction to reorder and view submenu, added category to queue tile (#420)
* Add LunaReorderableListDragger widget for handler * (feat): [NZBGet] Change interaction style (tap to view menu, draggable handle), add category to tile * (feat): [SABnzbd] Change interaction style (tap to view menu, draggable handle), add category to tile
This commit is contained in:
@@ -59,8 +59,13 @@ class NZBGetQueueData {
|
||||
}
|
||||
}
|
||||
|
||||
String get formattedCategory {
|
||||
if(category == null || category.isEmpty) return 'No Category';
|
||||
return category;
|
||||
}
|
||||
|
||||
String get subtitle {
|
||||
String size = '$downloaded/$sizeTotal MB';
|
||||
return '$statusString\t•\t$size\t•\t$percentageDone%';
|
||||
return '$statusString\t•\t$size\t•\t$percentageDone%\t•\t$formattedCategory';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ class NZBGetDialogs {
|
||||
content: List.generate(
|
||||
categories.length,
|
||||
(index) => LunaDialog.tile(
|
||||
text: categories[index].name,
|
||||
text: categories[index].name.isEmpty ? 'No Category' : categories[index].name,
|
||||
icon: Icons.category,
|
||||
iconColor: LunaColours.list(index),
|
||||
onTap: () => _setValues(true, categories[index]),
|
||||
|
||||
@@ -152,6 +152,7 @@ class _State extends State<NZBGetQueue> with TickerProviderStateMixin, Automatic
|
||||
itemCount: _queue.length,
|
||||
itemBuilder: (context, index) => NZBGetQueueTile(
|
||||
key: Key(_queue[index].id.toString()),
|
||||
index: index,
|
||||
data: _queue[index],
|
||||
queueContext: context,
|
||||
refresh: () => _fetchWithoutMessage(),
|
||||
|
||||
@@ -5,12 +5,14 @@ import 'package:lunasea/core.dart';
|
||||
import 'package:lunasea/modules/nzbget.dart';
|
||||
|
||||
class NZBGetQueueTile extends StatefulWidget {
|
||||
final int index;
|
||||
final NZBGetQueueData data;
|
||||
final Function refresh;
|
||||
final BuildContext queueContext;
|
||||
|
||||
NZBGetQueueTile({
|
||||
@required this.data,
|
||||
@required this.index,
|
||||
@required this.queueContext,
|
||||
@required this.refresh,
|
||||
Key key,
|
||||
@@ -49,11 +51,8 @@ class _State extends State<NZBGetQueueTile> {
|
||||
),
|
||||
],
|
||||
),
|
||||
trailing: LunaIconButton(
|
||||
icon: Icons.more_vert,
|
||||
onPressed: () async => _handlePopup(),
|
||||
color: widget.data.paused ? Colors.white30 : Colors.white,
|
||||
),
|
||||
trailing: LunaReorderableListDragger(index: widget.index),
|
||||
onTap: _handlePopup,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user