Add export zip dialog

This commit is contained in:
2024-05-30 21:21:13 +08:00
parent 490052a1f8
commit 9e0aa9ca84
12 changed files with 489 additions and 6 deletions

View File

@@ -70,7 +70,8 @@ class _TaskView extends State<TaskView> {
Widget _buildText(BuildContext context) {
final i18n = AppLocalizations.of(context)!;
if (widget.task.base.type == TaskType.download) {
final typ = widget.task.base.type;
if (typ == TaskType.download) {
final gid = widget.task.base.gid;
final title = tasks.meta.containsKey(gid)
? tasks.meta[gid]!.preferredTitle
@@ -78,6 +79,14 @@ class _TaskView extends State<TaskView> {
return Text("${i18n.downloadTask} $title",
maxLines: 1, overflow: TextOverflow.ellipsis);
}
if (typ == TaskType.exportZip) {
final gid = widget.task.base.gid;
final title = tasks.gmeta.containsKey(gid)
? tasks.gmeta[gid]!.preferredTitle
: gid.toString();
return Text("${i18n.exportZipTask} $title",
maxLines: 1, overflow: TextOverflow.ellipsis);
}
return Container();
}