chore(frontend): remove custom Webpack sqlite-wasm integration plugins and cleanup config

- Deleted `dummy.js` and its usage for sqlite-wasm integration as custom Webpack adjustments are no longer necessary.
- Removed outdated Webpack configuration files: `ignore-sqlite-wasm.js`, `ignore-sqlite-wasm-critical-dependency.js`, and `sqljs-fix.js`.
- Introduced `sqlite-config.js` for simplified and streamlined sqlite-wasm and Skiko Webpack configuration.
- Minor code formatting adjustments across frontend modules for improved consistency.
This commit is contained in:
2026-01-26 20:37:23 +01:00
parent 29ad73b508
commit 3e587381ed
30 changed files with 1535 additions and 941 deletions
@@ -22,23 +22,23 @@ import at.mocode.frontend.core.designsystem.theme.Dimens
*/
@Composable
fun DenseButton(
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
containerColor: Color = MaterialTheme.colorScheme.primary
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
containerColor: Color = MaterialTheme.colorScheme.primary
) {
Button(
onClick = onClick,
enabled = enabled,
modifier = modifier.height(32.dp), // Fixe, kompakte Höhe
shape = MaterialTheme.shapes.small, // Nutzt unsere 4dp Rundung
colors = ButtonDefaults.buttonColors(containerColor = containerColor),
contentPadding = PaddingValues(horizontal = Dimens.SpacingM, vertical = 0.dp) // Wenig Padding
) {
Text(
text = text,
style = MaterialTheme.typography.labelMedium // Kleinere Schrift
)
}
Button(
onClick = onClick,
enabled = enabled,
modifier = modifier.height(32.dp), // Fixe, kompakte Höhe
shape = MaterialTheme.shapes.small, // Nutzt unsere 4dp Rundung
colors = ButtonDefaults.buttonColors(containerColor = containerColor),
contentPadding = PaddingValues(horizontal = Dimens.SpacingM, vertical = 0.dp) // Wenig Padding
) {
Text(
text = text,
style = MaterialTheme.typography.labelMedium // Kleinere Schrift
)
}
}
@@ -21,22 +21,22 @@ import at.mocode.frontend.core.designsystem.theme.Dimens
*/
@Composable
fun DashboardCard(
modifier: Modifier = Modifier,
content: @Composable ColumnScope.() -> Unit
modifier: Modifier = Modifier,
content: @Composable ColumnScope.() -> Unit
) {
Card(
modifier = modifier,
shape = MaterialTheme.shapes.medium,
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.surface
),
border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), // Dünner Rahmen
elevation = CardDefaults.cardElevation(defaultElevation = 0.dp) // Kein Schatten
Card(
modifier = modifier,
shape = MaterialTheme.shapes.medium,
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.surface
),
border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), // Dünner Rahmen
elevation = CardDefaults.cardElevation(defaultElevation = 0.dp) // Kein Schatten
) {
Column(
modifier = Modifier.padding(Dimens.SpacingS) // Kompaktes Padding innen
) {
Column(
modifier = Modifier.padding(Dimens.SpacingS) // Kompaktes Padding innen
) {
content()
}
content()
}
}
}
@@ -18,89 +18,89 @@ import androidx.compose.ui.unit.sp
// Blau steht für Aktion/Information, Grau für Struktur.
private val LightColorScheme = lightColorScheme(
primary = Color(0xFF0052CC), // Enterprise Blue (stark)
onPrimary = Color.White,
primaryContainer = Color(0xFFDEEBFF),
onPrimaryContainer = Color(0xFF0052CC),
primary = Color(0xFF0052CC), // Enterprise Blue (stark)
onPrimary = Color.White,
primaryContainer = Color(0xFFDEEBFF),
onPrimaryContainer = Color(0xFF0052CC),
secondary = Color(0xFF2684FF), // Helleres Blau für Akzente
onSecondary = Color.White,
secondary = Color(0xFF2684FF), // Helleres Blau für Akzente
onSecondary = Color.White,
background = Color(0xFFF4F5F7), // Helles Grau (nicht hartes Weiß)
surface = Color.White,
onBackground = Color(0xFF172B4D), // Fast Schwarz (besser lesbar als #000)
onSurface = Color(0xFF172B4D),
background = Color(0xFFF4F5F7), // Helles Grau (nicht hartes Weiß)
surface = Color.White,
onBackground = Color(0xFF172B4D), // Fast Schwarz (besser lesbar als #000)
onSurface = Color(0xFF172B4D),
error = Color(0xFFDE350B),
onError = Color.White
error = Color(0xFFDE350B),
onError = Color.White
)
private val DarkColorScheme = darkColorScheme(
primary = Color(0xFF4C9AFF), // Helleres Blau auf Dunkel
onPrimary = Color(0xFF091E42),
primaryContainer = Color(0xFF0052CC),
onPrimaryContainer = Color.White,
primary = Color(0xFF4C9AFF), // Helleres Blau auf Dunkel
onPrimary = Color(0xFF091E42),
primaryContainer = Color(0xFF0052CC),
onPrimaryContainer = Color.White,
secondary = Color(0xFF2684FF),
onSecondary = Color.White,
secondary = Color(0xFF2684FF),
onSecondary = Color.White,
background = Color(0xFF1E1E1E), // Dunkles Grau (angenehmer als #000)
surface = Color(0xFF2C2C2C), // Panels heben sich leicht ab
onBackground = Color(0xFFEBECF0),
onSurface = Color(0xFFEBECF0),
background = Color(0xFF1E1E1E), // Dunkles Grau (angenehmer als #000)
surface = Color(0xFF2C2C2C), // Panels heben sich leicht ab
onBackground = Color(0xFFEBECF0),
onSurface = Color(0xFFEBECF0),
error = Color(0xFFFF5630),
onError = Color.Black
error = Color(0xFFFF5630),
onError = Color.Black
)
// --- 2. Formen (Shapes) ---
// Enterprise Apps nutzen oft weniger Rundung als Consumer Apps (seriöser).
private val AppShapes = Shapes(
small = RoundedCornerShape(Dimens.CornerRadiusS), // Buttons, Inputs
medium = RoundedCornerShape(Dimens.CornerRadiusM), // Cards, Dialogs
large = RoundedCornerShape(Dimens.CornerRadiusM)
small = RoundedCornerShape(Dimens.CornerRadiusS), // Buttons, Inputs
medium = RoundedCornerShape(Dimens.CornerRadiusM), // Cards, Dialogs
large = RoundedCornerShape(Dimens.CornerRadiusM)
)
// --- 3. Typografie ---
// wir setzen auf klare Hierarchie.
private val AppTypography = Typography(
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 22.sp,
lineHeight = 28.sp
),
titleMedium = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 16.sp,
lineHeight = 24.sp
),
bodyMedium = TextStyle( // Standard Text
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 14.sp,
lineHeight = 20.sp
),
labelSmall = TextStyle( // Für dichte Tabellen/Labels
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp
)
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 22.sp,
lineHeight = 28.sp
),
titleMedium = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 16.sp,
lineHeight = 24.sp
),
bodyMedium = TextStyle( // Standard Text
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 14.sp,
lineHeight = 20.sp
),
labelSmall = TextStyle( // Für dichte Tabellen/Labels
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp
)
)
@Composable
fun AppTheme(
darkTheme: Boolean = false, // Kann später via Settings gesteuert werden
content: @Composable () -> Unit
darkTheme: Boolean = false, // Kann später via Settings gesteuert werden
content: @Composable () -> Unit
) {
val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme
val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme
MaterialTheme(
colorScheme = colorScheme,
shapes = AppShapes,
typography = AppTypography,
content = content
)
MaterialTheme(
colorScheme = colorScheme,
shapes = AppShapes,
typography = AppTypography,
content = content
)
}
@@ -8,20 +8,20 @@ import androidx.compose.ui.unit.dp
* Wenn wir den Abstand global ändern wollen, machen wir das nur hier.
*/
object Dimens {
// Spacing (Abstände)
val SpacingXS = 4.dp // Sehr eng (für Tabellen, dichte Listen)
val SpacingS = 8.dp // Standard Abstand zwischen Elementen
val SpacingM = 16.dp // Abstand für Sektionen
val SpacingL = 24.dp // Außenabstand für Screens
// Spacing (Abstände)
val SpacingXS = 4.dp // Sehr eng (für Tabellen, dichte Listen)
val SpacingS = 8.dp // Standard Abstand zwischen Elementen
val SpacingM = 16.dp // Abstand für Sektionen
val SpacingL = 24.dp // Außenabstand für Screens
// Sizes (Größen)
val IconSizeS = 16.dp
val IconSizeM = 24.dp
// Sizes (Größen)
val IconSizeS = 16.dp
val IconSizeM = 24.dp
// Borders
val BorderThin = 1.dp
// Borders
val BorderThin = 1.dp
// Corner Radius (Ecken)
val CornerRadiusS = 4.dp // Leicht abgerundet (Enterprise Look)
val CornerRadiusM = 8.dp
// Corner Radius (Ecken)
val CornerRadiusS = 4.dp // Leicht abgerundet (Enterprise Look)
val CornerRadiusM = 8.dp
}