diff --git a/app/src/main/assets/help/bookSourcesHelp.md b/app/src/main/assets/help/bookSourcesHelp.md new file mode 100644 index 000000000..3cadf2a67 --- /dev/null +++ b/app/src/main/assets/help/bookSourcesHelp.md @@ -0,0 +1,25 @@ +# 书源管理界面帮助 + +* 书源右上角标志 + * 绿点表示书源有发现,且启用了发现 + * 红点表示书源有发现,但是未启用 + * 没有标志表示此书源没有发现 +* 右上角有分组菜单,可以按分组筛选书源 +* 右上角更多菜单里包含 + * 新建书源 + * 本地导入 + * 网络导入 + * 二维码导入 + * 分享选中书源 +* 选择书源的更多操作在右下角的菜单里面,操作都是针对选择的书源 + * 启用所选 + * 禁用所选 + * 添加分组 + * 移除分组 + * 启用发现 + * 禁用发现 + * 置顶所选 + * 置底所选 + * 导出所选 + * 校验所选 +* 校验失败的书源分组会加上"失效",选择"失效"分组即可批量操作 \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/help/LocalConfig.kt b/app/src/main/java/io/legado/app/help/LocalConfig.kt index e4e651c77..11c9ce430 100644 --- a/app/src/main/java/io/legado/app/help/LocalConfig.kt +++ b/app/src/main/java/io/legado/app/help/LocalConfig.kt @@ -45,4 +45,12 @@ object LocalConfig { return value } + val isFirstOpenBookSources: Boolean + get() { + val value = localConfig.getBoolean("firstOpenBookSources", true) + if (value) { + localConfig.edit { putBoolean("firstOpenBookSources", false) } + } + return value + } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index a50a1712f..44e49ca3f 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -25,6 +25,7 @@ import io.legado.app.constant.AppPattern import io.legado.app.constant.EventBus import io.legado.app.data.entities.BookSource import io.legado.app.help.IntentDataHelp +import io.legado.app.help.LocalConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.primaryTextColor @@ -35,6 +36,7 @@ import io.legado.app.ui.filepicker.FilePicker import io.legado.app.ui.filepicker.FilePickerDialog import io.legado.app.ui.qrcode.QrCodeActivity import io.legado.app.ui.widget.SelectActionBar +import io.legado.app.ui.widget.dialog.TextDialog import io.legado.app.ui.widget.recycler.DragSelectTouchHelper import io.legado.app.ui.widget.recycler.ItemTouchCallback import io.legado.app.ui.widget.recycler.VerticalDivider @@ -75,6 +77,9 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity initLiveDataBookSource() initLiveDataGroup() initSelectActionBar() + if (LocalConfig.isFirstOpenBookSources) { + showHelp() + } } override fun onCompatCreateOptionsMenu(menu: Menu): Boolean { @@ -154,6 +159,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity R.id.menu_disabled_group -> { search_view.setQuery(getString(R.string.disabled), true) } + R.id.menu_help -> showHelp() } if (item.groupId == R.id.source_group) { search_view.setQuery(item.title, true) @@ -226,6 +232,11 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity }) } + private fun showHelp() { + val text = String(assets.open("help/bookSourcesHelp.md").readBytes()) + TextDialog.show(supportFragmentManager, text, TextDialog.MD) + } + private fun sortCheck(sortId: Int) { if (sort == sortId) { sortAscending += 1 diff --git a/app/src/main/res/menu/book_source.xml b/app/src/main/res/menu/book_source.xml index 2e32f7c77..8bc90e484 100644 --- a/app/src/main/res/menu/book_source.xml +++ b/app/src/main/res/menu/book_source.xml @@ -102,5 +102,10 @@ android:title="@string/share_selected_source" app:showAsAction="never" /> +