mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
use open lock icon for set password
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
c165e9fe0c
commit
8c967c4f56
3 changed files with 32 additions and 14 deletions
|
@ -61,7 +61,6 @@ import androidx.compose.runtime.DisposableEffect
|
|||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
|
@ -468,7 +467,7 @@ fun RoomCreationOptions(conversationCreationViewModel: ConversationCreationViewM
|
|||
|
||||
if (isGuestsAllowed && !isPasswordSet) {
|
||||
ConversationOptions(
|
||||
icon = R.drawable.ic_lock_grey600_24px,
|
||||
icon = R.drawable.baseline_lock_open_24,
|
||||
text = R.string.nc_set_password,
|
||||
conversationCreationViewModel = conversationCreationViewModel
|
||||
)
|
||||
|
@ -656,6 +655,16 @@ fun ShowPasswordDialog(onDismiss: () -> Unit, conversationCreationViewModel: Con
|
|||
AlertDialog(
|
||||
containerColor = colorResource(id = R.color.dialog_background),
|
||||
onDismissRequest = onDismiss,
|
||||
title = { Text(text = stringResource(id = R.string.nc_set_password)) },
|
||||
text = {
|
||||
TextField(
|
||||
value = password,
|
||||
onValueChange = {
|
||||
password = it
|
||||
},
|
||||
label = { Text(text = stringResource(id = R.string.nc_guest_access_password_dialog_hint)) }
|
||||
)
|
||||
},
|
||||
confirmButton = {
|
||||
Button(
|
||||
onClick = {
|
||||
|
@ -668,16 +677,6 @@ fun ShowPasswordDialog(onDismiss: () -> Unit, conversationCreationViewModel: Con
|
|||
Text(text = stringResource(id = R.string.save))
|
||||
}
|
||||
},
|
||||
title = { Text(text = stringResource(id = R.string.nc_set_password)) },
|
||||
text = {
|
||||
TextField(
|
||||
value = password,
|
||||
onValueChange = {
|
||||
password = it
|
||||
},
|
||||
label = { Text(text = stringResource(id = R.string.nc_guest_access_password_dialog_hint)) }
|
||||
)
|
||||
},
|
||||
dismissButton = {
|
||||
Button(onClick = { onDismiss() }) {
|
||||
Text(text = stringResource(id = R.string.nc_cancel))
|
||||
|
|
|
@ -46,7 +46,9 @@ class ConversationCreationViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
fun isPasswordEnabled(value: Boolean) {
|
||||
isPasswordEnabled.value = value
|
||||
_isPasswordEnabled.value = value
|
||||
}
|
||||
|
||||
fun updateSelectedImageUri(uri: Uri?) {
|
||||
_selectedImageUri.value = uri
|
||||
}
|
||||
|
@ -77,7 +79,6 @@ class ConversationCreationViewModel @Inject constructor(
|
|||
roomType: String,
|
||||
conversationName: String,
|
||||
participants: Set<AutocompleteUser>,
|
||||
selectedImageUri: Uri?,
|
||||
onRoomCreated: (String) -> Unit
|
||||
) {
|
||||
val scope = when {
|
||||
|
|
18
app/src/main/res/drawable/baseline_lock_open_24.xml
Normal file
18
app/src/main/res/drawable/baseline_lock_open_24.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!--
|
||||
~ Nextcloud Talk - Android Client
|
||||
~
|
||||
~ SPDX-FileCopyrightText: 2024 Google LLC
|
||||
~ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:tint="#000000"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h1.9c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z"/>
|
||||
|
||||
</vector>
|
Loading…
Reference in a new issue