Browse Source

Add buttons to create and invite

misc/jme/add-logging-to-state-machine
Maxime NATUREL 2 years ago committed by Florian Renaud
parent
commit
e6c7afd614
  1. 27
      features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt
  2. 26
      libraries/designsystem/src/main/res/drawable/ic_group.xml
  3. 26
      libraries/designsystem/src/main/res/drawable/ic_share.xml
  4. 1
      libraries/ui-strings/src/main/res/values/strings_eax.xml

27
features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt

@ -19,8 +19,10 @@ package io.element.android.features.createroom.root @@ -19,8 +19,10 @@ package io.element.android.features.createroom.root
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.SearchBarDefaults
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
@ -73,6 +75,31 @@ fun CreateRoomRootScreen( @@ -73,6 +75,31 @@ fun CreateRoomRootScreen(
placeHolderTitle = stringResource(StringR.string.search_for_someone),
active = isSearchActive,
)
TextButton(
modifier = Modifier.padding(start = 8.dp, top = 16.dp, end = 8.dp),
onClick = { }) {
Icon(
modifier = Modifier
.padding(end = 16.dp),
resourceId = DrawableR.drawable.ic_group, // TODO ask design for squared icon
contentDescription = ""
)
Text(text = stringResource(id = StringR.string.new_room))
}
TextButton(
modifier = Modifier.padding(horizontal = 8.dp),
onClick = { }
) {
Icon(
modifier = Modifier
.padding(end = 16.dp),
resourceId = DrawableR.drawable.ic_share,
contentDescription = ""
)
Text(text = stringResource(id = StringR.string.invite_people_menu))
}
}
}
}

26
libraries/designsystem/src/main/res/drawable/ic_group.xml

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="11dp"
android:tint="#000000"
android:viewportWidth="24"
android:viewportHeight="11">
<path
android:fillColor="#ffffff"
android:pathData="M1.365,10.788C1.12,10.788 0.915,10.706 0.749,10.54C0.583,10.374 0.5,10.168 0.5,9.923V9.569C0.5,8.894 0.844,8.346 1.531,7.927C2.219,7.508 3.126,7.298 4.251,7.298C4.454,7.298 4.647,7.305 4.829,7.318C5.011,7.332 5.187,7.355 5.358,7.389C5.168,7.681 5.028,7.996 4.94,8.332C4.852,8.668 4.808,9.025 4.808,9.4V10.788H1.365ZM7.408,10.788C7.147,10.788 6.931,10.702 6.759,10.529C6.586,10.355 6.5,10.141 6.5,9.885V9.439C6.5,8.483 7.006,7.713 8.018,7.128C9.03,6.543 10.356,6.25 11.996,6.25C13.651,6.25 14.982,6.543 15.989,7.128C16.996,7.713 17.5,8.483 17.5,9.439V9.885C17.5,10.141 17.413,10.355 17.24,10.529C17.067,10.702 16.852,10.788 16.596,10.788H7.408ZM19.192,10.788V9.4C19.192,9.025 19.145,8.668 19.05,8.332C18.955,7.996 18.819,7.681 18.642,7.389C18.813,7.355 18.989,7.332 19.17,7.318C19.352,7.305 19.545,7.298 19.75,7.298C20.875,7.298 21.781,7.508 22.469,7.927C23.156,8.346 23.5,8.894 23.5,9.569V9.923C23.5,10.168 23.417,10.374 23.251,10.54C23.085,10.706 22.88,10.788 22.635,10.788H19.192ZM12,7.75C10.954,7.75 10.059,7.892 9.315,8.176C8.572,8.46 8.159,8.799 8.077,9.192V9.289H15.923V9.192C15.831,8.789 15.415,8.447 14.677,8.168C13.938,7.889 13.046,7.75 12,7.75ZM4.25,6.327C3.777,6.327 3.375,6.159 3.044,5.824C2.713,5.489 2.548,5.086 2.548,4.615C2.548,4.145 2.713,3.742 3.044,3.407C3.375,3.072 3.777,2.904 4.25,2.904C4.723,2.904 5.127,3.072 5.461,3.407C5.794,3.742 5.961,4.145 5.961,4.615C5.961,5.086 5.794,5.489 5.459,5.824C5.124,6.159 4.721,6.327 4.25,6.327ZM19.75,6.327C19.277,6.327 18.873,6.159 18.539,5.824C18.205,5.489 18.038,5.086 18.038,4.615C18.038,4.145 18.206,3.742 18.541,3.407C18.876,3.072 19.279,2.904 19.75,2.904C20.223,2.904 20.625,3.072 20.956,3.407C21.286,3.742 21.452,4.145 21.452,4.615C21.452,5.086 21.286,5.489 20.956,5.824C20.625,6.159 20.223,6.327 19.75,6.327ZM12,5.5C11.279,5.5 10.666,5.248 10.161,4.743C9.656,4.238 9.404,3.625 9.404,2.904C9.404,2.183 9.656,1.57 10.161,1.065C10.666,0.56 11.279,0.308 12,0.308C12.721,0.308 13.334,0.56 13.839,1.065C14.344,1.57 14.596,2.183 14.596,2.904C14.596,3.625 14.344,4.238 13.839,4.743C13.334,5.248 12.721,5.5 12,5.5ZM12.002,1.808C11.691,1.808 11.431,1.913 11.22,2.122C11.009,2.332 10.904,2.592 10.904,2.902C10.904,3.212 11.009,3.473 11.218,3.684C11.428,3.895 11.688,4 11.998,4C12.308,4 12.569,3.895 12.78,3.685C12.991,3.476 13.096,3.216 13.096,2.906C13.096,2.596 12.991,2.335 12.781,2.124C12.572,1.913 12.312,1.808 12.002,1.808Z" />
</vector>

