Skip to content

Commit 3f846ec

Browse files
authored
Merge pull request #975 from Suda-Baka/master
支持对小说历史进行导出等
2 parents f8a5f2c + 7c7286c commit 3f846ec

14 files changed

+56
-1
lines changed

lib/l10n/intl_en.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Export bookmark tags",
276276
"export_tag_history": "Export tag history",
277277
"export_illust_history": "Export browsing history",
278+
"export_novel_history": "Export novel history",
279+
"import_novel_history": "Import novel history",
278280
"import_bookmark_tag": "Import bookmark tags",
279281
"import_tag_history": "Import tag history",
280282
"import_illust_history": "Import browsing history",

lib/l10n/intl_en_US.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Export bookmark tags",
276276
"export_tag_history": "Export tag history",
277277
"export_illust_history": "Export browsing history",
278+
"export_novel_history": "Export novel history",
279+
"import_novel_history": "Import novel history",
278280
"import_bookmark_tag": "Import bookmark tags",
279281
"import_tag_history": "Import tag history",
280282
"import_illust_history": "Import browsing history",

lib/l10n/intl_es.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@
266266
"export_bookmark_tag": "Export bookmark tags",
267267
"export_tag_history": "Export tag history",
268268
"export_illust_history": "Export browsing history",
269+
"export_novel_history": "Export novel history",
270+
"import_novel_history": "Import novel history",
269271
"import_bookmark_tag": "Import bookmark tags",
270272
"import_tag_history": "Import tag history",
271273
"import_illust_history": "Import browsing history",

lib/l10n/intl_id.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Ekspor tag penanda",
276276
"export_tag_history": "Ekspor riwayat tag",
277277
"export_illust_history": "Ekspor riwayat penelusuran",
278+
"export_novel_history": "Ekspor riwayat novel",
279+
"import_novel_history": "Impor riwayat novel",
278280
"import_bookmark_tag": "Impor tag penanda",
279281
"import_tag_history": "Impor riwayat tag",
280282
"import_illust_history": "Impor riwayat penelusuran",

lib/l10n/intl_id_ID.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Ekspor tag penanda",
276276
"export_tag_history": "Ekspor riwayat tag",
277277
"export_illust_history": "Ekspor riwayat penelusuran",
278+
"export_novel_history": "Ekspor riwayat novel",
279+
"import_novel_history": "Impor riwayat novel",
278280
"import_bookmark_tag": "Impor tag penanda",
279281
"import_tag_history": "Impor riwayat tag",
280282
"import_illust_history": "Impor riwayat penelusuran",

lib/l10n/intl_ja.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "お気に入りタグをエクスポート",
276276
"export_tag_history": "タグ履歴をエクスポート",
277277
"export_illust_history": "閲覧履歴をエクスポート",
278+
"export_novel_history": "小説の履歴をエクスポート",
279+
"import_novel_history": "小説の履歴をインポート",
278280
"import_bookmark_tag": "お気に入りタグをインポート",
279281
"import_tag_history": "タグ履歴をインポート",
280282
"import_illust_history": "閲覧履歴をインポート",

lib/l10n/intl_ko.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Export bookmark tags",
276276
"export_tag_history": "Export tag history",
277277
"export_illust_history": "Export browsing history",
278+
"export_novel_history": "소설 기록 내보내기",
279+
"import_novel_history": "소설 기록 가져오기",
278280
"import_bookmark_tag": "Import bookmark tags",
279281
"import_tag_history": "Import tag history",
280282
"import_illust_history": "Import browsing history",

lib/l10n/intl_ru.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Сохранить метки закладок.",
276276
"export_tag_history": "Сохранить историю меток.",
277277
"export_illust_history": "Сохранить историю просмотров.",
278+
"export_novel_history": "Экспорт истории романов",
279+
"import_novel_history": "Импорт истории романов",
278280
"import_bookmark_tag": "Перенести метки закладок.",
279281
"import_tag_history": "Перенести историю меток.",
280282
"import_illust_history": "Перенести историю просмотров.",

