diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 03a8398b5..67c28170f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -295,13 +295,18 @@ android:launchMode="singleTop"> + - - + + + + diff --git a/app/src/main/java/io/legado/app/data/entities/rule/ContentRule.kt b/app/src/main/java/io/legado/app/data/entities/rule/ContentRule.kt index df7a8dae3..a3c565652 100644 --- a/app/src/main/java/io/legado/app/data/entities/rule/ContentRule.kt +++ b/app/src/main/java/io/legado/app/data/entities/rule/ContentRule.kt @@ -9,5 +9,6 @@ data class ContentRule( var nextContentUrl: String? = null, var webJs: String? = null, var sourceRegex: String? = null, - var imageStyle: Int = 0 //0默认大小居中,1最大宽度 + var replaceRegex: String? = null, + var imageStyle: String? = null //默认大小居中,1最大宽度 ) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt index 71ee36149..b9f191563 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt @@ -233,6 +233,8 @@ class BookSourceEditActivity : add(EditEntity("nextContentUrl", cr?.nextContentUrl, R.string.rule_next_content)) add(EditEntity("webJs", cr?.webJs, R.string.rule_web_js)) add(EditEntity("sourceRegex", cr?.sourceRegex, R.string.rule_source_regex)) + add(EditEntity("replaceRegex", cr?.replaceRegex, R.string.replace)) + add(EditEntity("imageStyle", cr?.imageStyle, R.string.rule_image_style)) } //发现 val er = source?.getExploreRule() @@ -332,6 +334,8 @@ class BookSourceEditActivity : "nextContentUrl" -> contentRule.nextContentUrl = it.value "webJs" -> contentRule.webJs = it.value "sourceRegex" -> contentRule.sourceRegex = it.value + "replaceRegex" -> contentRule.replaceRegex = it.value + "imageStyle" -> contentRule.imageStyle = it.value } } source.ruleSearch = searchRule diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 20529810b..c898a62e6 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -724,4 +724,5 @@ 恢复忽略列表 恢复时忽略一些内容不恢复,方便不同手机配置不同 阅读界面设置 + 图片样式(imageStyle) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 89cdbf2a5..feb6c2d4a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -724,5 +724,6 @@ 恢复忽略列表 恢复时忽略一些内容不恢复,方便不同手机配置不同 阅读界面设置 + 图片样式(imageStyle) diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index f44eaa67f..beec7d5b4 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -724,4 +724,5 @@ 恢复忽略列表 恢复时忽略一些内容不恢复,方便不同手机配置不同 阅读界面设置 + 图片样式(imageStyle) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 62b552f92..78c9b7ce1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -410,6 +410,7 @@ 正文下一页URL规则(nextContentUrl) webJs 资源正则(sourceRegex) + 图片样式(imageStyle) 图标(sourceIcon) 列表规则(ruleArticles)