Skip to content

Commit 43d308d

Browse files
Change local server color (#152)
* refactor: update terminology from 'deeplink' to 'link' for consistency * feat: enhance markdown sync with tags and update query for linked items * feat: update server status display with OutlinedCard for improved UI
1 parent d5fccee commit 43d308d

File tree

1 file changed

+34
-27
lines changed

1 file changed

+34
-27
lines changed

app/src/main/java/com/yogeshpaliyal/deepr/ui/components/ServerStatusBar.kt

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package com.yogeshpaliyal.deepr.ui.components
22

3-
import androidx.compose.foundation.background
3+
import androidx.compose.foundation.BorderStroke
44
import androidx.compose.foundation.clickable
55
import androidx.compose.foundation.layout.Arrangement
66
import androidx.compose.foundation.layout.Row
77
import androidx.compose.foundation.layout.fillMaxWidth
88
import androidx.compose.foundation.layout.padding
99
import androidx.compose.foundation.layout.size
10+
import androidx.compose.material3.CardDefaults
1011
import androidx.compose.material3.Icon
12+
import androidx.compose.material3.OutlinedCard
1113
import androidx.compose.material3.Text
1214
import androidx.compose.runtime.Composable
1315
import androidx.compose.runtime.getValue
@@ -35,35 +37,40 @@ fun ServerStatusBar(
3537
val serverUrl by viewModel.serverUrl.collectAsStateWithLifecycle()
3638

3739
if (isRunning) {
38-
Row(
39-
modifier =
40-
modifier
41-
.fillMaxWidth()
42-
.background(Color(0xFF4CAF50))
43-
.clickable { onServerStatusClick() }
44-
.padding(horizontal = 16.dp, vertical = 12.dp),
45-
horizontalArrangement = Arrangement.spacedBy(8.dp),
46-
verticalAlignment = Alignment.CenterVertically,
40+
OutlinedCard(
41+
modifier = modifier.padding(8.dp),
42+
colors = CardDefaults.outlinedCardColors(containerColor = Color(0xFF4CAF50)),
43+
border = BorderStroke(1.dp, Color(0xFF3C8D3E)),
4744
) {
48-
Icon(
49-
TablerIcons.Server,
50-
contentDescription = null,
51-
tint = Color.White,
52-
modifier = Modifier.size(16.dp),
53-
)
54-
Text(
55-
text = stringResource(R.string.server_running_tap_to_configure),
56-
color = Color.White,
57-
fontSize = 14.sp,
58-
fontWeight = FontWeight.Medium,
59-
modifier = Modifier.weight(1f),
60-
)
61-
if (serverUrl != null) {
45+
Row(
46+
modifier =
47+
Modifier
48+
.fillMaxWidth()
49+
.clickable { onServerStatusClick() }
50+
.padding(horizontal = 16.dp, vertical = 12.dp),
51+
horizontalArrangement = Arrangement.spacedBy(8.dp),
52+
verticalAlignment = Alignment.CenterVertically,
53+
) {
54+
Icon(
55+
TablerIcons.Server,
56+
contentDescription = null,
57+
tint = Color.White,
58+
modifier = Modifier.size(16.dp),
59+
)
6260
Text(
63-
text = serverUrl!!.substringAfter("://"),
64-
color = Color.White.copy(alpha = 0.8f),
65-
fontSize = 12.sp,
61+
text = stringResource(R.string.server_running_tap_to_configure),
62+
color = Color.White,
63+
fontSize = 14.sp,
64+
fontWeight = FontWeight.Medium,
65+
modifier = Modifier.weight(1f),
6666
)
67+
if (serverUrl != null) {
68+
Text(
69+
text = serverUrl!!.substringAfter("://"),
70+
color = Color.White.copy(alpha = 0.8f),
71+
fontSize = 12.sp,
72+
)
73+
}
6774
}
6875
}
6976
}

0 commit comments

Comments
 (0)