From 2063eee82b37ec349880a085fe44f1c6aa4d391c Mon Sep 17 00:00:00 2001 From: nyne Date: Sat, 30 Nov 2024 20:52:55 +0800 Subject: [PATCH] fix #76 --- assets/translation.json | 4 ++-- lib/pages/home_page.dart | 2 +- lib/utils/import_comic.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/translation.json b/assets/translation.json index 788b30b..031c63d 100644 --- a/assets/translation.json +++ b/assets/translation.json @@ -152,7 +152,7 @@ "If the directory contains a file named 'cover.*', it will be used as the cover image. Otherwise the first image will be used." : "如果目录包含一个名为'cover.*'的文件,它将被用作封面图片。否则将使用第一张图片。", "The directory name will be used as the comic title. And the name of chapter directories will be used as the chapter titles.\n" : "目录名称将被用作漫画标题。章节目录的名称将被用作章节标题。\n", "Export as cbz": "导出为cbz", - "Select a cbz file." : "选择一个cbz文件", + "Select a cbz/zip file." : "选择一个cbz/zip文件", "A cbz file" : "一个cbz文件", "Fullscreen": "全屏", "Exit": "退出", @@ -399,7 +399,7 @@ "If the directory contains a file named 'cover.*', it will be used as the cover image. Otherwise the first image will be used." : "如果目錄包含一個名為'cover.*'的文件,它將被用作封面圖片。否則將使用第一張圖片。", "The directory name will be used as the comic title. And the name of chapter directories will be used as the chapter titles.\n" : "目錄名稱將被用作漫畫標題。章節目錄的名稱將被用作章節標題。\n", "Export as cbz": "匯出為cbz", - "Select a cbz file." : "選擇一個cbz文件", + "Select a cbz/zip file." : "選擇一個cbz/zip文件", "A cbz file" : "一個cbz文件", "Fullscreen": "全螢幕", "Exit": "退出", diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 6d4614d..018076b 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -511,7 +511,7 @@ class _ImportComicsWidgetState extends State<_ImportComicsWidget> { String info = [ "Select a directory which contains the comic files.".tl, "Select a directory which contains the comic directories.".tl, - "Select a cbz file.".tl, + "Select a cbz/zip file.".tl, "Select an EhViewer database and a download folder.".tl ][type]; List importMethods = [ diff --git a/lib/utils/import_comic.dart b/lib/utils/import_comic.dart index 21eb5cf..157e306 100644 --- a/lib/utils/import_comic.dart +++ b/lib/utils/import_comic.dart @@ -20,7 +20,7 @@ class ImportComic { const ImportComic({this.selectedFolder, this.copyToLocal = true}); Future cbz() async { - var file = await selectFile(ext: ['cbz']); + var file = await selectFile(ext: ['cbz', 'zip']); Map> imported = {}; if(file == null) { return false;