26
libraries/designsystem/src/main/res/drawable/ic_share.xml

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="20dp"
android:tint="#000000"
android:viewportWidth="18"
android:viewportHeight="20">
<path
android:fillColor="#ffffff"
android:pathData="M15.001,19.75C14.238,19.75 13.588,19.483 13.053,18.948C12.518,18.413 12.25,17.764 12.25,17C12.25,16.875 12.26,16.746 12.28,16.612C12.3,16.478 12.33,16.355 12.369,16.242L4.973,11.911C4.709,12.174 4.408,12.38 4.071,12.528C3.734,12.676 3.377,12.75 3,12.75C2.236,12.75 1.587,12.483 1.052,11.948C0.517,11.414 0.25,10.765 0.25,10.001C0.25,9.238 0.517,8.588 1.052,8.053C1.587,7.518 2.236,7.25 3,7.25C3.377,7.25 3.734,7.324 4.071,7.472C4.408,7.62 4.709,7.826 4.973,8.088L12.369,3.758C12.33,3.645 12.3,3.522 12.28,3.388C12.26,3.254 12.25,3.125 12.25,3C12.25,2.236 12.517,1.587 13.052,1.052C13.586,0.517 14.235,0.25 14.999,0.25C15.762,0.25 16.412,0.517 16.947,1.052C17.482,1.586 17.75,2.235 17.75,2.999C17.75,3.762 17.483,4.412 16.948,4.947C16.413,5.482 15.764,5.75 15,5.75C14.623,5.75 14.266,5.676 13.929,5.528C13.592,5.38 13.291,5.174 13.027,4.911L5.631,9.242C5.67,9.355 5.7,9.478 5.72,9.611C5.74,9.745 5.75,9.874 5.75,9.998C5.75,10.122 5.74,10.252 5.72,10.387C5.7,10.521 5.67,10.645 5.631,10.758L13.027,15.089C13.291,14.826 13.592,14.62 13.929,14.472C14.266,14.324 14.623,14.25 15,14.25C15.764,14.25 16.413,14.517 16.948,15.052C17.483,15.586 17.75,16.235 17.75,16.999C17.75,17.762 17.483,18.412 16.948,18.947C16.414,19.482 15.765,19.75 15.001,19.75ZM15,4.25C15.347,4.25 15.643,4.129 15.886,3.886C16.128,3.643 16.25,3.347 16.25,3C16.25,2.653 16.128,2.357 15.886,2.114C15.643,1.871 15.347,1.75 15,1.75C14.653,1.75 14.357,1.871 14.114,2.114C13.871,2.357 13.75,2.653 13.75,3C13.75,3.347 13.871,3.643 14.114,3.886C14.357,4.129 14.653,4.25 15,4.25ZM3,11.25C3.347,11.25 3.643,11.128 3.886,10.886C4.129,10.643 4.25,10.347 4.25,10C4.25,9.653 4.129,9.357 3.886,9.114C3.643,8.871 3.347,8.75 3,8.75C2.653,8.75 2.357,8.871 2.114,9.114C1.871,9.357 1.75,9.653 1.75,10C1.75,10.347 1.871,10.643 2.114,10.886C2.357,11.128 2.653,11.25 3,11.25ZM15,18.25C15.347,18.25 15.643,18.128 15.886,17.886C16.128,17.643 16.25,17.347 16.25,17C16.25,16.653 16.128,16.357 15.886,16.114C15.643,15.871 15.347,15.75 15,15.75C14.653,15.75 14.357,15.871 14.114,16.114C13.871,16.357 13.75,16.653 13.75,17C13.75,17.347 13.871,17.643 14.114,17.886C14.357,18.128 14.653,18.25 15,18.25Z" />
</vector>

1
libraries/ui-strings/src/main/res/values/strings_eax.xml

@ -16,5 +16,6 @@ @@ -16,5 +16,6 @@
<string name="server_selection_sliding_sync_alert_message">This server currently doesn\'t support sliding sync.</string>
<!-- Create room -->
<string name="search_for_someone">Search for someone</string>
<string name="new_room">New room</string>
</resources>

Loading…
Cancel
Save