pull/1319/head
gedoor 3 years ago
parent fa8d85e721
commit d979cf4aa1
  1. 16
      app/src/main/assets/updateLog.md
  2. 2
      app/src/main/java/io/legado/app/data/entities/rule/ContentRule.kt
  3. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  4. 2
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  5. 5
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt

@ -16,19 +16,9 @@
1. 书架菜单添加了日志,更新失败的和下载失败的信息会显示在里面
2. 书源添加校验关键字,有校验关键字的书源用此关键字校验
3. 正文规则添加操作规则,可执行js和打开网页,格式:
```json
[
{
"name": "购买",
"action": "http:xxxx"
}
]
```
4. 目录添加购买标识规则
5. 正文标题使用替换,简繁转换,正文中已书名,标题开头的自动去重
3. 目录添加购买标识规则
4. 正文标题使用替换,简繁转换,正文中已书名,标题开头的自动去重
5. 其它一些优化
**2021/09/08**

@ -11,5 +11,5 @@ data class ContentRule(
var sourceRegex: String? = null,
var replaceRegex: String? = null, //替换规则
var imageStyle: String? = null, //默认大小居中,FULL最大宽度
var actions: String? = null //操作
var payAction: String? = null, //购买操作,url/js
) : Parcelable

@ -143,9 +143,11 @@ class ReadMenu @JvmOverloads constructor(
tvChapterUrl.setOnClickListener {
context.openUrl(binding.tvChapterUrl.text.toString())
}
//登录
tvLogin.setOnClickListener {
callBack.showLogin()
}
//亮度跟随
ivBrightnessAuto.setOnClickListener {
context.putPrefBoolean("brightnessAuto", !brightnessAuto())
upBrightnessState()

@ -275,7 +275,6 @@ class BookSourceEditActivity :
add(EditEntity("sourceRegex", cr?.sourceRegex, R.string.rule_source_regex))
add(EditEntity("replaceRegex", cr?.replaceRegex, R.string.rule_replace_regex))
add(EditEntity("imageStyle", cr?.imageStyle, R.string.rule_image_style))
add(EditEntity("actions", cr?.actions, R.string.rule_actions))
}
binding.tabLayout.selectTab(binding.tabLayout.getTabAt(0))
setEditEntities(0)
@ -370,7 +369,6 @@ class BookSourceEditActivity :
"sourceRegex" -> contentRule.sourceRegex = it.value
"replaceRegex" -> contentRule.replaceRegex = it.value
"imageStyle" -> contentRule.imageStyle = it.value
"actions" -> contentRule.actions = it.value
}
}
source.ruleSearch = searchRule

@ -163,12 +163,14 @@ class ThemeConfigFragment : BasePreferenceFragment(),
"saveDayTheme", "saveNightTheme" -> alertSaveTheme(key)
PreferKey.bgImage -> selectBgAction(false)
PreferKey.bgImageN -> selectBgAction(true)
PreferKey.defaultCover -> if (getPrefString(PreferKey.defaultCover).isNullOrEmpty()) {
PreferKey.defaultCover ->
if (getPrefString(PreferKey.defaultCover).isNullOrEmpty()) {
selectImage.launch(requestCodeCover)
} else {
selector(items = arrayListOf("删除图片", "选择图片")) { _, i ->
if (i == 0) {
removePref(PreferKey.defaultCover)
CoverImageView.upDefaultCover()
} else {
selectImage.launch(requestCodeCover)
}
@ -181,6 +183,7 @@ class ThemeConfigFragment : BasePreferenceFragment(),
selector(items = arrayListOf("删除图片", "选择图片")) { _, i ->
if (i == 0) {
removePref(PreferKey.defaultCoverDark)
CoverImageView.upDefaultCover()
} else {
selectImage.launch(requestCodeCoverDark)
}

Loading…
Cancel
Save