@@ -18,6 +18,7 @@ import androidx.compose.foundation.lazy.LazyRow
1818import androidx.compose.foundation.lazy.items
1919import androidx.compose.material.icons.Icons
2020import androidx.compose.material.icons.filled.Close
21+ import androidx.compose.material3.Button
2122import androidx.compose.material3.Icon
2223import androidx.compose.material3.IconButton
2324import androidx.compose.material3.Scaffold
@@ -34,15 +35,15 @@ import com.nextcloud.android.lib.resources.clientintegration.LayoutButton
3435import com.nextcloud.android.lib.resources.clientintegration.LayoutOrientation
3536import com.nextcloud.android.lib.resources.clientintegration.LayoutRow
3637import com.nextcloud.android.lib.resources.clientintegration.LayoutText
37- import com.nextcloud.android.lib.resources.clientintegration.URL
38+ import com.nextcloud.android.lib.resources.clientintegration.LayoutURL
3839import com.nextcloud.utils.extensions.getActivity
3940import com.owncloud.android.lib.resources.status.OCCapability
4041import com.owncloud.android.utils.DisplayUtils
4142
4243@Composable
4344fun ClientIntegrationScreen (clientIntegrationUI : ClientIntegrationUI , baseUrl : String ) {
4445 val activity = LocalContext .current.getActivity()
45- val layoutRows = clientIntegrationUI.root?.layoutRows ? : listOf ()
46+ val layoutRows = clientIntegrationUI.root?.rows ? : listOf ()
4647
4748 Scaffold (topBar = {
4849 Row (Modifier .fillMaxWidth(), horizontalArrangement = Arrangement .End ) {
@@ -84,11 +85,11 @@ fun ClientIntegrationScreen(clientIntegrationUI: ClientIntegrationUI, baseUrl: S
8485@Composable
8586private fun DisplayElement (element : Element , baseUrl : String , activity : Activity ? ) {
8687 when (element) {
87- is LayoutButton -> androidx.compose.material3. Button (onClick = { }) {
88+ is LayoutButton -> Button (onClick = { }) {
8889 Text (element.label)
8990 }
9091
91- is URL -> TextButton ({
92+ is LayoutURL -> TextButton ({
9293 openLink(activity, baseUrl, element.url)
9394 }) { Text (element.text) }
9495
@@ -117,7 +118,7 @@ private fun ClientIntegrationScreenPreviewVertical() {
117118 listOf (LayoutButton (" Click2" , " Primary" ))
118119 ),
119120 LayoutRow (
120- listOf (URL (" Analytics report created" , " https://nextcloud.com" ))
121+ listOf (LayoutURL (" Analytics report created" , " https://nextcloud.com" ))
121122 )
122123 )
123124 )
@@ -144,7 +145,7 @@ private fun ClientIntegrationScreenPreviewHorizontal() {
144145 listOf (LayoutButton (" Click2" , " Primary" ))
145146 ),
146147 LayoutRow (
147- listOf (URL (" Analytics report created" , " https://nextcloud.com" ))
148+ listOf (LayoutURL (" Analytics report created" , " https://nextcloud.com" ))
148149 )
149150 )
150151 )
0 commit comments