mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 13:53:41 +00:00
feat: new ui (#1455)
This commit is contained in:
742 files changed
+59951
-5934
No files matched your search
@@ -12,6 +12,8 @@ enum Protocol { http, bt, ed2k }
|
||||
enum ExtractStatus {
|
||||
@JsonValue('')
|
||||
none,
|
||||
@JsonValue('queued')
|
||||
queued,
|
||||
@JsonValue('extracting')
|
||||
extracting,
|
||||
@JsonValue('done')
|
||||
@@ -19,7 +21,7 @@ enum ExtractStatus {
|
||||
@JsonValue('error')
|
||||
error,
|
||||
@JsonValue('waitingParts')
|
||||
waitingParts
|
||||
waitingParts,
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
@@ -70,8 +72,51 @@ class Progress {
|
||||
this.extractProgress = 0,
|
||||
});
|
||||
|
||||
factory Progress.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProgressFromJson(json);
|
||||
factory Progress.fromJson(Map<String, dynamic> json) => _$ProgressFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ProgressToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class FileRuntimeStatus {
|
||||
int index;
|
||||
int size;
|
||||
int downloaded;
|
||||
|
||||
FileRuntimeStatus({required this.index, required this.size, required this.downloaded});
|
||||
|
||||
factory FileRuntimeStatus.fromJson(Map<String, dynamic> json) => _$FileRuntimeStatusFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$FileRuntimeStatusToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class TaskRuntimeStatus {
|
||||
Status status;
|
||||
int used;
|
||||
int speed;
|
||||
int downloaded;
|
||||
int total;
|
||||
int uploadSpeed;
|
||||
int uploaded;
|
||||
ExtractStatus extractStatus;
|
||||
int extractProgress;
|
||||
List<FileRuntimeStatus> files;
|
||||
|
||||
TaskRuntimeStatus({
|
||||
required this.status,
|
||||
required this.used,
|
||||
required this.speed,
|
||||
required this.downloaded,
|
||||
required this.total,
|
||||
required this.uploadSpeed,
|
||||
required this.uploaded,
|
||||
this.extractStatus = ExtractStatus.none,
|
||||
this.extractProgress = 0,
|
||||
required this.files,
|
||||
});
|
||||
|
||||
factory TaskRuntimeStatus.fromJson(Map<String, dynamic> json) => _$TaskRuntimeStatusFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TaskRuntimeStatusToJson(this);
|
||||
}
|
||||
Reference in new issue
Block a user