chore: rename project to ByteClaw (module, binary, env prefix BYTECLAW_, Android package/app/theme)
This commit is contained in:
parent
bf00f56117
commit
399bcd46fb
28 changed files with 104 additions and 101 deletions
|
|
@ -6,11 +6,11 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace = "dev.openclaw.client"
|
||||
namespace = "dev.byteclaw.client"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "dev.openclaw.client"
|
||||
applicationId = "dev.byteclaw.client"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
|
|
|
|||
4
android/app/proguard-rules.pro
vendored
4
android/app/proguard-rules.pro
vendored
|
|
@ -1,5 +1,5 @@
|
|||
-keepattributes *Annotation*, InnerClasses
|
||||
-keepclassmembers class dev.openclaw.client.data.** { *** Companion; }
|
||||
-keepclasseswithmembers class dev.openclaw.client.data.** { kotlinx.serialization.KSerializer serializer(...); }
|
||||
-keepclassmembers class dev.byteclaw.client.data.** { *** Companion; }
|
||||
-keepclasseswithmembers class dev.byteclaw.client.data.** { kotlinx.serialization.KSerializer serializer(...); }
|
||||
# Tink (security-crypto) compile-only annotations
|
||||
-dontwarn com.google.errorprone.annotations.**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
android:label="@string/app_name"
|
||||
android:icon="@android:drawable/sym_def_app_icon"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@android:style/Theme.Material.NoActionBar">
|
||||
android:theme="@style/Theme.ByteClaw">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package dev.openclaw.client
|
||||
package dev.byteclaw.client
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
|
|
@ -15,10 +15,10 @@ import androidx.lifecycle.viewmodel.compose.viewModel
|
|||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import dev.openclaw.client.ui.ChatScreen
|
||||
import dev.openclaw.client.ui.ChatViewModel
|
||||
import dev.openclaw.client.ui.SessionsScreen
|
||||
import dev.openclaw.client.ui.SettingsScreen
|
||||
import dev.byteclaw.client.ui.ChatScreen
|
||||
import dev.byteclaw.client.ui.ChatViewModel
|
||||
import dev.byteclaw.client.ui.SessionsScreen
|
||||
import dev.byteclaw.client.ui.SettingsScreen
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package dev.openclaw.client.ui
|
||||
package dev.byteclaw.client.ui
|
||||
|
||||
import android.app.Application
|
||||
import androidx.lifecycle.AndroidViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dev.openclaw.client.data.OpenClawApi
|
||||
import dev.openclaw.client.data.ServerSettings
|
||||
import dev.openclaw.client.data.Session
|
||||
import dev.openclaw.client.data.SettingsStore
|
||||
import dev.byteclaw.client.data.ByteClawApi
|
||||
import dev.byteclaw.client.data.ServerSettings
|
||||
import dev.byteclaw.client.data.Session
|
||||
import dev.byteclaw.client.data.SettingsStore
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
|
@ -30,7 +30,7 @@ class ChatViewModel(app: Application) : AndroidViewModel(app) {
|
|||
val state: StateFlow<UiState> = _state
|
||||
private var job: Job? = null
|
||||
|
||||
private fun api() = OpenClawApi(_state.value.settings)
|
||||
private fun api() = ByteClawApi(_state.value.settings)
|
||||
|
||||
fun saveSettings(s: ServerSettings) {
|
||||
store.save(s)
|
||||
|
|
@ -39,7 +39,7 @@ class ChatViewModel(app: Application) : AndroidViewModel(app) {
|
|||
|
||||
fun testConnection(s: ServerSettings, onResult: (String) -> Unit) = viewModelScope.launch {
|
||||
val msg = runCatching {
|
||||
OpenClawApi(s).sessions(); "Verbindung OK"
|
||||
ByteClawApi(s).sessions(); "Verbindung OK"
|
||||
}.getOrElse { "Fehler: ${it.message}" }
|
||||
onResult(msg)
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package dev.openclaw.client.ui
|
||||
package dev.byteclaw.client.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
|
|
@ -25,8 +25,8 @@ import androidx.compose.ui.text.font.FontFamily
|
|||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.unit.dp
|
||||
import dev.openclaw.client.data.OpenClawApi
|
||||
import dev.openclaw.client.data.ServerSettings
|
||||
import dev.byteclaw.client.data.ByteClawApi
|
||||
import dev.byteclaw.client.data.ServerSettings
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
|
@ -39,7 +39,7 @@ fun ChatScreen(vm: ChatViewModel, state: UiState, onSessions: () -> Unit, onSett
|
|||
Scaffold(
|
||||
topBar = {
|
||||
TopAppBar(
|
||||
title = { Text("OpenClaw") },
|
||||
title = { Text("ByteClaw") },
|
||||
navigationIcon = { IconButton(onClick = onSessions) { Icon(Icons.AutoMirrored.Filled.List, "Sessions") } },
|
||||
actions = {
|
||||
IconButton(onClick = vm::newChat) { Icon(Icons.Filled.Add, "Neuer Chat") }
|
||||
|
|
@ -134,7 +134,7 @@ fun SettingsScreen(vm: ChatViewModel, state: UiState, onBack: () -> Unit) {
|
|||
var url by remember { mutableStateOf(state.settings.serverUrl) }
|
||||
var token by remember { mutableStateOf(state.settings.token) }
|
||||
var status by remember { mutableStateOf<String?>(null) }
|
||||
val urlError = if (url.isBlank()) null else OpenClawApi.validateUrl(url)
|
||||
val urlError = if (url.isBlank()) null else ByteClawApi.validateUrl(url)
|
||||
Scaffold(topBar = {
|
||||
TopAppBar(title = { Text("Einstellungen") },
|
||||
navigationIcon = { IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, "Zurück") } })
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">OpenClaw</string>
|
||||
<string name="app_name">ByteClaw</string>
|
||||
</resources>
|
||||
|
|
|
|||
3
android/app/src/main/res/values/themes.xml
Normal file
3
android/app/src/main/res/values/themes.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<resources>
|
||||
<style name="Theme.ByteClaw" parent="android:Theme.Material.NoActionBar" />
|
||||
</resources>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package dev.openclaw.client
|
||||
package dev.byteclaw.client
|
||||
|
||||
import dev.openclaw.client.data.AgentEvent
|
||||
import dev.openclaw.client.data.Message
|
||||
import dev.byteclaw.client.data.AgentEvent
|
||||
import dev.byteclaw.client.data.Message
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
|
@ -12,5 +12,5 @@ dependencyResolutionManagement {
|
|||
mavenCentral()
|
||||
}
|
||||
}
|
||||
rootProject.name = "OpenClaw"
|
||||
rootProject.name = "ByteClaw"
|
||||
include(":app")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue