expo-dev-launcher 6.0.5 → 6.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/android/build.gradle +2 -2
- package/android/src/debug/java/expo/modules/devlauncher/compose/DevLauncherBottomTabsNavigator.kt +16 -4
- package/android/src/debug/java/expo/modules/devlauncher/compose/primitives/Accordion.kt +47 -40
- package/android/src/debug/java/expo/modules/devlauncher/compose/routes/DevelopmentServers.kt +51 -0
- package/android/src/debug/java/expo/modules/devlauncher/compose/routes/Home.kt +4 -2
- package/android/src/debug/java/expo/modules/devlauncher/compose/routes/Profile.kt +2 -2
- package/android/src/debug/java/expo/modules/devlauncher/compose/screens/BranchesScreen.kt +121 -128
- package/android/src/debug/java/expo/modules/devlauncher/compose/screens/HomeScreen.kt +29 -201
- package/android/src/debug/java/expo/modules/devlauncher/compose/ui/DevelopmentSession.kt +122 -0
- package/android/src/debug/java/expo/modules/devlauncher/compose/ui/FetchDevelopmentServersButton.kt +118 -0
- package/android/src/debug/java/expo/modules/devlauncher/compose/ui/ScanQRCodeButton.kt +62 -0
- package/android/src/debug/java/expo/modules/devlauncher/compose/ui/ServerUrlInput.kt +12 -14
- package/android/src/main/res/drawable/download.xml +13 -0
- package/android/src/main/res/drawable/plus.xml +9 -0
- package/package.json +4 -4
- package/android/src/debug/java/expo/modules/devlauncher/compose/ui/DevelopmentServerHelp.kt +0 -55
package/CHANGELOG.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -20,13 +20,13 @@ expoModule {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
group = "host.exp.exponent"
|
|
23
|
-
version = "6.0.
|
|
23
|
+
version = "6.0.6"
|
|
24
24
|
|
|
25
25
|
android {
|
|
26
26
|
namespace "expo.modules.devlauncher"
|
|
27
27
|
defaultConfig {
|
|
28
28
|
versionCode 9
|
|
29
|
-
versionName "6.0.
|
|
29
|
+
versionName "6.0.6"
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
buildTypes {
|
package/android/src/debug/java/expo/modules/devlauncher/compose/DevLauncherBottomTabsNavigator.kt
CHANGED
|
@@ -18,6 +18,7 @@ import androidx.navigation.compose.rememberNavController
|
|
|
18
18
|
import expo.modules.devlauncher.compose.primitives.DefaultScaffold
|
|
19
19
|
import expo.modules.devlauncher.compose.routes.CrashReport
|
|
20
20
|
import expo.modules.devlauncher.compose.routes.CrashReportRoute
|
|
21
|
+
import expo.modules.devlauncher.compose.routes.DevelopmentServersRoute
|
|
21
22
|
import expo.modules.devlauncher.compose.routes.HomeRoute
|
|
22
23
|
import expo.modules.devlauncher.compose.routes.ProfileRoute
|
|
23
24
|
import expo.modules.devlauncher.compose.routes.Routes
|
|
@@ -56,10 +57,15 @@ object Main
|
|
|
56
57
|
fun DevLauncherBottomTabsNavigator() {
|
|
57
58
|
val mainNavController = rememberNavController()
|
|
58
59
|
val bottomTabsNavController = rememberNavController()
|
|
59
|
-
val
|
|
60
|
+
val profileBottomSheetState = rememberBottomSheetState()
|
|
61
|
+
val developmentServersBottomSheetState = rememberBottomSheetState()
|
|
60
62
|
|
|
61
63
|
val navigateToProfile = remember {
|
|
62
|
-
{
|
|
64
|
+
{ profileBottomSheetState.targetDetent = Full }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
val openDevelopmentServers = remember {
|
|
68
|
+
{ developmentServersBottomSheetState.targetDetent = Full }
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
NavHost(
|
|
@@ -94,7 +100,11 @@ fun DevLauncherBottomTabsNavigator() {
|
|
|
94
100
|
}
|
|
95
101
|
) {
|
|
96
102
|
composable<Routes.Home> {
|
|
97
|
-
HomeRoute(
|
|
103
|
+
HomeRoute(
|
|
104
|
+
navController = mainNavController,
|
|
105
|
+
onProfileClick = navigateToProfile,
|
|
106
|
+
onDevServersClick = openDevelopmentServers
|
|
107
|
+
)
|
|
98
108
|
}
|
|
99
109
|
composable<Routes.Updates> {
|
|
100
110
|
UpdatesRoute(onProfileClick = navigateToProfile)
|
|
@@ -124,5 +134,7 @@ fun DevLauncherBottomTabsNavigator() {
|
|
|
124
134
|
}
|
|
125
135
|
}
|
|
126
136
|
|
|
127
|
-
ProfileRoute(
|
|
137
|
+
ProfileRoute(profileBottomSheetState)
|
|
138
|
+
|
|
139
|
+
DevelopmentServersRoute(developmentServersBottomSheetState)
|
|
128
140
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
package expo.modules.devlauncher.compose.primitives
|
|
2
2
|
|
|
3
3
|
import androidx.compose.animation.AnimatedVisibility
|
|
4
|
-
import androidx.compose.animation.core.animateFloatAsState
|
|
5
4
|
import androidx.compose.animation.core.tween
|
|
6
5
|
import androidx.compose.animation.expandVertically
|
|
7
6
|
import androidx.compose.animation.shrinkVertically
|
|
@@ -10,6 +9,8 @@ import androidx.compose.foundation.layout.Arrangement
|
|
|
10
9
|
import androidx.compose.foundation.layout.Box
|
|
11
10
|
import androidx.compose.foundation.layout.Column
|
|
12
11
|
import androidx.compose.foundation.layout.Row
|
|
12
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
13
|
+
import androidx.compose.foundation.layout.padding
|
|
13
14
|
import androidx.compose.foundation.layout.size
|
|
14
15
|
import androidx.compose.runtime.Composable
|
|
15
16
|
import androidx.compose.runtime.getValue
|
|
@@ -18,7 +19,6 @@ import androidx.compose.runtime.remember
|
|
|
18
19
|
import androidx.compose.runtime.setValue
|
|
19
20
|
import androidx.compose.ui.Alignment
|
|
20
21
|
import androidx.compose.ui.Modifier
|
|
21
|
-
import androidx.compose.ui.draw.rotate
|
|
22
22
|
import androidx.compose.ui.res.painterResource
|
|
23
23
|
import androidx.compose.ui.tooling.preview.Preview
|
|
24
24
|
import androidx.compose.ui.unit.dp
|
|
@@ -26,6 +26,8 @@ import com.composeunstyled.Icon
|
|
|
26
26
|
import expo.modules.devlauncher.R
|
|
27
27
|
import expo.modules.devmenu.compose.newtheme.NewAppTheme
|
|
28
28
|
import expo.modules.devmenu.compose.primitives.NewText
|
|
29
|
+
import expo.modules.devmenu.compose.primitives.RoundedSurface
|
|
30
|
+
import expo.modules.devmenu.compose.primitives.Spacer
|
|
29
31
|
import expo.modules.devmenu.compose.primitives.Text
|
|
30
32
|
|
|
31
33
|
@Composable
|
|
@@ -36,56 +38,61 @@ fun Accordion(
|
|
|
36
38
|
accordionContent: @Composable () -> Unit = {}
|
|
37
39
|
) {
|
|
38
40
|
var expanded by remember { mutableStateOf(initialState) }
|
|
39
|
-
val arrowRotation by animateFloatAsState(
|
|
40
|
-
targetValue = if (expanded) 90f else 0f,
|
|
41
|
-
label = "accordion-arrow"
|
|
42
|
-
)
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
RoundedSurface(
|
|
43
|
+
color = NewAppTheme.colors.background.subtle,
|
|
44
|
+
borderRadius = NewAppTheme.borderRadius.xl
|
|
45
|
+
) {
|
|
46
|
+
Column(
|
|
46
47
|
modifier = Modifier
|
|
48
|
+
.fillMaxWidth()
|
|
47
49
|
.clickable { expanded = !expanded }
|
|
50
|
+
.padding(NewAppTheme.spacing.`3`)
|
|
48
51
|
) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
Box {
|
|
53
|
+
Row(
|
|
54
|
+
horizontalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`),
|
|
55
|
+
verticalAlignment = Alignment.CenterVertically,
|
|
56
|
+
modifier = modifier
|
|
57
|
+
) {
|
|
58
|
+
Icon(
|
|
59
|
+
painter = painterResource(R.drawable.plus),
|
|
60
|
+
contentDescription = "Accordion Arrow",
|
|
61
|
+
tint = NewAppTheme.colors.text.link,
|
|
62
|
+
modifier = Modifier
|
|
63
|
+
.size(16.dp)
|
|
64
|
+
)
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
NewText(
|
|
67
|
+
text = text,
|
|
68
|
+
style = NewAppTheme.font.sm,
|
|
69
|
+
color = NewAppTheme.colors.text.link
|
|
70
|
+
)
|
|
71
|
+
}
|
|
68
72
|
}
|
|
69
|
-
}
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
AnimatedVisibility(
|
|
75
|
+
visible = expanded,
|
|
76
|
+
enter = expandVertically(
|
|
77
|
+
expandFrom = Alignment.Top,
|
|
78
|
+
animationSpec = tween()
|
|
79
|
+
),
|
|
80
|
+
exit = shrinkVertically(
|
|
81
|
+
shrinkTowards = Alignment.Top,
|
|
82
|
+
animationSpec = tween()
|
|
83
|
+
)
|
|
84
|
+
) {
|
|
85
|
+
Column {
|
|
86
|
+
Spacer(NewAppTheme.spacing.`3`)
|
|
87
|
+
accordionContent()
|
|
88
|
+
}
|
|
89
|
+
}
|
|
83
90
|
}
|
|
84
91
|
}
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
@Composable
|
|
88
|
-
@Preview(showBackground = true, heightDp = 200)
|
|
95
|
+
@Preview(showBackground = true, heightDp = 200, widthDp = 300)
|
|
89
96
|
fun AccordionVariantPreview() {
|
|
90
97
|
Accordion(text = "Enter URL manually") {
|
|
91
98
|
Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac nisl interdum, mattis purus a, consequat ipsum. Aliquam sem mauris, egestas a elit a, lacinia efficitur nisi. Maecenas scelerisque erat nisi, ac interdum mauris volutpat vel. Proin sed lectus at purus interdum porta. Ut mollis feugiat dignissim.")
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
package expo.modules.devlauncher.compose.routes
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.Column
|
|
4
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
5
|
+
import androidx.compose.foundation.layout.padding
|
|
6
|
+
import androidx.compose.runtime.Composable
|
|
7
|
+
import androidx.compose.ui.Modifier
|
|
8
|
+
import androidx.compose.ui.text.font.FontWeight
|
|
9
|
+
import androidx.compose.ui.text.style.TextAlign
|
|
10
|
+
import com.composables.core.ModalBottomSheetState
|
|
11
|
+
import com.composables.core.SheetDetent.Companion.Hidden
|
|
12
|
+
import expo.modules.devlauncher.compose.ui.ActionButton
|
|
13
|
+
import expo.modules.devlauncher.compose.ui.BottomSheet
|
|
14
|
+
import expo.modules.devlauncher.compose.ui.DevelopmentSessionHelp
|
|
15
|
+
import expo.modules.devmenu.compose.newtheme.NewAppTheme
|
|
16
|
+
import expo.modules.devmenu.compose.primitives.NewText
|
|
17
|
+
import expo.modules.devmenu.compose.primitives.Spacer
|
|
18
|
+
|
|
19
|
+
@Composable
|
|
20
|
+
fun DevelopmentServersRoute(
|
|
21
|
+
bottomSheetState: ModalBottomSheetState
|
|
22
|
+
) {
|
|
23
|
+
BottomSheet(bottomSheetState) {
|
|
24
|
+
Column {
|
|
25
|
+
NewText(
|
|
26
|
+
"Development Servers",
|
|
27
|
+
style = NewAppTheme.font.xxl.merge(
|
|
28
|
+
fontWeight = FontWeight.SemiBold,
|
|
29
|
+
textAlign = TextAlign.Center
|
|
30
|
+
),
|
|
31
|
+
modifier = Modifier.padding(vertical = NewAppTheme.spacing.`4`).fillMaxWidth()
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
Spacer(NewAppTheme.spacing.`3`)
|
|
35
|
+
|
|
36
|
+
DevelopmentSessionHelp()
|
|
37
|
+
|
|
38
|
+
Spacer(NewAppTheme.spacing.`5`)
|
|
39
|
+
|
|
40
|
+
ActionButton(
|
|
41
|
+
text = "Dismiss",
|
|
42
|
+
foreground = NewAppTheme.colors.text.secondary,
|
|
43
|
+
background = NewAppTheme.colors.background.element,
|
|
44
|
+
modifier = Modifier.padding(NewAppTheme.spacing.`3`),
|
|
45
|
+
onClick = {
|
|
46
|
+
bottomSheetState.targetDetent = Hidden
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -13,7 +13,8 @@ import expo.modules.devlauncher.compose.screens.HomeScreen
|
|
|
13
13
|
@Composable
|
|
14
14
|
fun HomeRoute(
|
|
15
15
|
navController: NavController,
|
|
16
|
-
onProfileClick: () -> Unit
|
|
16
|
+
onProfileClick: () -> Unit,
|
|
17
|
+
onDevServersClick: () -> Unit
|
|
17
18
|
) {
|
|
18
19
|
DefaultScreenContainer {
|
|
19
20
|
val viewModel = viewModel<HomeViewModel>()
|
|
@@ -42,7 +43,8 @@ fun HomeRoute(
|
|
|
42
43
|
else -> viewModel.onAction(action)
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
|
-
onProfileClick = onProfileClick
|
|
46
|
+
onProfileClick = onProfileClick,
|
|
47
|
+
onDevServersClick = onDevServersClick
|
|
46
48
|
)
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -99,14 +99,14 @@ fun ProfileRoute(
|
|
|
99
99
|
)
|
|
100
100
|
)
|
|
101
101
|
.background(
|
|
102
|
-
|
|
102
|
+
Color.White,
|
|
103
103
|
shape = RoundedCornerShape(NewAppTheme.borderRadius.md)
|
|
104
104
|
)
|
|
105
105
|
) {
|
|
106
106
|
Icon(
|
|
107
107
|
painter = painterResource(R.drawable.expo_logo),
|
|
108
108
|
contentDescription = "Expo logo",
|
|
109
|
-
tint =
|
|
109
|
+
tint = Color.Black,
|
|
110
110
|
modifier = Modifier
|
|
111
111
|
.size(24.dp)
|
|
112
112
|
.align(Alignment.Center)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package expo.modules.devlauncher.compose.screens
|
|
2
2
|
|
|
3
3
|
import androidx.compose.foundation.background
|
|
4
|
+
import androidx.compose.foundation.clickable
|
|
4
5
|
import androidx.compose.foundation.layout.Arrangement
|
|
5
6
|
import androidx.compose.foundation.layout.Box
|
|
6
7
|
import androidx.compose.foundation.layout.Column
|
|
@@ -10,7 +11,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
10
11
|
import androidx.compose.foundation.layout.padding
|
|
11
12
|
import androidx.compose.foundation.layout.size
|
|
12
13
|
import androidx.compose.foundation.lazy.LazyColumn
|
|
13
|
-
import androidx.compose.foundation.lazy.
|
|
14
|
+
import androidx.compose.foundation.lazy.items
|
|
14
15
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
|
15
16
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
16
17
|
import androidx.compose.runtime.Composable
|
|
@@ -29,7 +30,6 @@ import androidx.compose.ui.text.style.TextOverflow
|
|
|
29
30
|
import androidx.compose.ui.tooling.preview.Preview
|
|
30
31
|
import androidx.compose.ui.unit.dp
|
|
31
32
|
import androidx.compose.ui.unit.sp
|
|
32
|
-
import com.composeunstyled.Button
|
|
33
33
|
import com.composeunstyled.Icon
|
|
34
34
|
import expo.modules.devlauncher.R
|
|
35
35
|
import expo.modules.devlauncher.compose.Branch
|
|
@@ -41,7 +41,6 @@ import expo.modules.devlauncher.compose.ui.ActionButton
|
|
|
41
41
|
import expo.modules.devlauncher.compose.ui.AppHeader
|
|
42
42
|
import expo.modules.devlauncher.compose.utils.DateFormat
|
|
43
43
|
import expo.modules.devmenu.compose.newtheme.NewAppTheme
|
|
44
|
-
import expo.modules.devmenu.compose.primitives.Divider
|
|
45
44
|
import expo.modules.devmenu.compose.primitives.NewText
|
|
46
45
|
import expo.modules.devmenu.compose.primitives.RoundedSurface
|
|
47
46
|
import expo.modules.devmenu.compose.primitives.Spacer
|
|
@@ -59,20 +58,23 @@ fun BranchBadge(
|
|
|
59
58
|
verticalAlignment = Alignment.CenterVertically,
|
|
60
59
|
horizontalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`),
|
|
61
60
|
modifier = Modifier
|
|
62
|
-
.clip(RoundedCornerShape(
|
|
61
|
+
.clip(RoundedCornerShape(NewAppTheme.borderRadius.md))
|
|
63
62
|
.background(backgroundColor)
|
|
64
|
-
.padding(
|
|
63
|
+
.padding(NewAppTheme.spacing.`2`)
|
|
65
64
|
) {
|
|
66
65
|
Icon(
|
|
67
66
|
painter = painterResource(R.drawable.branch_icon),
|
|
68
67
|
contentDescription = "Branch Icon",
|
|
69
68
|
tint = textColor,
|
|
70
|
-
modifier = Modifier.size(
|
|
69
|
+
modifier = Modifier.size(16.dp)
|
|
71
70
|
)
|
|
72
71
|
|
|
73
72
|
NewText(
|
|
74
73
|
"Branch: $name",
|
|
75
|
-
style = NewAppTheme.font.sm
|
|
74
|
+
style = NewAppTheme.font.sm.merge(
|
|
75
|
+
fontFamily = NewAppTheme.font.mono,
|
|
76
|
+
fontSize = 13.sp
|
|
77
|
+
),
|
|
76
78
|
color = textColor
|
|
77
79
|
)
|
|
78
80
|
}
|
|
@@ -177,144 +179,135 @@ fun BranchesScreen(
|
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
LazyColumn(
|
|
183
|
+
state = lazyListState,
|
|
184
|
+
verticalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`)
|
|
182
185
|
) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
shape = RoundedCornerShape(NewAppTheme.borderRadius.xl)
|
|
193
|
-
),
|
|
194
|
-
onClick = {
|
|
186
|
+
items(items = branches) { branch ->
|
|
187
|
+
RoundedSurface(
|
|
188
|
+
color = NewAppTheme.colors.background.subtle,
|
|
189
|
+
borderRadius = NewAppTheme.borderRadius.xl
|
|
190
|
+
) {
|
|
191
|
+
Column(
|
|
192
|
+
verticalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`),
|
|
193
|
+
modifier = Modifier
|
|
194
|
+
.clickable {
|
|
195
195
|
onAction(BranchesAction.OpenBranch(branch.name))
|
|
196
196
|
}
|
|
197
|
+
.padding(NewAppTheme.spacing.`3`)
|
|
198
|
+
) {
|
|
199
|
+
Row(
|
|
200
|
+
verticalAlignment = Alignment.CenterVertically,
|
|
201
|
+
horizontalArrangement = Arrangement.SpaceBetween,
|
|
202
|
+
modifier = Modifier
|
|
203
|
+
.fillMaxWidth()
|
|
197
204
|
) {
|
|
198
|
-
|
|
199
|
-
verticalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`),
|
|
200
|
-
modifier = Modifier.padding(NewAppTheme.spacing.`3`)
|
|
201
|
-
) {
|
|
202
|
-
Row(
|
|
203
|
-
verticalAlignment = Alignment.CenterVertically,
|
|
204
|
-
horizontalArrangement = Arrangement.SpaceBetween,
|
|
205
|
-
modifier = Modifier
|
|
206
|
-
.fillMaxWidth()
|
|
207
|
-
) {
|
|
208
|
-
BranchBadge(branch.name)
|
|
205
|
+
BranchBadge(branch.name)
|
|
209
206
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
207
|
+
Icon(
|
|
208
|
+
painter = painterResource(R.drawable.chevron_right),
|
|
209
|
+
contentDescription = "Chevron Icon",
|
|
210
|
+
tint = NewAppTheme.colors.icon.quaternary,
|
|
211
|
+
modifier = Modifier.size(20.dp)
|
|
212
|
+
)
|
|
213
|
+
}
|
|
217
214
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
215
|
+
val update = branch.compatibleUpdate
|
|
216
|
+
if (update == null) {
|
|
217
|
+
Row(
|
|
218
|
+
horizontalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`),
|
|
219
|
+
verticalAlignment = Alignment.CenterVertically,
|
|
220
|
+
modifier = Modifier
|
|
221
|
+
.fillMaxWidth()
|
|
222
|
+
.clip(RoundedCornerShape(NewAppTheme.borderRadius.md))
|
|
223
|
+
.background(NewAppTheme.colors.background.warning)
|
|
224
|
+
.padding(NewAppTheme.spacing.`2`)
|
|
225
|
+
) {
|
|
226
|
+
Icon(
|
|
227
|
+
painter = painterResource(expo.modules.devmenu.R.drawable.alert),
|
|
228
|
+
contentDescription = "Warning Icon",
|
|
229
|
+
tint = NewAppTheme.colors.icon.warning,
|
|
230
|
+
modifier = Modifier.size(20.dp)
|
|
231
|
+
)
|
|
230
232
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
233
|
+
NewText(
|
|
234
|
+
"No compatible update found for this branch.",
|
|
235
|
+
color = NewAppTheme.colors.text.warning,
|
|
236
|
+
style = NewAppTheme.font.sm.merge(
|
|
237
|
+
fontWeight = FontWeight.Medium
|
|
238
|
+
)
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
} else {
|
|
242
|
+
val formatedTime = DateFormat.formatUpdateDate(update.createdAt)
|
|
241
243
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
244
|
+
Row(
|
|
245
|
+
verticalAlignment = Alignment.CenterVertically,
|
|
246
|
+
horizontalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`)
|
|
247
|
+
) {
|
|
248
|
+
Icon(
|
|
249
|
+
painter = painterResource(R.drawable.update_icon),
|
|
250
|
+
contentDescription = "Update Icon",
|
|
251
|
+
tint = NewAppTheme.colors.icon.quaternary,
|
|
252
|
+
modifier = Modifier.size(20.dp)
|
|
253
|
+
)
|
|
252
254
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
255
|
+
Column(
|
|
256
|
+
verticalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`1`),
|
|
257
|
+
modifier = Modifier.padding(end = 20.dp)
|
|
258
|
+
) {
|
|
259
|
+
NewText(
|
|
260
|
+
"Update: \"${update.name}\"",
|
|
261
|
+
style = NewAppTheme.font.md.merge(
|
|
262
|
+
fontWeight = FontWeight.Medium
|
|
263
|
+
),
|
|
264
|
+
maxLines = 1,
|
|
265
|
+
overflow = TextOverflow.Ellipsis
|
|
266
|
+
)
|
|
265
267
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
}
|
|
268
|
+
NewText(
|
|
269
|
+
"Published: $formatedTime",
|
|
270
|
+
style = NewAppTheme.font.sm,
|
|
271
|
+
color = NewAppTheme.colors.text.secondary
|
|
272
|
+
)
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
if (index < branches.size - 1) {
|
|
278
|
-
Divider(
|
|
279
|
-
thickness = 0.5.dp,
|
|
280
|
-
color = NewAppTheme.colors.border.default
|
|
281
|
-
)
|
|
282
|
-
}
|
|
283
276
|
}
|
|
284
277
|
}
|
|
278
|
+
}
|
|
285
279
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
280
|
+
if (isLoading) {
|
|
281
|
+
item {
|
|
282
|
+
Row(
|
|
283
|
+
modifier = Modifier
|
|
284
|
+
.fillMaxWidth()
|
|
285
|
+
.padding(vertical = NewAppTheme.spacing.`2`),
|
|
286
|
+
horizontalArrangement = Arrangement.Center,
|
|
287
|
+
verticalAlignment = Alignment.CenterVertically
|
|
288
|
+
) {
|
|
289
|
+
CircularProgressBar(
|
|
290
|
+
size = Theme.sizing.icon.large
|
|
291
|
+
)
|
|
299
292
|
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
293
|
+
}
|
|
294
|
+
} else if (branches.isEmpty()) {
|
|
295
|
+
item {
|
|
296
|
+
Row(
|
|
297
|
+
modifier = Modifier
|
|
298
|
+
.fillMaxWidth()
|
|
299
|
+
.padding(NewAppTheme.spacing.`3`),
|
|
300
|
+
horizontalArrangement = Arrangement.Center,
|
|
301
|
+
verticalAlignment = Alignment.CenterVertically
|
|
302
|
+
) {
|
|
303
|
+
NewText(
|
|
304
|
+
"No branches available.",
|
|
305
|
+
style = NewAppTheme.font.lg.merge(
|
|
306
|
+
textAlign = TextAlign.Center,
|
|
307
|
+
fontWeight = FontWeight.Medium
|
|
308
|
+
),
|
|
309
|
+
color = NewAppTheme.colors.text.secondary
|
|
310
|
+
)
|
|
318
311
|
}
|
|
319
312
|
}
|
|
320
313
|
}
|