mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-18 16:01:44 +00:00
feat: rename Violet and White themes to Amethyst and Glacier (#973)
This commit is contained in:
parent
11a1cf7ba9
commit
fbedf613f5
8 changed files with 29 additions and 25 deletions
|
|
@ -757,8 +757,8 @@
|
|||
<string name="theme_emerald">Esmeralda</string>
|
||||
<string name="theme_ocean">Océano</string>
|
||||
<string name="theme_rose">Rosa</string>
|
||||
<string name="theme_violet">Violeta</string>
|
||||
<string name="theme_white">Blanco</string>
|
||||
<string name="theme_violet">Amatista</string>
|
||||
<string name="theme_white">Glaciar</string>
|
||||
<string name="player_next_episode">Siguiente episodio</string>
|
||||
<string name="player_next_episode_finding_source">Buscando fuente…</string>
|
||||
<string name="player_next_episode_playing_via_countdown">Reproduciendo vía %1$s en %2$d…</string>
|
||||
|
|
|
|||
|
|
@ -790,8 +790,8 @@
|
|||
<string name="theme_emerald">Émeraude</string>
|
||||
<string name="theme_ocean">Océan</string>
|
||||
<string name="theme_rose">Rose</string>
|
||||
<string name="theme_violet">Violet</string>
|
||||
<string name="theme_white">Blanc</string>
|
||||
<string name="theme_violet">Améthyste</string>
|
||||
<string name="theme_white">Glacier</string>
|
||||
<string name="player_next_episode">Épisode suivant</string>
|
||||
<string name="player_next_episode_finding_source">Recherche de la source…</string>
|
||||
<string name="player_next_episode_playing_via_countdown">Lecture via %1$s dans %2$d…</string>
|
||||
|
|
|
|||
|
|
@ -830,8 +830,8 @@
|
|||
<string name="theme_emerald">Emerald</string>
|
||||
<string name="theme_ocean">Ocean</string>
|
||||
<string name="theme_rose">Rose</string>
|
||||
<string name="theme_violet">Violet</string>
|
||||
<string name="theme_white">White</string>
|
||||
<string name="theme_violet">Amethyst</string>
|
||||
<string name="theme_white">Glacier</string>
|
||||
<string name="player_next_episode">Next Episode</string>
|
||||
<string name="player_next_episode_finding_source">Finding source…</string>
|
||||
<string name="player_next_episode_playing_via_countdown">Playing via %1$s in %2$d…</string>
|
||||
|
|
|
|||
|
|
@ -13,20 +13,20 @@ import org.jetbrains.compose.resources.StringResource
|
|||
enum class AppTheme {
|
||||
CRIMSON,
|
||||
OCEAN,
|
||||
VIOLET,
|
||||
AMETHYST,
|
||||
EMERALD,
|
||||
AMBER,
|
||||
ROSE,
|
||||
WHITE,
|
||||
GLACIER,
|
||||
}
|
||||
|
||||
val AppTheme.labelRes: StringResource
|
||||
get() = when (this) {
|
||||
AppTheme.CRIMSON -> Res.string.theme_crimson
|
||||
AppTheme.OCEAN -> Res.string.theme_ocean
|
||||
AppTheme.VIOLET -> Res.string.theme_violet
|
||||
AppTheme.AMETHYST -> Res.string.theme_violet
|
||||
AppTheme.EMERALD -> Res.string.theme_emerald
|
||||
AppTheme.AMBER -> Res.string.theme_amber
|
||||
AppTheme.ROSE -> Res.string.theme_rose
|
||||
AppTheme.WHITE -> Res.string.theme_white
|
||||
AppTheme.GLACIER -> Res.string.theme_white
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import nuvio.composeapp.generated.resources.jetbrains_sans_regular
|
|||
import nuvio.composeapp.generated.resources.jetbrains_sans_semibold
|
||||
import org.jetbrains.compose.resources.Font
|
||||
|
||||
val LocalAppTheme = staticCompositionLocalOf { AppTheme.WHITE }
|
||||
val LocalAppTheme = staticCompositionLocalOf { AppTheme.GLACIER }
|
||||
|
||||
val MaterialTheme.appTheme: AppTheme
|
||||
@Composable
|
||||
|
|
@ -207,7 +207,7 @@ private val NuvioRippleConfiguration = RippleConfiguration(
|
|||
@Composable
|
||||
fun NuvioTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
appTheme: AppTheme = AppTheme.WHITE,
|
||||
appTheme: AppTheme = AppTheme.GLACIER,
|
||||
amoled: Boolean = false,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ object ThemeColors {
|
|||
backgroundCard = Color(0xFF1A1F24),
|
||||
)
|
||||
|
||||
val Violet = ThemeColorPalette(
|
||||
val Amethyst = ThemeColorPalette(
|
||||
secondary = Color(0xFF8E24AA),
|
||||
secondaryVariant = Color(0xFF6A1B9A),
|
||||
focusRing = Color(0xFFAB47BC),
|
||||
|
|
@ -76,7 +76,7 @@ object ThemeColors {
|
|||
backgroundCard = Color(0xFF241A1F),
|
||||
)
|
||||
|
||||
val White = ThemeColorPalette(
|
||||
val Glacier = ThemeColorPalette(
|
||||
secondary = Color(0xFFF5F5F5),
|
||||
secondaryVariant = Color(0xFFE0E0E0),
|
||||
onSecondary = Color(0xFF111111),
|
||||
|
|
@ -91,10 +91,10 @@ object ThemeColors {
|
|||
fun getColorPalette(theme: AppTheme): ThemeColorPalette = when (theme) {
|
||||
AppTheme.CRIMSON -> Crimson
|
||||
AppTheme.OCEAN -> Ocean
|
||||
AppTheme.VIOLET -> Violet
|
||||
AppTheme.AMETHYST -> Amethyst
|
||||
AppTheme.EMERALD -> Emerald
|
||||
AppTheme.AMBER -> Amber
|
||||
AppTheme.ROSE -> Rose
|
||||
AppTheme.WHITE -> White
|
||||
AppTheme.GLACIER -> Glacier
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ internal fun LazyListScope.appearanceSettingsContent(
|
|||
isTablet = isTablet,
|
||||
) {
|
||||
SettingsGroup(isTablet = isTablet) {
|
||||
val themes = listOf(AppTheme.WHITE) + AppTheme.entries.filterNot { it == AppTheme.WHITE }
|
||||
val themes = listOf(AppTheme.GLACIER) + AppTheme.entries.filterNot { it == AppTheme.GLACIER }
|
||||
FlowRow(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import kotlinx.coroutines.flow.StateFlow
|
|||
import kotlinx.coroutines.flow.asStateFlow
|
||||
|
||||
object ThemeSettingsRepository {
|
||||
private val _selectedTheme = MutableStateFlow(AppTheme.WHITE)
|
||||
private val _selectedTheme = MutableStateFlow(AppTheme.GLACIER)
|
||||
val selectedTheme: StateFlow<AppTheme> = _selectedTheme.asStateFlow()
|
||||
|
||||
private val _amoledEnabled = MutableStateFlow(false)
|
||||
|
|
@ -32,10 +32,10 @@ object ThemeSettingsRepository {
|
|||
|
||||
fun clearLocalState() {
|
||||
hasLoaded = false
|
||||
_selectedTheme.value = AppTheme.WHITE
|
||||
_selectedTheme.value = AppTheme.GLACIER
|
||||
_amoledEnabled.value = false
|
||||
_liquidGlassNativeTabBarEnabled.value = false
|
||||
NativeTabBridge.publishAccentColor(AppTheme.WHITE.nativeTabAccentHex())
|
||||
NativeTabBridge.publishAccentColor(AppTheme.GLACIER.nativeTabAccentHex())
|
||||
NativeTabBridge.publishLiquidGlassEnabled(false)
|
||||
_selectedAppLanguage.value = AppLanguage.ENGLISH
|
||||
}
|
||||
|
|
@ -45,12 +45,16 @@ object ThemeSettingsRepository {
|
|||
val stored = ThemeSettingsStorage.loadSelectedTheme()
|
||||
val theme = if (stored != null) {
|
||||
try {
|
||||
AppTheme.valueOf(stored)
|
||||
when (stored) {
|
||||
"VIOLET" -> AppTheme.AMETHYST
|
||||
"WHITE" -> AppTheme.GLACIER
|
||||
else -> AppTheme.valueOf(stored)
|
||||
}
|
||||
} catch (_: IllegalArgumentException) {
|
||||
AppTheme.WHITE
|
||||
AppTheme.GLACIER
|
||||
}
|
||||
} else {
|
||||
AppTheme.WHITE
|
||||
AppTheme.GLACIER
|
||||
}
|
||||
_selectedTheme.value = theme
|
||||
NativeTabBridge.publishAccentColor(theme.nativeTabAccentHex())
|
||||
|
|
@ -98,9 +102,9 @@ object ThemeSettingsRepository {
|
|||
private fun AppTheme.nativeTabAccentHex(): String = when (this) {
|
||||
AppTheme.CRIMSON -> "#E53935"
|
||||
AppTheme.OCEAN -> "#1E88E5"
|
||||
AppTheme.VIOLET -> "#8E24AA"
|
||||
AppTheme.AMETHYST -> "#8E24AA"
|
||||
AppTheme.EMERALD -> "#43A047"
|
||||
AppTheme.AMBER -> "#FB8C00"
|
||||
AppTheme.ROSE -> "#D81B60"
|
||||
AppTheme.WHITE -> "#F5F5F5"
|
||||
AppTheme.GLACIER -> "#F5F5F5"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue