mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-08-27 06:27:46 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7fa8f7d30 | ||
|
|
625d012e17 | ||
|
|
2cb0e1a67e | ||
|
|
b1f50d4098 | ||
|
|
24c429e8b9 |
@@ -16,8 +16,12 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- id: set
|
- id: set
|
||||||
run: |
|
run: |
|
||||||
|
# .version now holds the full semver (e.g. 1.0.0) and is bumped per release.
|
||||||
|
# It used to be a "0.3" prefix with github.run_number appended as the patch,
|
||||||
|
# which cannot express an exact 1.0.0. versionCode still tracks run_number,
|
||||||
|
# so it stays monotonic regardless of what versionName says.
|
||||||
BASE=$(cat .version | tr -d '[:space:]')
|
BASE=$(cat .version | tr -d '[:space:]')
|
||||||
echo "version=$BASE.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
echo "version=$BASE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
needs: Version
|
needs: Version
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 10_05_02
|
versionCode = 53
|
||||||
versionName = "1.5.2"
|
versionName = "1.0.1"
|
||||||
|
|
||||||
vectorDrawables {
|
vectorDrawables {
|
||||||
useSupportLibrary = true
|
useSupportLibrary = true
|
||||||
|
|||||||
+14
-83
@@ -114,7 +114,7 @@ fun RadiantTextField(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Slider with a gradient and glow.
|
* Slider. (i prefer the old on tbh so i reverted it back <3)
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun RadiantSlider(
|
fun RadiantSlider(
|
||||||
@@ -124,12 +124,10 @@ fun RadiantSlider(
|
|||||||
valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
|
valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
|
||||||
steps: Int = 0,
|
steps: Int = 0,
|
||||||
enabled: Boolean = true,
|
enabled: Boolean = true,
|
||||||
|
showStopIndicator: Boolean = true,
|
||||||
onValueChangeFinished: (() -> Unit)? = null,
|
onValueChangeFinished: (() -> Unit)? = null,
|
||||||
) {
|
) {
|
||||||
val scheme = MaterialTheme.colorScheme
|
if (showStopIndicator) {
|
||||||
val interaction = remember(::MutableInteractionSource)
|
|
||||||
|
|
||||||
if (radiantStyle.native) {
|
|
||||||
Slider(
|
Slider(
|
||||||
value = value,
|
value = value,
|
||||||
onValueChange = onValueChange,
|
onValueChange = onValueChange,
|
||||||
@@ -139,51 +137,18 @@ fun RadiantSlider(
|
|||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
)
|
)
|
||||||
return
|
} else {
|
||||||
|
Slider(
|
||||||
|
value = value,
|
||||||
|
onValueChange = onValueChange,
|
||||||
|
onValueChangeFinished = onValueChangeFinished,
|
||||||
|
valueRange = valueRange,
|
||||||
|
steps = steps,
|
||||||
|
enabled = enabled,
|
||||||
|
modifier = modifier,
|
||||||
|
track = { SliderDefaults.Track(sliderState = it, drawStopIndicator = null) },
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider(
|
|
||||||
value = value,
|
|
||||||
onValueChange = onValueChange,
|
|
||||||
onValueChangeFinished = onValueChangeFinished,
|
|
||||||
valueRange = valueRange,
|
|
||||||
steps = steps,
|
|
||||||
enabled = enabled,
|
|
||||||
interactionSource = interaction,
|
|
||||||
modifier = modifier,
|
|
||||||
track = { state ->
|
|
||||||
val fraction = if (valueRange.endInclusive > valueRange.start) {
|
|
||||||
((state.value - valueRange.start) / (valueRange.endInclusive - valueRange.start))
|
|
||||||
.coerceIn(0f, 1f)
|
|
||||||
} else 0f
|
|
||||||
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(6.dp)
|
|
||||||
.clip(CircleShape)
|
|
||||||
.background(scheme.surfaceContainerHighest),
|
|
||||||
) {
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth(fraction)
|
|
||||||
.fillMaxHeight()
|
|
||||||
.clip(CircleShape)
|
|
||||||
.background(accentBrush),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
thumb = {
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.glow(scheme.primary, 10.dp, CircleShape, alpha = 0.6f)
|
|
||||||
.size(20.dp)
|
|
||||||
.clip(CircleShape)
|
|
||||||
.background(scheme.onPrimary, CircleShape)
|
|
||||||
.border(3.dp, scheme.primary, CircleShape),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -270,37 +235,3 @@ fun RadiantSegmented(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** something.. */
|
/** something.. */
|
||||||
@Composable
|
|
||||||
fun RadiantLabeledSlider(
|
|
||||||
label: String,
|
|
||||||
value: Float,
|
|
||||||
onValueChange: (Float) -> Unit,
|
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
|
|
||||||
steps: Int = 0,
|
|
||||||
trailingText: String? = null,
|
|
||||||
) {
|
|
||||||
Column(modifier = modifier.fillMaxWidth()) {
|
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
|
||||||
Text(
|
|
||||||
text = label,
|
|
||||||
style = MaterialTheme.typography.labelLarge,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
modifier = Modifier.weight(1f),
|
|
||||||
)
|
|
||||||
if (trailingText != null) {
|
|
||||||
Text(
|
|
||||||
text = trailingText,
|
|
||||||
style = MaterialTheme.typography.labelLarge,
|
|
||||||
color = MaterialTheme.colorScheme.primary,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RadiantSlider(
|
|
||||||
value = value,
|
|
||||||
onValueChange = onValueChange,
|
|
||||||
valueRange = valueRange,
|
|
||||||
steps = steps,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+1
@@ -354,6 +354,7 @@ private fun SliderOptionRow(
|
|||||||
value = value,
|
value = value,
|
||||||
onValueChange = onValueChange,
|
onValueChange = onValueChange,
|
||||||
valueRange = valueRange,
|
valueRange = valueRange,
|
||||||
|
showStopIndicator = false,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ private val Rose80 = Color(0xFFFFAFCC)
|
|||||||
private val Rose90 = Color(0xFFFFD9E4)
|
private val Rose90 = Color(0xFFFFD9E4)
|
||||||
private val Rose95 = Color(0xFFFFECF1)
|
private val Rose95 = Color(0xFFFFECF1)
|
||||||
|
|
||||||
// ── Violet (secondary) ───────────────────────────────────────────────────────
|
// ── Dusty rose (secondary) ───────────────────────────────────────────────────
|
||||||
private val Violet10 = Color(0xFF25004E)
|
private val DustyRose10 = Color(0xFF2B0D18)
|
||||||
private val Violet20 = Color(0xFF3D177A)
|
private val DustyRose20 = Color(0xFF43202B)
|
||||||
private val Violet30 = Color(0xFF553194)
|
private val DustyRose30 = Color(0xFF5C3541)
|
||||||
private val Violet40 = Color(0xFF6E4BAF)
|
private val DustyRose40 = Color(0xFF774C58)
|
||||||
private val Violet80 = Color(0xFFD6BBFF)
|
private val DustyRose80 = Color(0xFFE4BCC8)
|
||||||
private val Violet90 = Color(0xFFECDCFF)
|
private val DustyRose90 = Color(0xFFF5DCE4)
|
||||||
|
|
||||||
// ── Aqua (tertiary) ──────────────────────────────────────────────────────────
|
// ── Aqua (tertiary) ──────────────────────────────────────────────────────────
|
||||||
private val Aqua10 = Color(0xFF00201F)
|
private val Aqua10 = Color(0xFF00201F)
|
||||||
@@ -89,10 +89,10 @@ val RadiantDarkColorScheme: ColorScheme = darkColorScheme(
|
|||||||
onPrimaryContainer = Rose90,
|
onPrimaryContainer = Rose90,
|
||||||
inversePrimary = Rose40,
|
inversePrimary = Rose40,
|
||||||
|
|
||||||
secondary = Violet80,
|
secondary = DustyRose80,
|
||||||
onSecondary = Violet20,
|
onSecondary = DustyRose20,
|
||||||
secondaryContainer = Violet30,
|
secondaryContainer = DustyRose30,
|
||||||
onSecondaryContainer = Violet90,
|
onSecondaryContainer = DustyRose90,
|
||||||
|
|
||||||
tertiary = Aqua80,
|
tertiary = Aqua80,
|
||||||
onTertiary = Aqua20,
|
onTertiary = Aqua20,
|
||||||
@@ -134,10 +134,10 @@ val RadiantLightColorScheme: ColorScheme = lightColorScheme(
|
|||||||
onPrimaryContainer = Rose10,
|
onPrimaryContainer = Rose10,
|
||||||
inversePrimary = Rose80,
|
inversePrimary = Rose80,
|
||||||
|
|
||||||
secondary = Violet40,
|
secondary = DustyRose40,
|
||||||
onSecondary = Neutral100,
|
onSecondary = Neutral100,
|
||||||
secondaryContainer = Violet90,
|
secondaryContainer = DustyRose90,
|
||||||
onSecondaryContainer = Violet10,
|
onSecondaryContainer = DustyRose10,
|
||||||
|
|
||||||
tertiary = Aqua40,
|
tertiary = Aqua40,
|
||||||
onTertiary = Neutral100,
|
onTertiary = Neutral100,
|
||||||
|
|||||||
Reference in New Issue
Block a user