Initial commit of HermesControl Android app
This commit is contained in:
commit
d6ff3de594
92 files changed
+10004
No files matched your search
@@ -0,0 +1,43 @@
|
||||
package com.m57.hermescontrol.theme
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
// Primary - Deep Purple
|
||||
val HermesPurple = Color(0xFF6B4EFF)
|
||||
val HermesPurpleLight = Color(0xFF9D8AFF)
|
||||
val HermesPurpleDark = Color(0xFF4A35B3)
|
||||
val HermesPurple80 = Color(0xFFCFC3FF)
|
||||
|
||||
// Secondary - Amber / Gold
|
||||
val HermesAmber = Color(0xFFFFB300)
|
||||
val HermesAmberLight = Color(0xFFFFE54C)
|
||||
val HermesAmberDark = Color(0xFFC68400)
|
||||
val HermesAmber80 = Color(0xFFFFE082)
|
||||
|
||||
// Dark theme surfaces
|
||||
val DarkBackground = Color(0xFF121212)
|
||||
val DarkSurface = Color(0xFF1E1E2E)
|
||||
val DarkSurfaceVariant = Color(0xFF2A2A3C)
|
||||
val DarkOnSurface = Color(0xFFE6E1E5)
|
||||
val DarkOnSurfaceVariant = Color(0xFFCAC4D0)
|
||||
|
||||
// Light theme surfaces
|
||||
val LightBackground = Color(0xFFFFFBFE)
|
||||
val LightSurface = Color(0xFFFFFBFE)
|
||||
val LightSurfaceVariant = Color(0xFFE7E0EC)
|
||||
val LightOnSurface = Color(0xFF1C1B1F)
|
||||
val LightOnSurfaceVariant = Color(0xFF49454F)
|
||||
|
||||
// Status colors
|
||||
val StatusGreen = Color(0xFF4CAF50)
|
||||
val StatusRed = Color(0xFFEF5350)
|
||||
val StatusYellow = Color(0xFFFFC107)
|
||||
|
||||
// Chat bubble colors
|
||||
val UserBubble = Color(0xFF6B4EFF)
|
||||
val UserBubbleDark = Color(0xFF5A3FE0)
|
||||
val AssistantBubble = Color(0xFF2A2A3C)
|
||||
val AssistantBubbleLight = Color(0xFFE7E0EC)
|
||||
val SystemMessageColor = Color(0xFF9E9E9E)
|
||||
val ToolChipColor = Color(0xFF37474F)
|
||||
val ToolChipColorLight = Color(0xFFECEFF1)
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.m57.hermescontrol.theme
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
enum class ThemePreference { SYSTEM, LIGHT, DARK }
|
||||
|
||||
val LocalThemePreference = compositionLocalOf { ThemePreference.SYSTEM }
|
||||
|
||||
private val HermesDarkColorScheme =
|
||||
darkColorScheme(
|
||||
primary = HermesPurple,
|
||||
onPrimary = Color.White,
|
||||
primaryContainer = HermesPurpleDark,
|
||||
onPrimaryContainer = HermesPurple80,
|
||||
secondary = HermesAmber,
|
||||
onSecondary = Color.Black,
|
||||
secondaryContainer = HermesAmberDark,
|
||||
onSecondaryContainer = HermesAmber80,
|
||||
tertiary = HermesAmberLight,
|
||||
background = DarkBackground,
|
||||
onBackground = DarkOnSurface,
|
||||
surface = DarkSurface,
|
||||
onSurface = DarkOnSurface,
|
||||
surfaceVariant = DarkSurfaceVariant,
|
||||
onSurfaceVariant = DarkOnSurfaceVariant,
|
||||
error = Color(0xFFCF6679),
|
||||
onError = Color.Black,
|
||||
outline = Color(0xFF938F99),
|
||||
)
|
||||
|
||||
private val HermesLightColorScheme =
|
||||
lightColorScheme(
|
||||
primary = HermesPurple,
|
||||
onPrimary = Color.White,
|
||||
primaryContainer = HermesPurple80,
|
||||
onPrimaryContainer = HermesPurpleDark,
|
||||
secondary = HermesAmber,
|
||||
onSecondary = Color.Black,
|
||||
secondaryContainer = HermesAmber80,
|
||||
onSecondaryContainer = HermesAmberDark,
|
||||
tertiary = HermesAmberDark,
|
||||
background = LightBackground,
|
||||
onBackground = LightOnSurface,
|
||||
surface = LightSurface,
|
||||
onSurface = LightOnSurface,
|
||||
surfaceVariant = LightSurfaceVariant,
|
||||
onSurfaceVariant = LightOnSurfaceVariant,
|
||||
error = Color(0xFFB00020),
|
||||
onError = Color.White,
|
||||
outline = Color(0xFF79747E),
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun HermesControlTheme(
|
||||
themePreference: ThemePreference = LocalThemePreference.current,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
val darkTheme =
|
||||
when (themePreference) {
|
||||
ThemePreference.SYSTEM -> isSystemInDarkTheme()
|
||||
ThemePreference.LIGHT -> false
|
||||
ThemePreference.DARK -> true
|
||||
}
|
||||
|
||||
val colorScheme = if (darkTheme) HermesDarkColorScheme else HermesLightColorScheme
|
||||
|
||||
MaterialTheme(
|
||||
colorScheme = colorScheme,
|
||||
typography = Typography,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.m57.hermescontrol.theme
|
||||
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
// Set of Material typography styles to start with
|
||||
val Typography =
|
||||
Typography(
|
||||
bodyLarge =
|
||||
TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp,
|
||||
),
|
||||
/* Other default text styles to override
|
||||
titleLarge = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 22.sp,
|
||||
lineHeight = 28.sp,
|
||||
letterSpacing = 0.sp
|
||||
),
|
||||
labelSmall = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 11.sp,
|
||||
lineHeight = 16.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
)
|
||||
*/
|
||||
)
|
||||
Reference in new issue
Block a user