mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 04:43:41 +00:00
feat: queue extractions (#1227)
This commit is contained in:
1 parent
de0afb1481
commit
24db9bb58b
35 files changed
+1047
-159
No files matched your search
@@ -195,6 +195,8 @@ class BuildTaskListView extends GetView {
|
||||
return 'extractDone'.tr;
|
||||
case ExtractStatus.error:
|
||||
return 'extractError'.tr;
|
||||
case ExtractStatus.waitingParts:
|
||||
return 'waitingParts'.tr;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
@@ -333,13 +335,19 @@ class BuildTaskListView extends GetView {
|
||||
// Extraction status row
|
||||
if (task.progress.extractStatus != ExtractStatus.none)
|
||||
Builder(builder: (context) {
|
||||
final isExtracting =
|
||||
task.progress.extractStatus == ExtractStatus.extracting;
|
||||
final isExtracting = task.progress.extractStatus ==
|
||||
ExtractStatus.extracting;
|
||||
final isExtractDone =
|
||||
task.progress.extractStatus == ExtractStatus.done;
|
||||
final isWaitingParts = task.progress.extractStatus ==
|
||||
ExtractStatus.waitingParts;
|
||||
final statusColor = isExtracting
|
||||
? Get.theme.colorScheme.primary
|
||||
: (isExtractDone ? Colors.green : Colors.red);
|
||||
: (isExtractDone
|
||||
? Colors.green
|
||||
: isWaitingParts
|
||||
? Colors.orange
|
||||
: Colors.red);
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
@@ -367,7 +375,7 @@ class BuildTaskListView extends GetView {
|
||||
).padding(left: 18),
|
||||
),
|
||||
],
|
||||
).padding(top: 4, bottom: isExtracting ? 0 : 8),
|
||||
).padding(top: 4, bottom: 8),
|
||||
// Extraction progress bar
|
||||
if (isExtracting)
|
||||
LinearProgressIndicator(
|
||||
|
||||
@@ -52,9 +52,9 @@ class _CompactCheckboxState extends State<CompactCheckbox> {
|
||||
widget.scale == null
|
||||
? checkbox
|
||||
: Transform.scale(
|
||||
scale: widget.scale,
|
||||
child: checkbox,
|
||||
),
|
||||
scale: widget.scale,
|
||||
child: checkbox,
|
||||
),
|
||||
Text(
|
||||
widget.label,
|
||||
style: widget.textStyle,
|
||||
|
||||
@@ -246,7 +246,8 @@ class _DirectorySelectorState extends State<DirectorySelector> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.arrow_forward, size: 14, color: Colors.blue[700]),
|
||||
Icon(Icons.arrow_forward,
|
||||
size: 14, color: Colors.blue[700]),
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: Text(
|
||||
@@ -263,9 +264,10 @@ class _DirectorySelectorState extends State<DirectorySelector> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return TextFormField(
|
||||
readOnly: widget.allowEdit ? false : (Util.isWeb() ? false : true),
|
||||
readOnly:
|
||||
widget.allowEdit ? false : (Util.isWeb() ? false : true),
|
||||
controller: widget.controller,
|
||||
decoration: widget.showLabel
|
||||
? InputDecoration(
|
||||
|
||||
Reference in new issue
Block a user