Add package com.v2ray.ang.ui.server

This commit is contained in:
2dust committed 2026-07-18 16:00:37 +08:00
1 parent ac03b0e87b
commit 7cbb0febf0
17 files changed
+43 -36

No files matched your search

+11 -15
View File
@@ -71,51 +71,47 @@
android:resource="@xml/shortcuts" />
</activity>
<activity
android:name=".ui.ServerVmessActivity"
android:name=".ui.server.ServerVmessActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerVlessActivity"
android:name=".ui.server.ServerVlessActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerShadowsocksActivity"
android:name=".ui.server.ServerShadowsocksActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerSocksActivity"
android:name=".ui.server.ServerSocksActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerHttpActivity"
android:name=".ui.server.ServerHttpActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerTrojanActivity"
android:name=".ui.server.ServerTrojanActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerWireguardActivity"
android:name=".ui.server.ServerWireguardActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerHysteria2Activity"
android:name=".ui.server.ServerHysteria2Activity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerActivity"
android:name=".ui.server.ServerCustomConfigActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerCustomConfigActivity"
android:name=".ui.server.ServerGroupActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerGroupActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
android:name=".ui.ServerProxyChainActivity"
android:name=".ui.server.ServerProxyChainActivity"
android:exported="false"
android:windowSoftInputMode="stateUnchanged|adjustResize" />
<activity
@@ -129,6 +129,7 @@ import com.v2ray.ang.handler.AngConfigManager
import com.v2ray.ang.handler.MmkvManager
import com.v2ray.ang.handler.SettingsChangeManager
import com.v2ray.ang.handler.SettingsManager
import com.v2ray.ang.ui.server.*
import com.v2ray.ang.util.LogUtil
import com.v2ray.ang.util.Utils
import com.v2ray.ang.viewmodel.MainViewModel
@@ -309,7 +310,15 @@ class MainActivity : HelperBaseComponentActivity() {
val intent = when (createConfigType) {
EConfigType.POLICYGROUP.value -> Intent(this, ServerGroupActivity::class.java)
EConfigType.PROXYCHAIN.value -> Intent(this, ServerProxyChainActivity::class.java)
else -> Intent(this, ServerActivity::class.java).apply {
EConfigType.VMESS.value -> Intent(this, ServerVmessActivity::class.java)
EConfigType.VLESS.value -> Intent(this, ServerVlessActivity::class.java)
EConfigType.SHADOWSOCKS.value -> Intent(this, ServerShadowsocksActivity::class.java)
EConfigType.SOCKS.value -> Intent(this, ServerSocksActivity::class.java)
EConfigType.HTTP.value -> Intent(this, ServerHttpActivity::class.java)
EConfigType.TROJAN.value -> Intent(this, ServerTrojanActivity::class.java)
EConfigType.WIREGUARD.value -> Intent(this, ServerWireguardActivity::class.java)
EConfigType.HYSTERIA2.value -> Intent(this, ServerHysteria2Activity::class.java)
else -> Intent(this, ServerHttpActivity::class.java).apply {
putExtra("createConfigType", createConfigType)
}
}.apply {
@@ -524,7 +533,7 @@ class MainActivity : HelperBaseComponentActivity() {
EConfigType.TROJAN -> ServerTrojanActivity::class.java
EConfigType.WIREGUARD -> ServerWireguardActivity::class.java
EConfigType.HYSTERIA2 -> ServerHysteria2Activity::class.java
else -> ServerCustomConfigActivity::class.java
else -> ServerHttpActivity::class.java
}
val intent = Intent(this, activityClass).apply {
putExtra("guid", guid)
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import android.os.Bundle
import androidx.compose.foundation.layout.Arrangement
@@ -46,6 +46,7 @@ import com.v2ray.ang.extension.toastSuccess
import com.v2ray.ang.handler.AngConfigManager
import com.v2ray.ang.handler.CertificateFingerprintManager
import com.v2ray.ang.handler.MmkvManager
import com.v2ray.ang.ui.BaseComponentActivity
import com.v2ray.ang.util.JsonUtil
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import android.app.Activity
import android.content.Intent
@@ -43,4 +43,4 @@ object ProfileEditorResult {
)
finish()
}
}
}
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import android.os.Bundle
import androidx.compose.foundation.layout.Arrangement
@@ -49,6 +49,7 @@ import com.v2ray.ang.extension.toastSuccess
import com.v2ray.ang.handler.AngConfigManager
import com.v2ray.ang.handler.CertificateFingerprintManager
import com.v2ray.ang.handler.MmkvManager
import com.v2ray.ang.ui.BaseComponentActivity
import com.v2ray.ang.util.JsonUtil
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -1,12 +1,10 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import android.app.Activity
import android.os.Bundle
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxHeight
@@ -41,7 +39,6 @@ import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.painterResource
@@ -70,6 +67,7 @@ import com.v2ray.ang.extension.toastSuccess
import com.v2ray.ang.fmt.CustomFmt
import com.v2ray.ang.handler.AngConfigManager
import com.v2ray.ang.handler.MmkvManager
import com.v2ray.ang.ui.BaseComponentActivity
import com.v2ray.ang.util.LogUtil
import kotlinx.coroutines.flow.collectLatest
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import android.os.Bundle
import androidx.compose.foundation.layout.Column
@@ -32,6 +32,7 @@ import com.v2ray.ang.extension.isNotNullEmpty
import com.v2ray.ang.extension.toast
import com.v2ray.ang.extension.toastSuccess
import com.v2ray.ang.handler.MmkvManager
import com.v2ray.ang.ui.BaseComponentActivity
class ServerGroupActivity : BaseComponentActivity() {
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import android.os.Bundle
import androidx.compose.animation.core.animateDpAsState
@@ -47,6 +47,7 @@ import com.v2ray.ang.extension.toast
import com.v2ray.ang.extension.toastSuccess
import com.v2ray.ang.handler.MmkvManager
import com.v2ray.ang.handler.SettingsManager
import com.v2ray.ang.ui.BaseComponentActivity
import sh.calvin.reorderable.ReorderableItem
import sh.calvin.reorderable.rememberReorderableLazyListState
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
@@ -1,4 +1,4 @@
package com.v2ray.ang.ui
package com.v2ray.ang.ui.server
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope