Skip to content

Commit d25dbdf

Browse files
committed
feat: enhance platform display in RepositoryCard with icons
- Update `ic_platform_linux.xml` vector asset with a simplified path design. - Refactor `PlatformBadge` in `RepositoryCard.kt` to display platform-specific icons alongside the platform name. - Improve `PlatformBadge` UI by increasing the corner radius to 16.dp and using a `FlowRow` for better icon and text alignment. - Integrate `toIcons()` utility to map platforms to their respective visual indicators.
1 parent 3bcf336 commit d25dbdf

2 files changed

Lines changed: 29 additions & 37 deletions

File tree

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
android:width="32dp"
3-
android:height="32dp"
4-
android:viewportWidth="16"
5-
android:viewportHeight="16">
6-
<path
7-
android:pathData="M13.338,12.033c-0.1,-0.112 -0.146,-0.319 -0.197,-0.54 -0.05,-0.22 -0.107,-0.457 -0.288,-0.61v-0.001a0.756,0.756 0,0 0,-0.223 -0.134c0.252,-0.745 0.153,-1.487 -0.1,-2.157 -0.312,-0.823 -0.855,-1.54 -1.27,-2.03 -0.464,-0.586 -0.918,-1.142 -0.91,-1.963 0.014,-1.254 0.138,-3.579 -2.068,-3.582 -0.09,0 -0.183,0.004 -0.28,0.012 -2.466,0.198 -1.812,2.803 -1.849,3.675 -0.045,0.638 -0.174,1.14 -0.613,1.764 -0.515,0.613 -1.24,1.604 -1.584,2.637 -0.162,0.487 -0.24,0.984 -0.168,1.454 -0.023,0.02 -0.044,0.041 -0.064,0.063 -0.151,0.161 -0.263,0.357 -0.388,0.489 -0.116,0.116 -0.282,0.16 -0.464,0.225 -0.183,0.066 -0.383,0.162 -0.504,0.395v0.001a0.702,0.702 0,0 0,-0.077 0.339c0,0.108 0.016,0.217 0.032,0.322 0.034,0.22 0.068,0.427 0.023,0.567 -0.144,0.395 -0.163,0.667 -0.061,0.865 0.102,0.199 0.31,0.286 0.547,0.335 0.473,0.1 1.114,0.075 1.619,0.342l0.043,-0.082 -0.043,0.082c0.54,0.283 1.089,0.383 1.526,0.284a0.99,0.99 0,0 0,0.706 -0.552c0.342,-0.002 0.717,-0.146 1.318,-0.18 0.408,-0.032 0.918,0.145 1.503,0.113a0.806,0.806 0,0 0,0.068 0.183l0.001,0.001c0.227,0.455 0.65,0.662 1.1,0.627 0.45,-0.036 0.928,-0.301 1.315,-0.762l-0.07,-0.06 0.07,0.06c0.37,-0.448 0.982,-0.633 1.388,-0.878 0.203,-0.123 0.368,-0.276 0.38,-0.499 0.013,-0.222 -0.118,-0.471 -0.418,-0.805z"
8-
android:fillColor="#202020"/>
9-
<path
10-
android:pathData="M13.571,12.828c-0.007,0.137 -0.107,0.24 -0.29,0.35 -0.368,0.222 -1.019,0.414 -1.434,0.918 -0.362,0.43 -0.802,0.665 -1.19,0.696 -0.387,0.03 -0.721,-0.13 -0.919,-0.526v-0.002c-0.123,-0.233 -0.072,-0.6 0.031,-0.987s0.251,-0.785 0.271,-1.108v-0.001c0.02,-0.415 0.044,-0.776 0.114,-1.055 0.07,-0.28 0.179,-0.468 0.373,-0.575a0.876,0.876 0,0 1,0.027 -0.014c0.022,0.359 0.2,0.725 0.514,0.804 0.343,0.09 0.838,-0.204 1.047,-0.445l0.122,-0.004c0.184,-0.005 0.337,0.006 0.495,0.143v0.001c0.121,0.102 0.179,0.296 0.229,0.512 0.05,0.217 0.09,0.453 0.239,0.621 0.287,0.32 0.38,0.534 0.371,0.672zM6.592,13.843v0.003c-0.034,0.435 -0.28,0.672 -0.656,0.758 -0.377,0.086 -0.888,0 -1.398,-0.266 -0.565,-0.3 -1.237,-0.27 -1.667,-0.36 -0.216,-0.045 -0.357,-0.113 -0.421,-0.238 -0.064,-0.126 -0.066,-0.345 0.071,-0.72v-0.001l0.001,-0.002c0.068,-0.209 0.018,-0.438 -0.015,-0.653 -0.033,-0.214 -0.049,-0.41 0.024,-0.546l0.001,-0.001c0.094,-0.181 0.232,-0.246 0.403,-0.307 0.17,-0.062 0.373,-0.11 0.533,-0.27l0.001,-0.001h0.001c0.148,-0.157 0.26,-0.353 0.39,-0.492 0.11,-0.117 0.22,-0.195 0.385,-0.196h0.005a0.61,0.61 0,0 1,0.093 0.008c0.22,0.033 0.411,0.187 0.596,0.437l0.533,0.971v0.001c0.142,0.296 0.441,0.622 0.695,0.954 0.254,0.333 0.45,0.666 0.425,0.921z"
11-
android:fillColor="#F8BF11"/>
12-
<path
13-
android:pathData="M9.25,4.788c-0.043,-0.084 -0.13,-0.164 -0.28,-0.225 -0.31,-0.133 -0.444,-0.142 -0.617,-0.254 -0.28,-0.181 -0.513,-0.244 -0.706,-0.244a0.834,0.834 0,0 0,-0.272 0.047c-0.236,0.08 -0.392,0.25 -0.49,0.342 -0.02,0.019 -0.044,0.035 -0.104,0.08 -0.06,0.043 -0.15,0.11 -0.28,0.208 -0.117,0.086 -0.154,0.2 -0.114,0.332 0.04,0.132 0.167,0.285 0.4,0.417h0.001c0.145,0.085 0.244,0.2 0.358,0.291a0.801,0.801 0,0 0,0.189 0.117c0.072,0.031 0.156,0.052 0.26,0.058 0.248,0.015 0.43,-0.06 0.59,-0.151 0.16,-0.092 0.296,-0.204 0.452,-0.255h0.001c0.32,-0.1 0.548,-0.301 0.62,-0.493a0.324,0.324 0,0 0,-0.008 -0.27z"
14-
android:fillColor="#D6A312"/>
15-
<path
16-
android:pathData="M8.438,5.26c-0.255,0.133 -0.552,0.294 -0.869,0.294 -0.316,0 -0.566,-0.146 -0.745,-0.289 -0.09,-0.07 -0.163,-0.142 -0.218,-0.193 -0.096,-0.075 -0.084,-0.181 -0.045,-0.178 0.066,0.008 0.076,0.095 0.117,0.134 0.056,0.052 0.126,0.12 0.211,0.187 0.17,0.135 0.397,0.266 0.68,0.266 0.284,0 0.614,-0.166 0.816,-0.28 0.115,-0.064 0.26,-0.179 0.379,-0.266 0.09,-0.067 0.087,-0.147 0.162,-0.138 0.075,0.009 0.02,0.089 -0.085,0.18 -0.105,0.092 -0.27,0.214 -0.403,0.283z"
17-
android:fillColor="#202020"/>
18-
<path
19-
android:pathData="M12.337,10.694a1.724,1.724 0,0 0,-0.104 0h-0.01c0.088,-0.277 -0.106,-0.48 -0.621,-0.713 -0.534,-0.235 -0.96,-0.212 -1.032,0.265 -0.005,0.025 -0.009,0.05 -0.011,0.076a0.801,0.801 0,0 0,-0.12 0.054c-0.252,0.137 -0.389,0.386 -0.465,0.692 -0.076,0.305 -0.098,0.674 -0.119,1.09 -0.013,0.208 -0.099,0.49 -0.186,0.79 -0.875,0.624 -2.09,0.894 -3.122,0.19 -0.07,-0.11 -0.15,-0.22 -0.233,-0.328a13.85,13.85 0,0 0,-0.16 -0.205,0.65 0.65,0 0,0 0.268,-0.05 0.34,0.34 0,0 0,0.186 -0.192c0.063,-0.17 0,-0.408 -0.202,-0.68 -0.201,-0.273 -0.542,-0.58 -1.043,-0.888 -0.368,-0.23 -0.574,-0.51 -0.67,-0.814 -0.097,-0.305 -0.084,-0.635 -0.01,-0.96 0.143,-0.625 0.51,-1.233 0.743,-1.614 0.063,-0.046 0.023,0.086 -0.236,0.567 -0.232,0.44 -0.667,1.455 -0.072,2.248 0.016,-0.564 0.15,-1.14 0.377,-1.677 0.329,-0.747 1.018,-2.041 1.072,-3.073 0.029,0.02 0.125,0.086 0.169,0.11 0.126,0.075 0.221,0.184 0.344,0.283a0.85,0.85 0,0 0,0.575 0.2c0.24,0 0.427,-0.079 0.582,-0.168 0.17,-0.096 0.304,-0.204 0.433,-0.245 0.27,-0.085 0.486,-0.235 0.608,-0.41 0.21,0.83 0.7,2.027 1.014,2.611 0.167,0.31 0.5,0.969 0.643,1.762 0.091,-0.002 0.191,0.01 0.299,0.038 0.375,-0.973 -0.319,-2.022 -0.636,-2.314 -0.128,-0.124 -0.135,-0.18 -0.07,-0.177 0.343,0.304 0.795,0.917 0.96,1.608 0.075,0.315 0.09,0.646 0.01,0.973 0.04,0.017 0.08,0.034 0.12,0.054 0.603,0.293 0.826,0.548 0.719,0.897z"
20-
android:fillColor="#ffffff"/>
21-
<path
22-
android:pathData="M8.04,8.062c-0.556,0.002 -1.099,0.251 -1.558,0.716 -0.46,0.464 -0.814,1.122 -1.018,1.888l0.061,0.038v0.004c0.47,0.298 0.805,0.598 1.012,0.878 0.219,0.296 0.316,0.584 0.223,0.834a0.513,0.513 0,0 1,-0.27 0.283l-0.041,0.015c0.074,0.097 0.146,0.197 0.213,0.3 0.944,0.628 2.042,0.396 2.867,-0.172 0.08,-0.278 0.153,-0.536 0.163,-0.698 0.021,-0.415 0.042,-0.792 0.124,-1.12 0.082,-0.33 0.242,-0.63 0.544,-0.795 0.017,-0.01 0.034,-0.015 0.051,-0.023a0.756,0.756 0,0 1,0.022 -0.094c-0.242,-0.622 -0.591,-1.14 -1.01,-1.5 -0.42,-0.36 -0.897,-0.551 -1.382,-0.554zM10.41,10.217l-0.002,0.005v-0.002l0.001,-0.004z"
23-
android:fillColor="#E6E6E6"/>
24-
<path
25-
android:pathData="M9.278,3.833a1.05,1.05 0,0 1,-0.215 0.656,4.119 4.119,0 0,0 -0.218,-0.09l-0.127,-0.045c0.029,-0.035 0.085,-0.075 0.107,-0.127a0.669,0.669 0,0 0,0.05 -0.243l0.001,-0.01a0.673,0.673 0,0 0,-0.035 -0.236,0.434 0.434,0 0,0 -0.108,-0.184 0.223,0.223 0,0 0,-0.156 -0.07H8.57a0.228,0.228 0,0 0,-0.151 0.06,0.434 0.434,0 0,0 -0.122,0.175 0.676,0.676 0,0 0,-0.05 0.243v0.01a0.718,0.718 0,0 0,0.009 0.14,1.773 1.773,0 0,0 -0.354,-0.12 1.196,1.196 0,0 1,-0.01 -0.133v-0.013a1.035,1.035 0,0 1,0.088 -0.447,0.793 0.793,0 0,1 0.25,-0.328 0.554,0.554 0,0 1,0.346 -0.123h0.006c0.125,0 0.232,0.036 0.342,0.116a0.78,0.78 0,0 1,0.257 0.324c0.063,0.138 0.094,0.273 0.097,0.433l0.001,0.012zM7.388,3.997a1.05,1.05 0,0 0,-0.277 0.125,0.623 0.623,0 0,0 0.002,-0.15v-0.008a0.651,0.651 0,0 0,-0.048 -0.192,0.37 0.37,0 0,0 -0.096,-0.141 0.158,0.158 0,0 0,-0.119 -0.045c-0.042,0.004 -0.077,0.024 -0.11,0.065a0.372,0.372 0,0 0,-0.07 0.156,0.626 0.626,0 0,0 -0.013,0.205v0.008a0.634,0.634 0,0 0,0.048 0.193,0.367 0.367,0 0,0 0.116,0.156l-0.102,0.08 -0.078,0.056a0.706,0.706 0,0 1,-0.16 -0.24c-0.053,-0.12 -0.082,-0.24 -0.09,-0.381v-0.001a1.071,1.071 0,0 1,0.045 -0.39,0.668 0.668,0 0,1 0.167,-0.292 0.359,0.359 0,0 1,0.264 -0.118c0.084,0 0.158,0.028 0.235,0.09a0.68,0.68 0,0 1,0.199 0.271c0.053,0.12 0.08,0.24 0.089,0.382v0.001c0.003,0.06 0.003,0.115 -0.002,0.17z"
26-
android:fillColor="#ffffff"/>
27-
<path
28-
android:pathData="M7.806,4.335c0.01,0.034 0.065,0.029 0.097,0.045 0.027,0.014 0.05,0.045 0.08,0.046 0.03,0.001 0.076,-0.01 0.08,-0.04 0.005,-0.038 -0.052,-0.063 -0.088,-0.077 -0.047,-0.019 -0.107,-0.028 -0.151,-0.003 -0.01,0.005 -0.021,0.018 -0.018,0.03zM7.484,4.335c-0.01,0.034 -0.065,0.029 -0.096,0.045 -0.028,0.014 -0.05,0.045 -0.081,0.046 -0.03,0.001 -0.076,-0.01 -0.08,-0.04 -0.005,-0.038 0.052,-0.063 0.088,-0.077 0.047,-0.019 0.108,-0.028 0.152,-0.003 0.01,0.005 0.02,0.018 0.017,0.03z"
29-
android:fillColor="#202020"/>
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="32dp" android:viewportHeight="32" android:viewportWidth="32" android:width="32dp">
2+
3+
<path android:fillColor="#000000" android:pathData="M15.6,8.1c0,0.1 -0.1,0.1 -0.1,0.1h-0.1c-0.1,0 -0.1,-0.1 -0.2,-0.2 0,0 -0.1,-0.1 -0.1,-0.2s0,-0.1 0.1,-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,0.7 0.2,1.2 0.1,0.4 0.2,0.8 0.4,1.1 0.2,0.4 0.4,0.8 0.7,1.2 0.3,0.5 0.7,1 1.1,1.6 0.9,1 1.6,2.2 2.1,3.3 0.5,1 0.8,2.4 0.8,3.8 0,0.7 -0.1,1.4 -0.3,2.1 0.2,0 0.3,0.1 0.4,0.2s0.2,0.5 0.3,0.9l0.1,0.8c0.1,0.2 0.2,0.4 0.5,0.6 0.2,0.2 0.4,0.3 0.7,0.5 0.2,0.1 0.5,0.2 0.7,0.4 0.2,0.2 0.3,0.4 0.3,0.6 0,0.3 -0.1,0.6 -0.3,0.8 -0.2,0.2 -0.4,0.3 -0.7,0.4l-1.2,0.6c-0.5,0.3 -1,0.7 -1.5,1.1l-1,0.9c-0.4,0.4 -0.8,0.7 -1.1,0.9 -0.3,0.2 -0.7,0.3 -1.1,0.3l-0.7,-0.1c-0.8,-0.2 -1.3,-0.6 -1.6,-1.3 -1.8,0 -3.1,-0.1 -3.9,-0.1"/>
4+
305
</vector>

core/presentation/src/commonMain/kotlin/zed/rainxch/core/presentation/components/RepositoryCard.kt

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package zed.rainxch.core.presentation.components
22

3+
import androidx.compose.foundation.Image
34
import androidx.compose.foundation.clickable
45
import androidx.compose.foundation.layout.Arrangement
56
import androidx.compose.foundation.layout.Box
@@ -48,6 +49,7 @@ import zed.rainxch.core.presentation.model.GithubUserUi
4849
import zed.rainxch.core.presentation.theme.GithubStoreTheme
4950
import zed.rainxch.core.presentation.utils.formatReleasedAt
5051
import zed.rainxch.core.presentation.utils.hasWeekNotPassed
52+
import zed.rainxch.core.presentation.utils.toIcons
5153
import zed.rainxch.githubstore.core.presentation.res.*
5254

5355
@OptIn(ExperimentalMaterial3ExpressiveApi::class, ExperimentalLayoutApi::class)
@@ -309,16 +311,31 @@ fun PlatformChip(
309311
) {
310312
Surface(
311313
modifier = modifier,
312-
shape = RoundedCornerShape(8.dp),
314+
shape = RoundedCornerShape(16.dp),
313315
color = MaterialTheme.colorScheme.surfaceContainerHighest,
314316
) {
315-
Text(
316-
text = platform.name,
317-
style = MaterialTheme.typography.labelSmall,
318-
color = MaterialTheme.colorScheme.onSurfaceVariant,
319-
fontWeight = FontWeight.Medium,
320-
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
321-
)
317+
FlowRow(
318+
modifier = Modifier.padding(vertical = 4.dp, horizontal = 8.dp),
319+
horizontalArrangement = Arrangement.spacedBy(2.dp),
320+
verticalArrangement = Arrangement.spacedBy(4.dp, Alignment.CenterVertically),
321+
) {
322+
platform.toIcons().forEach { icon ->
323+
Icon(
324+
imageVector = icon,
325+
contentDescription = null,
326+
modifier = Modifier.size(20.dp),
327+
tint = MaterialTheme.colorScheme.onSurface,
328+
)
329+
}
330+
331+
Text(
332+
text = platform.name,
333+
style = MaterialTheme.typography.labelSmall,
334+
color = MaterialTheme.colorScheme.onSurfaceVariant,
335+
fontWeight = FontWeight.Medium,
336+
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
337+
)
338+
}
322339
}
323340
}
324341

0 commit comments

Comments
 (0)