Use material icons in chat app bar
This commit is contained in:
1 parent
15e57ad1f9
commit
4bee45c8e0
4 files changed
+24
-8
No files matched your search
@@ -3,14 +3,18 @@ package cn.xiaobai.openclawapp
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.filled.AttachFile
|
||||
import androidx.compose.material.icons.filled.Refresh
|
||||
import androidx.compose.material3.CenterAlignedTopAppBar
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.NavigationBar
|
||||
import androidx.compose.material3.NavigationBarItem
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
@@ -149,15 +153,21 @@ private fun OpenClawRoot(appState: OpenClawAppState) {
|
||||
)
|
||||
},
|
||||
navigationIcon = {
|
||||
TextButton(onClick = appState::closeChat) {
|
||||
Text("←")
|
||||
IconButton(onClick = appState::closeChat) {
|
||||
Icon(
|
||||
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
|
||||
contentDescription = "返回",
|
||||
)
|
||||
}
|
||||
},
|
||||
actions = {
|
||||
TextButton(onClick = { pickAttachment() }) {
|
||||
Text("+")
|
||||
IconButton(onClick = { pickAttachment() }) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.AttachFile,
|
||||
contentDescription = "附件",
|
||||
)
|
||||
}
|
||||
TextButton(onClick = {
|
||||
IconButton(onClick = {
|
||||
activeSession?.id?.let { sessionId ->
|
||||
coroutineScope.launch {
|
||||
appState.clearSyncError()
|
||||
@@ -165,7 +175,10 @@ private fun OpenClawRoot(appState: OpenClawAppState) {
|
||||
}
|
||||
}
|
||||
}) {
|
||||
Text(if (appState.repository.streamStatusFor(route.sessionId) == "failed") "⟳" else "↻")
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Refresh,
|
||||
contentDescription = if (appState.repository.streamStatusFor(route.sessionId) == "failed") "重连" else "刷新",
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user