Обновлен блок Add Members и Encryption Key на экране группы
This commit is contained in:
@@ -44,6 +44,9 @@ import androidx.compose.foundation.lazy.itemsIndexed
|
|||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
|
import compose.icons.TablerIcons
|
||||||
|
import compose.icons.tablericons.Code
|
||||||
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
import androidx.compose.material.icons.filled.ArrowBack
|
||||||
@@ -1158,75 +1161,81 @@ fun GroupInfoScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
Surface(
|
Surface(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = 16.dp),
|
||||||
color = sectionColor,
|
color = sectionColor,
|
||||||
shape = RoundedCornerShape(0.dp)
|
shape = RoundedCornerShape(12.dp)
|
||||||
) {
|
) {
|
||||||
Row(
|
Column {
|
||||||
modifier = Modifier
|
// Add Members
|
||||||
.fillMaxWidth()
|
Row(
|
||||||
.clickable { openInviteSharePicker() }
|
modifier = Modifier
|
||||||
.padding(horizontal = 16.dp, vertical = 12.dp),
|
.fillMaxWidth()
|
||||||
verticalAlignment = Alignment.CenterVertically
|
.clickable { openInviteSharePicker() }
|
||||||
) {
|
.padding(horizontal = 16.dp, vertical = 13.dp),
|
||||||
Icon(
|
verticalAlignment = Alignment.CenterVertically
|
||||||
imageVector = Icons.Default.PersonAdd,
|
) {
|
||||||
contentDescription = null,
|
Text(
|
||||||
tint = accentColor
|
text = "Add Members",
|
||||||
)
|
color = primaryText,
|
||||||
Spacer(modifier = Modifier.size(12.dp))
|
fontSize = 16.sp,
|
||||||
Text(
|
modifier = Modifier.weight(1f)
|
||||||
text = "Add Members",
|
)
|
||||||
color = accentColor,
|
|
||||||
fontSize = 17.sp,
|
|
||||||
fontWeight = FontWeight.Medium
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Surface(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
color = sectionColor,
|
|
||||||
shape = RoundedCornerShape(0.dp)
|
|
||||||
) {
|
|
||||||
Column(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.clickable { openEncryptionKey() }
|
|
||||||
.padding(horizontal = 16.dp, vertical = 11.dp)
|
|
||||||
) {
|
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Lock,
|
imageVector = Icons.Default.PersonAdd,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = accentColor,
|
tint = accentColor,
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(22.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
}
|
||||||
|
|
||||||
|
Divider(
|
||||||
|
color = borderColor,
|
||||||
|
thickness = 0.5.dp,
|
||||||
|
modifier = Modifier.padding(start = 16.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Encryption Key
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickable { openEncryptionKey() }
|
||||||
|
.padding(horizontal = 16.dp, vertical = 13.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Encryption Key",
|
text = "Encryption Key",
|
||||||
color = primaryText,
|
color = primaryText,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
if (encryptionKeyLoading) {
|
if (encryptionKeyLoading) {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
modifier = Modifier.size(16.dp),
|
modifier = Modifier.size(20.dp),
|
||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
color = accentColor
|
color = accentColor
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
val identiconKey = encryptionKey.ifBlank { dialogPublicKey }
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.size(34.dp)
|
||||||
|
.clip(RoundedCornerShape(6.dp))
|
||||||
|
) {
|
||||||
|
TelegramStyleIdenticon(
|
||||||
|
keyRender = identiconKey,
|
||||||
|
size = 34.dp,
|
||||||
|
isDarkTheme = isDarkTheme
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.height(3.dp))
|
|
||||||
Text(
|
|
||||||
text = "Tap to view key used for secure group communication",
|
|
||||||
color = secondaryText,
|
|
||||||
fontSize = 12.sp
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
TabRow(
|
TabRow(
|
||||||
selectedTabIndex = GroupInfoTab.entries.indexOf(selectedTab),
|
selectedTabIndex = GroupInfoTab.entries.indexOf(selectedTab),
|
||||||
|
|||||||
Reference in New Issue
Block a user