lib/l10n/intl_tr.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "Yer işaretleri etiketlerini dışa aktar",
276276
"export_tag_history": "Etiket geçmişini dışa aktar",
277277
"export_illust_history": "Göz atma geçmişini dışa aktar",
278+
"export_novel_history": "Roman geçmişini dışa aktar",
279+
"import_novel_history": "Roman geçmişini içe aktar",
278280
"import_bookmark_tag": "Yer işaretleri etiketlerini içe aktar",
279281
"import_tag_history": "Etiket geçmişini içe aktar",
280282
"import_illust_history": "Göz atma geçmişini içe aktar",

lib/l10n/intl_zh.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "导出收藏标签",
276276
"export_tag_history": "导出标签历史",
277277
"export_illust_history": "导出浏览历史",
278+
"export_novel_history": "导出小说历史",
279+
"import_novel_history": "导入小说历史",
278280
"import_bookmark_tag": "导入收藏标签",
279281
"import_tag_history": "导入标签历史",
280282
"import_illust_history": "导入浏览历史",

lib/l10n/intl_zh_CN.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "导出收藏标签",
276276
"export_tag_history": "导出标签历史",
277277
"export_illust_history": "导出浏览历史",
278+
"export_novel_history": "导出小说历史",
279+
"import_novel_history": "导入小说历史",
278280
"import_bookmark_tag": "导入收藏标签",
279281
"import_tag_history": "导入标签历史",
280282
"import_illust_history": "导入浏览历史",

lib/l10n/intl_zh_TW.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@
275275
"export_bookmark_tag": "匯出收藏標籤",
276276
"export_tag_history": "匯出標籤紀錄",
277277
"export_illust_history": "匯出瀏覽歷史",
278+
"export_novel_history": "匯出小說歷史",
279+
"import_novel_history": "匯入小說歷史",
278280
"import_bookmark_tag": "匯入收藏標籤",
279281
"import_tag_history": "匯入標籤紀錄",
280282
"import_illust_history": "匯入瀏覽歷史",

lib/page/hello/setting/data_export_page.dart

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:pixez/i18n.dart';
88
import 'package:pixez/main.dart';
99
import 'package:pixez/models/glance_illust_persist.dart';
1010
import 'package:pixez/page/history/history_store.dart';
11+
import 'package:pixez/page/novel/history/novel_history_store.dart';
1112

1213
class DataExportPage extends StatefulWidget {
1314
const DataExportPage({super.key});
@@ -128,6 +129,36 @@ class _DataExportPageState extends State<DataExportPage> {
128129
);
129130
}),
130131
Divider(),
132+
Consumer(builder: (context, ref, widget) {
133+
return ListTile(
134+
title: Text(I18n.of(context).export_title),
135+
subtitle: Text(I18n.of(context).export_novel_history),
136+
onTap: () async{
137+
try{
138+
await ref.read(novelHistoryProvider.notifier).fetch();
139+
await ref.read(novelHistoryProvider.notifier).exportData(context);
140+
} catch (e) {
141+
print(e);
142+
}
143+
},
144+
);
145+
}),
146+
Consumer(builder: (context, ref, widget) {
147+
return ListTile(
148+
title: Text(I18n.of(context).import_title),
149+
subtitle: Text(I18n.of(context).import_novel_history),
150+
onTap: () async {
151+
try {
152+
await ref.read(novelHistoryProvider.notifier).fetch();
153+
await ref.read(novelHistoryProvider.notifier).importData();
154+
} catch (e) {
155+
print(e);
156+
BotToast.showText(text: e.toString());
157+
}
158+
},
159+
);
160+
}),
161+
Divider(),
131162
Consumer(builder: (context, ref, widget) {
132163
return ListTile(
133164
title: Text(I18n.of(context).export_title),

lib/page/hello/setting/save_format_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class _SaveFormatPageState extends State<SaveFormatPage> {
168168
DataCell(Text(I18n.of(context).painter_name)),
169169
]),
170170
DataRow(cells: [
171-
DataCell(Text('part')),
171+
DataCell(Text('{part}')),
172172
DataCell(Text(I18n.of(context).which_part)),
173173
]),
174174
],

0 commit comments

Comments
 (0)