Skip to content

Commit

Permalink
[feature|document]完善播放页面布局逻辑;添加http安全问题的说明文档
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyD666 committed Nov 5, 2021
1 parent 8b1a7b8 commit bd3b3a0
Show file tree
Hide file tree
Showing 14 changed files with 635 additions and 451 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

## [>>必看安全说明<<](#安全说明)

## [>>关于http网站或数据源的安全问题<<](doc/about_http_security.md)

## 特色功能

1. 支持显示**排行榜**
Expand Down Expand Up @@ -103,7 +105,7 @@

## 附加说明

默认数据源来自http://www.yhdm.io/
默认数据源来自http://www.yinghuacd.com/

## 免责声明

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/skyd/imomoe/model/impls/Const.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class Const : IConst {
override fun ANIME_SEARCH(): String = "/search/"
}

override fun MAIN_URL(): String = "http://www.yhdm.so"
override fun MAIN_URL(): String = "http://www.yinghuacd.com"

override fun versionName(): String = "1.0.0"
override fun versionName(): String = "1.0.1"

override fun versionCode(): Int = 1
override fun versionCode(): Int = 2

override fun about(): String {
return "默认数据源\n数据来源:${MAIN_URL()}"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/skyd/imomoe/util/View.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import android.view.animation.AlphaAnimation


fun View.gone(animate: Boolean = false, dur: Long = 500L) {
if (visibility == View.GONE) return
if (animate) startAnimation(AlphaAnimation(1f, 0f).apply { duration = dur })
visibility = View.GONE
}

fun View.visible(animate: Boolean = false, dur: Long = 500L) {
if (visibility == View.VISIBLE) return
visibility = View.VISIBLE
if (animate) startAnimation(AlphaAnimation(0f, 1f).apply { duration = dur })
}

fun View.invisible(animate: Boolean = false, dur: Long = 500L) {
if (visibility == View.INVISIBLE) return
visibility = View.INVISIBLE
if (animate) startAnimation(AlphaAnimation(0f, 1f).apply { duration = dur })
}
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/java/com/skyd/imomoe/view/activity/AboutActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.skyd.imomoe.util.Util
import com.skyd.imomoe.util.Util.getAppVersionName
import com.skyd.imomoe.util.Util.openBrowser
import com.skyd.imomoe.util.visible
import java.net.URL
import java.util.*

class AboutActivity : BaseActivity<ActivityAboutBinding>() {
Expand Down Expand Up @@ -46,7 +47,17 @@ class AboutActivity : BaseActivity<ActivityAboutBinding>() {
tvAboutActivityVersion.text = getAppVersionName()

rlAboutActivityImomoe.setOnClickListener {
openBrowser(Api.MAIN_URL)
var warningString: String = getString(R.string.jump_to_data_source_website_warning)
if (URL(Api.MAIN_URL).protocol == "http") {
warningString =
getString(R.string.jump_to_browser_http_warning) + "\n" + warningString
}
MaterialDialog(this@AboutActivity).show {
title(res = R.string.warning)
message(text = warningString)
positiveButton(res = R.string.ok) { openBrowser(Api.MAIN_URL) }
negativeButton { dismiss() }
}
}

ivAboutActivityCustomDataSourceAbout.setOnClickListener {
Expand Down
Loading

0 comments on commit bd3b3a0

Please sign in to comment.