diff --git a/assets/translation.json b/assets/translation.json index 51e8819..9749fc6 100644 --- a/assets/translation.json +++ b/assets/translation.json @@ -385,7 +385,9 @@ "Long press zoom position": "长按缩放位置", "Press position": "按压位置", "Screen center": "屏幕中心", - "Suggestions": "建议" + "Suggestions": "建议", + "Do not report any issues related to sources to App repo.": "请不要向App仓库报告任何与源相关的问题", + "Click the setting icon to change the source list url.": "点击设置图标更改源列表URL" }, "zh_TW": { "Home": "首頁", @@ -773,6 +775,8 @@ "Long press zoom position": "長按縮放位置", "Press position": "按壓位置", "Screen center": "螢幕中心", - "Suggestions": "建議" + "Suggestions": "建議", + "Do not report any issues related to sources to App repo.": "請不要向App倉庫報告任何與源相關的問題", + "Click the setting icon to change the source list url.": "點擊設定圖示更改源列表URL" } } diff --git a/lib/pages/comic_source_page.dart b/lib/pages/comic_source_page.dart index b72af0e..49dd89f 100644 --- a/lib/pages/comic_source_page.dart +++ b/lib/pages/comic_source_page.dart @@ -374,8 +374,35 @@ class _ComicSourceListState extends State<_ComicSourceList> { } else { var currentKey = ComicSource.all().map((e) => e.key).toList(); return ListView.builder( - itemCount: json!.length, + itemCount: json!.length + 1, itemBuilder: (context, index) { + if (index == 0) { + return Container( + margin: const EdgeInsets.symmetric(horizontal: 12), + padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: context.colorScheme.primaryContainer, + ), + child: Row( + children: [ + const Icon(Icons.info_outline), + const SizedBox(width: 8), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Do not report any issues related to sources to App repo.".tl), + Text("Click the setting icon to change the source list url.".tl), + ], + ), + ), + ], + ), + ); + } + index--; + var key = json![index]["key"]; var action = currentKey.contains(key) ? const Icon(Icons.check, size: 20).paddingRight(8) @@ -403,9 +430,14 @@ class _ComicSourceListState extends State<_ComicSourceList> { }, ).fixHeight(32); + var description = json![index]["version"]; + if (json![index]["description"] != null) { + description = "$description\n${json![index]["description"]}"; + } + return ListTile( title: Text(json![index]["name"]), - subtitle: Text(json![index]["version"]), + subtitle: Text(description), trailing: action, ); },