From 61894aaa739523323c55ff9eacc3893be4eece49 Mon Sep 17 00:00:00 2001 From: itza2k <161753369+itza2k@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:47:06 +0530 Subject: [PATCH 01/18] new colours --- src/main/kotlin/theme/Color.kt | 74 ++++++++++++++++++---------- src/main/kotlin/theme/ColorScheme.kt | 3 +- 2 files changed, 50 insertions(+), 27 deletions(-) diff --git a/src/main/kotlin/theme/Color.kt b/src/main/kotlin/theme/Color.kt index b4cf9cf..cb4b2a8 100644 --- a/src/main/kotlin/theme/Color.kt +++ b/src/main/kotlin/theme/Color.kt @@ -4,36 +4,58 @@ import androidx.compose.ui.graphics.Color object AppColors { val Light = ColorScheme( - primary = Color(0xFF6200EE), - secondary = Color(0xFF03DAC6), - background = Color(0xFFFFFFFF), - surface = Color(0xFFFFFFFF), - error = Color(0xFFB00020), + primary = Color(0xFF9F8FFF), // Refined Vibrant Purple + secondary = Color(0xFFB5A6FF), // Harmonious Purple + background = Color(0xFFFCFCFD), // Pristine White + surface = Color(0xFFFFFFFF), // Pure White + error = Color(0xFFDC2626), // Clear Red onPrimary = Color(0xFFFFFFFF), - onSecondary = Color(0xFF000000), - onBackground = Color(0xFF000000), - onSurface = Color(0xFF000000), - onError = Color(0xFFFF8383), + onSecondary = Color(0xFFFFFFFF), + onBackground = Color(0xFF18181B), // Darker Text + onSurface = Color(0xFF18181B), // Darker Text + onError = Color(0xFFFFFFFF), + switchCheckedTrackColor = Color(0xFF9F8FFF) // Match Primary ) - // Dark Theme Colors val Dark = ColorScheme( - primary = Color(0xFF2E236C), - secondary = Color(0xFFC8ACD6), - background = Color(0xFF9AA6B2), - surface = Color(0xFF222831), - error = Color(0xFFCF6679), - onPrimary = Color(0xFF000000), - onSecondary = Color(0xFF000000), - onBackground = Color(0xFF000000), - onSurface = Color(0xFFFFFFFF), - onError = Color(0xFFFF8383), + primary = Color(0xFFB4A2FF), // Luminous Purple + secondary = Color(0xFFC7B8FF), // Soft Glow Purple + background = Color(0xFF0A0A0B), // Near Black + surface = Color(0xFF141417), // Deep Dark + error = Color(0xFFFF4444), // Bright Red + onPrimary = Color(0xFF0A0A0B), // Near Black + onSecondary = Color(0xFF0A0A0B), // Near Black + onBackground = Color(0xFFFCFCFC), // Crisp White + onSurface = Color(0xFFFCFCFC), // Crisp White + onError = Color(0xFF0A0A0B), // Near Black + switchCheckedTrackColor = Color(0xFFB4A2FF) // Match Primary ) - // Define Custom Colors - val darkSwitchCheckedTrackColor = Color(0xFF16C47F) - val lightSwitchCheckedTrackColor = Color(0xFF54C392) - val diskManagerBackgroundColor = Color(0xFFffd65a) - val headerWingetTextColorLight = Color(0xFF0A5EB0) - val headerWingetTextColorDark = Color(0xFF0D92F4) + // Enhanced accent colors + val headerWingetTextColorLight = Color(0xFF9F8FFF) // Match Light Primary + val headerWingetTextColorDark = Color(0xFFB4A2FF) // Match Dark Primary + val diskManagerBackgroundColor = Color(0xFFB5A6FF) // Harmonious Purple + + // status colors + val successLight = Color(0xFF10B981) // Vibrant Green + val successDark = Color(0xFF34D399) // Glowing Green + val warningLight = Color(0xFFF59E0B) // Bold Orange + val warningDark = Color(0xFFFFBA08) // Bright Gold + val availableUpdateLight = Color(0xFF10B981) // Vibrant Green + val availableUpdateDark = Color(0xFF34D399) // Glowing Green + + // Enhanced action buttons + val downloadButtonLight = Color(0xFF9F8FFF) // Match Light Primary + val downloadButtonDark = Color(0xFFB4A2FF) // Match Dark Primary + val deleteButtonLight = Color(0xFFDC2626) // Clear Red + val deleteButtonDark = Color(0xFFFF4444) // Bright Red + + // System accents + val windowsAccentLight = Color(0xFF9F8FFF) // Match Light Primary + val windowsAccentDark = Color(0xFFB4A2FF) // Match Dark Primary + + // Refined accents + val accentHighlight = Color(0xFFB5A6FF) // Harmonious Purple + val accentGlow = Color(0xFFC7B8FF) // Soft Glow Purple + val accentVibrant = Color(0xFF9F8FFF) // Match Light Primary } \ No newline at end of file diff --git a/src/main/kotlin/theme/ColorScheme.kt b/src/main/kotlin/theme/ColorScheme.kt index 6f672bd..3ebbfe1 100644 --- a/src/main/kotlin/theme/ColorScheme.kt +++ b/src/main/kotlin/theme/ColorScheme.kt @@ -12,5 +12,6 @@ data class ColorScheme( val onSecondary: Color, val onBackground: Color, val onSurface: Color, - val onError: Color + val onError: Color, + val switchCheckedTrackColor: Color // Add this new property ) From cf0a88d5e2ffb35ca0da3f023ac940cf6342ff50 Mon Sep 17 00:00:00 2001 From: itza2k <161753369+itza2k@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:49:53 +0530 Subject: [PATCH 02/18] dialog box --- src/main/kotlin/ui/components/LoaderDialog.kt | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 src/main/kotlin/ui/components/LoaderDialog.kt diff --git a/src/main/kotlin/ui/components/LoaderDialog.kt b/src/main/kotlin/ui/components/LoaderDialog.kt new file mode 100644 index 0000000..1c1cf82 --- /dev/null +++ b/src/main/kotlin/ui/components/LoaderDialog.kt @@ -0,0 +1,128 @@ +package ui.components + +import androidx.compose.animation.core.* +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.* +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Refresh +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.rotate +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Dialog +import utils.bodyFont +import utils.loadString + +@Composable +fun LoaderDialog( + message: String = loadString("dialog.loading"), + secondaryMessage: String = loadString("dialog.loading.secondary") +) { + Dialog(onDismissRequest = {}) { + val infiniteTransition = rememberInfiniteTransition() + + // the rotation animation + val rotation by infiniteTransition.animateFloat( + initialValue = 0f, + targetValue = 360f, + animationSpec = infiniteRepeatable( + animation = tween(1500, easing = FastOutSlowInEasing), + repeatMode = RepeatMode.Restart + ) + ) + + // the pulse animation + val scale by infiniteTransition.animateFloat( + initialValue = 0.8f, + targetValue = 1f, + animationSpec = infiniteRepeatable( + animation = tween(800, easing = FastOutSlowInEasing), + repeatMode = RepeatMode.Reverse + ) + ) + + // shimmer effect + val shimmerEffect by infiniteTransition.animateFloat( + initialValue = 0f, + targetValue = 1f, + animationSpec = infiniteRepeatable( + animation = tween(1000, easing = LinearEasing), + repeatMode = RepeatMode.Reverse + ) + ) + + Card( + modifier = Modifier + .width(320.dp) + .wrapContentHeight(), + shape = RoundedCornerShape(20.dp), + elevation = 12.dp, + backgroundColor = MaterialTheme.colors.surface + ) { + Box( + modifier = Modifier + .background( + brush = Brush.linearGradient( + colors = listOf( + MaterialTheme.colors.surface, + MaterialTheme.colors.primary.copy(alpha = 0.1f * shimmerEffect), + MaterialTheme.colors.surface + ) + ) + ) + ) { + Column( + modifier = Modifier + .padding(24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + // spin the icon + Icon( + imageVector = Icons.Filled.Refresh, + contentDescription = null, + modifier = Modifier + .size(48.dp) + .rotate(rotation) + .alpha(scale), + tint = MaterialTheme.colors.primary + ) + + // message + Text( + text = message, + style = MaterialTheme.typography.h6, + fontFamily = bodyFont, + textAlign = TextAlign.Center, + color = MaterialTheme.colors.onSurface + ) + + // 2nd message with pulse ani + Text( + text = secondaryMessage, + style = MaterialTheme.typography.caption, + fontFamily = bodyFont, + textAlign = TextAlign.Center, + color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f), + modifier = Modifier.alpha(scale) + ) + + // progress indicator + LinearProgressIndicator( + modifier = Modifier + .fillMaxWidth() + .height(4.dp), + color = MaterialTheme.colors.primary, + backgroundColor = MaterialTheme.colors.onSurface.copy(alpha = 0.1f) + ) + } + } + } + } +} From acf1456e84abfed80be45f84b32f53eece9cafc2 Mon Sep 17 00:00:00 2001 From: itza2k <161753369+itza2k@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:51:50 +0530 Subject: [PATCH 03/18] update --- .idea/gradle.xml | 1 + .idea/misc.xml | 2 +- README.md | 15 +- src/main/kotlin/model/Package.kt | 12 +- src/main/kotlin/ui/MainScreen.kt | 194 ++++++++++-------- src/main/kotlin/ui/components/SearchBar.kt | 21 +- .../kotlin/ui/components/TableRowLayout.kt | 38 ++-- src/main/kotlin/utils/PowerShellCommand.kt | 2 +- src/main/kotlin/utils/util.kt | 9 +- src/main/resources/font/GoogleSans-Bold.ttf | Bin 0 -> 117916 bytes .../resources/font/GoogleSans-Regular.ttf | Bin 0 -> 119984 bytes src/main/resources/strings/strings.properties | 5 +- static/Darkmode.png | Bin 0 -> 134559 bytes static/Lightmode.png | Bin 0 -> 133830 bytes 14 files changed, 170 insertions(+), 129 deletions(-) create mode 100644 src/main/resources/font/GoogleSans-Bold.ttf create mode 100644 src/main/resources/font/GoogleSans-Regular.ttf create mode 100644 static/Darkmode.png create mode 100644 static/Lightmode.png diff --git a/.idea/gradle.xml b/.idea/gradle.xml index ce1c62c..f2c1963 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,6 +5,7 @@