Merge pull request #27 from garfiec/fix/mcp-type-segmented-button-height
fix(settings): equalize MCP server type segmented button heights
This commit is contained in:
commit
1f252790e2
1 changed files with 8 additions and 1 deletions
|
|
@ -2,7 +2,9 @@ package com.garfiec.librechat.feature.settings.screen
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.IntrinsicSize
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
|
@ -130,7 +132,11 @@ internal fun McpServerDialog(
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
val typeOptions = listOf(McpServerType.SSE, McpServerType.STREAMABLE_HTTP)
|
val typeOptions = listOf(McpServerType.SSE, McpServerType.STREAMABLE_HTTP)
|
||||||
SingleChoiceSegmentedButtonRow(modifier = Modifier.fillMaxWidth()) {
|
SingleChoiceSegmentedButtonRow(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(IntrinsicSize.Max),
|
||||||
|
) {
|
||||||
typeOptions.forEachIndexed { index, type ->
|
typeOptions.forEachIndexed { index, type ->
|
||||||
SegmentedButton(
|
SegmentedButton(
|
||||||
selected = selectedType == type,
|
selected = selectedType == type,
|
||||||
|
|
@ -139,6 +145,7 @@ internal fun McpServerDialog(
|
||||||
index = index,
|
index = index,
|
||||||
count = typeOptions.size,
|
count = typeOptions.size,
|
||||||
),
|
),
|
||||||
|
modifier = Modifier.fillMaxHeight(),
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
when (type) {
|
when (type) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue