refactor(design-system): consolidate components and standardize naming with Ms prefix
- Removed redundant files: `AppFooter`, `AppHeader`, `AppScaffold`, `LoadingIndicator`, `MeldestelleButton`, `MeldestelleTextField`, `DashboardCard`. - Introduced `MsFooter`, `MsHeader`, `MsScaffold`, `MsLoadingIndicator`, `MsButton`, `MsTextField`, `MsCard` with standardized implementation and naming. - Updated references in `profile-feature` and `ping-feature` to use the new components. - Aligned with roadmap goals for a consistent, reusable, and high-density design system. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
+5
-5
@@ -15,8 +15,8 @@ import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import at.mocode.frontend.core.designsystem.components.DashboardCard
|
||||
import at.mocode.frontend.core.designsystem.components.DenseButton
|
||||
import at.mocode.frontend.core.designsystem.components.MsCard
|
||||
import at.mocode.frontend.core.designsystem.theme.Dimens
|
||||
|
||||
@Composable
|
||||
@@ -58,7 +58,7 @@ fun PingScreen(
|
||||
|
||||
// Right Panel: Terminal Log (40%)
|
||||
// Hier nutzen wir bewusst einen dunklen "Terminal"-Look, unabhängig vom Theme
|
||||
DashboardCard(
|
||||
MsCard(
|
||||
modifier = Modifier
|
||||
.weight(0.4f)
|
||||
.fillMaxHeight()
|
||||
@@ -156,7 +156,7 @@ private fun StatusGrid(uiState: PingUiState) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(Dimens.SpacingS)) {
|
||||
// Row 1
|
||||
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(Dimens.SpacingS)) {
|
||||
DashboardCard(modifier = Modifier.weight(1f)) {
|
||||
MsCard(modifier = Modifier.weight(1f)) {
|
||||
StatusHeader("SIMPLE / SECURE PING")
|
||||
if (uiState.simplePingResponse != null) {
|
||||
KeyValueRow("Status", uiState.simplePingResponse.status)
|
||||
@@ -167,7 +167,7 @@ private fun StatusGrid(uiState: PingUiState) {
|
||||
}
|
||||
}
|
||||
|
||||
DashboardCard(modifier = Modifier.weight(1f)) {
|
||||
MsCard(modifier = Modifier.weight(1f)) {
|
||||
StatusHeader("HEALTH CHECK")
|
||||
if (uiState.healthResponse != null) {
|
||||
KeyValueRow("Status", uiState.healthResponse.status)
|
||||
@@ -180,7 +180,7 @@ private fun StatusGrid(uiState: PingUiState) {
|
||||
}
|
||||
|
||||
// Row 2
|
||||
DashboardCard(modifier = Modifier.fillMaxWidth()) {
|
||||
MsCard(modifier = Modifier.fillMaxWidth()) {
|
||||
StatusHeader("ENHANCED PING (RESILIENCE)")
|
||||
if (uiState.enhancedPingResponse != null) {
|
||||
Row(modifier = Modifier.fillMaxWidth()) {
|
||||
|
||||
+8
-8
@@ -13,9 +13,9 @@ import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import at.mocode.frontend.core.designsystem.components.LoadingIndicator
|
||||
import at.mocode.frontend.core.designsystem.components.MeldestelleButton
|
||||
import at.mocode.frontend.core.designsystem.components.MeldestelleTextField
|
||||
import at.mocode.frontend.core.designsystem.components.MsButton
|
||||
import at.mocode.frontend.core.designsystem.components.MsLoadingIndicator
|
||||
import at.mocode.frontend.core.designsystem.components.MsTextField
|
||||
|
||||
@Composable
|
||||
fun ProfileScreen(
|
||||
@@ -37,7 +37,7 @@ fun ProfileScreen(
|
||||
)
|
||||
|
||||
if (uiState.isLoading) {
|
||||
LoadingIndicator(modifier = Modifier.align(Alignment.CenterHorizontally))
|
||||
MsLoadingIndicator(modifier = Modifier.align(Alignment.CenterHorizontally))
|
||||
} else {
|
||||
// Fehleranzeige
|
||||
uiState.errorMessage?.let { error ->
|
||||
@@ -100,7 +100,7 @@ fun ZnsLinkSection(
|
||||
|
||||
Spacer(Modifier.height(16.dp))
|
||||
|
||||
MeldestelleTextField(
|
||||
MsTextField(
|
||||
value = satznummer,
|
||||
onValueChange = { satznummer = it },
|
||||
label = "ZNS Satznummer",
|
||||
@@ -112,7 +112,7 @@ fun ZnsLinkSection(
|
||||
|
||||
Spacer(Modifier.height(16.dp))
|
||||
|
||||
MeldestelleButton(
|
||||
MsButton(
|
||||
onClick = { onLink(satznummer) },
|
||||
text = "Jetzt verknüpfen",
|
||||
isLoading = isLinking,
|
||||
@@ -154,7 +154,7 @@ fun ProfileDetailsSection(
|
||||
Spacer(Modifier.height(12.dp))
|
||||
|
||||
if (isEditing) {
|
||||
MeldestelleTextField(
|
||||
MsTextField(
|
||||
value = contactEmail,
|
||||
onValueChange = { contactEmail = it },
|
||||
label = "Kontakt E-Mail",
|
||||
@@ -162,7 +162,7 @@ fun ProfileDetailsSection(
|
||||
leadingIcon = Icons.Default.Email
|
||||
)
|
||||
Spacer(Modifier.height(12.dp))
|
||||
MeldestelleTextField(
|
||||
MsTextField(
|
||||
value = bio,
|
||||
onValueChange = { bio = it },
|
||||
label = "Info / Bio",
|
||||
|
||||
Reference in New Issue
Block a user