This commit is contained in:
particle-box
2026-01-23 20:22:47 +05:30
parent de4d8dac39
commit 327efafbe5
22 changed files with 449 additions and 819 deletions

View File

@@ -31,6 +31,7 @@ import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableLongStateOf
import androidx.compose.runtime.remember
@@ -80,6 +81,10 @@ class HomeAbout : Routes.Route() {
val tapCount = remember { mutableIntStateOf(0) }
val lastTapTime = remember { mutableLongStateOf(0L) }
LaunchedEffect(Unit) {
context.shortToast("Tap 5 times in this screen to see some magic 😉!")
}
Box(
modifier = Modifier
.fillMaxSize()

View File

@@ -54,6 +54,7 @@ import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Download
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.Notifications
import androidx.compose.material.icons.filled.Schedule
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.outlined.Widgets
@@ -258,7 +259,8 @@ class HomeRootSection : Routes.Route() {
@Composable
private fun TopBarActionChip(
icon: ImageVector,
label: String,
label: String? = null,
contentDescription: String? = label,
onClick: () -> Unit,
) {
Surface(
@@ -274,15 +276,17 @@ class HomeRootSection : Routes.Route() {
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
Icon(icon, contentDescription = label, tint = Color.White)
Text(
text = label,
color = Color.White,
fontSize = 13.sp,
fontWeight = FontWeight.Medium,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
Icon(icon, contentDescription = contentDescription, tint = Color.White)
label?.let {
Text(
text = it,
color = Color.White,
fontSize = 13.sp,
fontWeight = FontWeight.Medium,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
}
}
}
@@ -888,18 +892,29 @@ class HomeRootSection : Routes.Route() {
.fillMaxWidth()
.padding(WindowInsets.statusBars.asPaddingValues())
.padding(horizontal = cardMargin, vertical = 8.dp),
horizontalArrangement = Arrangement.spacedBy(10.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
TopBarActionChip(
icon = Icons.Filled.Info,
label = "Announcements"
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp),
verticalAlignment = Alignment.CenterVertically
) {
showAnnouncementsDialog = true
loadAnnouncements()
TopBarActionChip(
icon = Icons.Filled.Notifications,
label = null,
contentDescription = "Announcements"
) {
showAnnouncementsDialog = true
loadAnnouncements()
}
}
Row(
modifier = Modifier.wrapContentWidth(Alignment.End),
horizontalArrangement = Arrangement.spacedBy(10.dp),
verticalAlignment = Alignment.CenterVertically
) {
HomeActionChips()
}
Spacer(modifier = Modifier.weight(1f))
HomeActionChips()
}
Spacer(modifier = Modifier.height(12.dp))
HeroSection(