mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
Chore: Fix geox url setting
This commit is contained in:
@@ -55,15 +55,6 @@ class HelpDesign(
|
||||
|
||||
category(R.string.sources)
|
||||
|
||||
clickable(
|
||||
title = R.string.clash_meta_for_android,
|
||||
summary = R.string.meta_github_url
|
||||
) {
|
||||
clicked {
|
||||
openLink(Uri.parse(context.getString(R.string.meta_github_url)))
|
||||
}
|
||||
}
|
||||
|
||||
clickable(
|
||||
title = R.string.clash_meta_core,
|
||||
summary = R.string.clash_meta_core_url
|
||||
@@ -72,6 +63,15 @@ class HelpDesign(
|
||||
openLink(Uri.parse(context.getString(R.string.clash_meta_core_url)))
|
||||
}
|
||||
}
|
||||
|
||||
clickable(
|
||||
title = R.string.clash_meta_for_android,
|
||||
summary = R.string.meta_github_url
|
||||
) {
|
||||
clicked {
|
||||
openLink(Uri.parse(context.getString(R.string.meta_github_url)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
binding.content.addView(screen.root)
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.github.kr328.clash.design.databinding.DesignMainBinding
|
||||
import com.github.kr328.clash.design.util.layoutInflater
|
||||
import com.github.kr328.clash.design.util.resolveThemedColor
|
||||
import com.github.kr328.clash.design.util.root
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
@@ -56,7 +55,7 @@ class MainDesign(context: Context) : Design<MainDesign.Request>(context) {
|
||||
TunnelState.Mode.Direct -> context.getString(R.string.direct_mode)
|
||||
TunnelState.Mode.Global -> context.getString(R.string.global_mode)
|
||||
TunnelState.Mode.Rule -> context.getString(R.string.rule_mode)
|
||||
TunnelState.Mode.Script -> context.getString(R.string.script_mode)
|
||||
else -> context.getString(R.string.rule_mode)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,16 +78,6 @@ class MainDesign(context: Context) : Design<MainDesign.Request>(context) {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun showUpdatedTips() {
|
||||
withContext(Dispatchers.Main) {
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.version_updated)
|
||||
.setMessage(R.string.version_updated_tips)
|
||||
.setPositiveButton(R.string.ok) { _, _ -> }
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
binding.self = this
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class MetaFeatureSettingsDesign(
|
||||
)
|
||||
|
||||
val screen = preferenceScreen(context) {
|
||||
category(R.string.meta_features)
|
||||
category(R.string.settings)
|
||||
|
||||
selectableList(
|
||||
value = configuration::unifiedDelay,
|
||||
@@ -164,7 +164,7 @@ class MetaFeatureSettingsDesign(
|
||||
)
|
||||
|
||||
editableText(
|
||||
value = configuration.geoxurl::geoip,
|
||||
value = configuration.geoxurl::mmdb,
|
||||
adapter = NullableTextAdapter.String,
|
||||
title = R.string.geox_mmdb,
|
||||
placeholder = R.string.dont_modify,
|
||||
@@ -173,7 +173,7 @@ class MetaFeatureSettingsDesign(
|
||||
)
|
||||
|
||||
editableText(
|
||||
value = configuration.geoxurl::geoip,
|
||||
value = configuration.geoxurl::geosite,
|
||||
adapter = NullableTextAdapter.String,
|
||||
title = R.string.geox_geosite,
|
||||
placeholder = R.string.dont_modify,
|
||||
|
||||
@@ -185,43 +185,22 @@ class OverrideSettingsDesign(
|
||||
empty = R.string.default_
|
||||
)
|
||||
|
||||
if (BuildConfig.PREMIUM) {
|
||||
selectableList(
|
||||
value = configuration::mode,
|
||||
values = arrayOf(
|
||||
null,
|
||||
TunnelState.Mode.Direct,
|
||||
TunnelState.Mode.Global,
|
||||
TunnelState.Mode.Rule,
|
||||
TunnelState.Mode.Script
|
||||
),
|
||||
valuesText = arrayOf(
|
||||
R.string.dont_modify,
|
||||
R.string.direct_mode,
|
||||
R.string.global_mode,
|
||||
R.string.rule_mode,
|
||||
R.string.script_mode
|
||||
),
|
||||
title = R.string.mode
|
||||
)
|
||||
} else {
|
||||
selectableList(
|
||||
value = configuration::mode,
|
||||
values = arrayOf(
|
||||
null,
|
||||
TunnelState.Mode.Direct,
|
||||
TunnelState.Mode.Global,
|
||||
TunnelState.Mode.Rule
|
||||
),
|
||||
valuesText = arrayOf(
|
||||
R.string.dont_modify,
|
||||
R.string.direct_mode,
|
||||
R.string.global_mode,
|
||||
R.string.rule_mode
|
||||
),
|
||||
title = R.string.mode
|
||||
)
|
||||
}
|
||||
selectableList(
|
||||
value = configuration::mode,
|
||||
values = arrayOf(
|
||||
null,
|
||||
TunnelState.Mode.Direct,
|
||||
TunnelState.Mode.Global,
|
||||
TunnelState.Mode.Rule
|
||||
),
|
||||
valuesText = arrayOf(
|
||||
R.string.dont_modify,
|
||||
R.string.direct_mode,
|
||||
R.string.global_mode,
|
||||
R.string.rule_mode
|
||||
),
|
||||
title = R.string.mode
|
||||
)
|
||||
|
||||
selectableList(
|
||||
value = configuration::logLevel,
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.view.View
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import com.github.kr328.clash.core.model.ProxySort
|
||||
import com.github.kr328.clash.core.model.TunnelState
|
||||
import com.github.kr328.clash.design.BuildConfig
|
||||
import com.github.kr328.clash.design.ProxyDesign
|
||||
import com.github.kr328.clash.design.R
|
||||
import com.github.kr328.clash.design.store.UiStore
|
||||
@@ -76,9 +75,6 @@ class ProxyMenu(
|
||||
R.id.rule_mode -> {
|
||||
requests.trySend(ProxyDesign.Request.PatchMode(TunnelState.Mode.Rule))
|
||||
}
|
||||
R.id.script_mode -> {
|
||||
requests.trySend(ProxyDesign.Request.PatchMode(TunnelState.Mode.Script))
|
||||
}
|
||||
else -> return false
|
||||
}
|
||||
|
||||
@@ -89,8 +85,6 @@ class ProxyMenu(
|
||||
menu.menuInflater.inflate(R.menu.menu_proxy, menu.menu)
|
||||
|
||||
menu.menu.apply {
|
||||
findItem(R.id.script_mode).isVisible = BuildConfig.PREMIUM
|
||||
|
||||
findItem(R.id.not_selectable).isChecked = uiStore.proxyExcludeNotSelectable
|
||||
|
||||
if (uiStore.proxySingleLine) {
|
||||
@@ -110,7 +104,7 @@ class ProxyMenu(
|
||||
TunnelState.Mode.Direct -> findItem(R.id.direct_mode).isChecked = true
|
||||
TunnelState.Mode.Global -> findItem(R.id.global_mode).isChecked = true
|
||||
TunnelState.Mode.Rule -> findItem(R.id.rule_mode).isChecked = true
|
||||
TunnelState.Mode.Script -> findItem(R.id.script_mode).isChecked = true
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_name"
|
||||
android:text="@string/application_name"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
<item
|
||||
android:id="@+id/rule_mode"
|
||||
android:title="@string/rule_mode" />
|
||||
<item
|
||||
android:id="@+id/script_mode"
|
||||
android:title="@string/script_mode" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
<string name="deny_selected_apps">不允許已選擇的應用</string>
|
||||
<string name="no_profile_selected">沒有選擇配置文件</string>
|
||||
<string name="copied">已複製</string>
|
||||
<string name="script_mode">腳本模式</string>
|
||||
<string name="google_play">Google Play</string>
|
||||
<string name="filter">過濾</string>
|
||||
<string name="select_all">全選</string>
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
<string name="deny_selected_apps">不允許已選擇的應用</string>
|
||||
<string name="no_profile_selected">未選擇設定檔</string>
|
||||
<string name="copied">已複製</string>
|
||||
<string name="script_mode">腳本模式</string>
|
||||
<string name="google_play">Google Play</string>
|
||||
<string name="filter">過濾</string>
|
||||
<string name="select_all">全選</string>
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<string name="deny_selected_apps">不允许已选择的应用</string>
|
||||
<string name="no_profile_selected">没有选择配置文件</string>
|
||||
<string name="copied">已复制</string>
|
||||
<string name="script_mode">脚本模式</string>
|
||||
<string name="google_play">Google Play</string>
|
||||
<string name="filter">过滤</string>
|
||||
<string name="select_all">全选</string>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<string name="direct_mode">Direct Mode</string>
|
||||
<string name="rule_mode">Rule Mode</string>
|
||||
<string name="global_mode">Global Mode</string>
|
||||
<string name="script_mode">Script Mode</string>
|
||||
<string name="proxy_empty_tips">No groups can be displayed</string>
|
||||
|
||||
<string name="profiles">Profiles</string>
|
||||
@@ -295,7 +294,7 @@
|
||||
<string name="geox_geoip">GeoIp Url</string>
|
||||
<string name="geox_mmdb">MMDB Url</string>
|
||||
<string name="geox_geosite">Geosite Url</string>
|
||||
<string name="geoip_url" translatable="false">https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat</string>
|
||||
<string name="mmdb_url" translatable="false">https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb</string>
|
||||
<string name="geosite_url" translatable="false">https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat</string>
|
||||
<string name="geoip_url" translatable="false">https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat</string>
|
||||
<string name="mmdb_url" translatable="false">https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb</string>
|
||||
<string name="geosite_url" translatable="false">https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user