mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Improve comic source importing UI
This commit is contained in:
@@ -385,7 +385,9 @@
|
|||||||
"Long press zoom position": "长按缩放位置",
|
"Long press zoom position": "长按缩放位置",
|
||||||
"Press position": "按压位置",
|
"Press position": "按压位置",
|
||||||
"Screen center": "屏幕中心",
|
"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": {
|
"zh_TW": {
|
||||||
"Home": "首頁",
|
"Home": "首頁",
|
||||||
@@ -773,6 +775,8 @@
|
|||||||
"Long press zoom position": "長按縮放位置",
|
"Long press zoom position": "長按縮放位置",
|
||||||
"Press position": "按壓位置",
|
"Press position": "按壓位置",
|
||||||
"Screen center": "螢幕中心",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -374,8 +374,35 @@ class _ComicSourceListState extends State<_ComicSourceList> {
|
|||||||
} else {
|
} else {
|
||||||
var currentKey = ComicSource.all().map((e) => e.key).toList();
|
var currentKey = ComicSource.all().map((e) => e.key).toList();
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: json!.length,
|
itemCount: json!.length + 1,
|
||||||
itemBuilder: (context, index) {
|
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 key = json![index]["key"];
|
||||||
var action = currentKey.contains(key)
|
var action = currentKey.contains(key)
|
||||||
? const Icon(Icons.check, size: 20).paddingRight(8)
|
? const Icon(Icons.check, size: 20).paddingRight(8)
|
||||||
@@ -403,9 +430,14 @@ class _ComicSourceListState extends State<_ComicSourceList> {
|
|||||||
},
|
},
|
||||||
).fixHeight(32);
|
).fixHeight(32);
|
||||||
|
|
||||||
|
var description = json![index]["version"];
|
||||||
|
if (json![index]["description"] != null) {
|
||||||
|
description = "$description\n${json![index]["description"]}";
|
||||||
|
}
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(json![index]["name"]),
|
title: Text(json![index]["name"]),
|
||||||
subtitle: Text(json![index]["version"]),
|
subtitle: Text(description),
|
||||||
trailing: action,
|
trailing: action,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user