mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-07-26 22:42:17 +00:00
Merge branch 'cmp-rewrite' of https://github.com/NuvioMedia/NuvioMobile into cmp-rewrite
This commit is contained in:
commit
02fd82c753
5 changed files with 34 additions and 22 deletions
|
|
@ -54,6 +54,7 @@ import com.nuvio.app.core.ui.NuvioScreen
|
|||
import com.nuvio.app.core.ui.NuvioScreenHeader
|
||||
import com.nuvio.app.core.ui.NuvioStatusModal
|
||||
import com.nuvio.app.core.ui.NuvioSurfaceCard
|
||||
import com.nuvio.app.features.home.components.CollectionCardRemoteImage
|
||||
import kotlinx.coroutines.launch
|
||||
import nuvio.composeapp.generated.resources.*
|
||||
import org.jetbrains.compose.resources.stringResource
|
||||
|
|
@ -408,11 +409,12 @@ private fun ProfileIdentityCard(
|
|||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
if (customAvatarUrl != null) {
|
||||
AsyncImage(
|
||||
model = customAvatarUrl,
|
||||
CollectionCardRemoteImage(
|
||||
imageUrl = customAvatarUrl,
|
||||
contentDescription = name,
|
||||
modifier = Modifier.size(88.dp).clip(CircleShape),
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentScale = ContentScale.Crop,
|
||||
animateIfPossible = true,
|
||||
)
|
||||
} else if (selectedAvatar != null) {
|
||||
AsyncImage(
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|||
import coil3.compose.AsyncImage
|
||||
import com.nuvio.app.core.auth.AuthRepository
|
||||
import com.nuvio.app.core.auth.AuthState
|
||||
import com.nuvio.app.features.home.components.CollectionCardRemoteImage
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import nuvio.composeapp.generated.resources.*
|
||||
|
|
@ -373,11 +374,12 @@ private fun ProfileAvatarCard(
|
|||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
if (avatarImageUrl != null) {
|
||||
AsyncImage(
|
||||
model = avatarImageUrl,
|
||||
CollectionCardRemoteImage(
|
||||
imageUrl = avatarImageUrl,
|
||||
contentDescription = avatarItem?.displayName ?: profile.name,
|
||||
modifier = Modifier.size(100.dp).clip(CircleShape),
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentScale = ContentScale.Crop,
|
||||
animateIfPossible = true,
|
||||
)
|
||||
} else if (profile.name.isNotBlank()) {
|
||||
Text(
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import androidx.compose.foundation.layout.Box
|
|||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
|
|
@ -69,6 +70,7 @@ import androidx.compose.ui.window.Popup
|
|||
import androidx.compose.ui.window.PopupProperties
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import coil3.compose.AsyncImage
|
||||
import com.nuvio.app.features.home.components.CollectionCardRemoteImage
|
||||
import com.nuvio.app.isIos
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -504,11 +506,12 @@ private fun PopupProfileBubble(
|
|||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
if (avatarImageUrl != null) {
|
||||
AsyncImage(
|
||||
model = avatarImageUrl,
|
||||
CollectionCardRemoteImage(
|
||||
imageUrl = avatarImageUrl,
|
||||
contentDescription = profile.name,
|
||||
modifier = Modifier.size(48.dp).clip(CircleShape),
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentScale = ContentScale.Crop,
|
||||
animateIfPossible = true,
|
||||
)
|
||||
} else if (profile.name.isNotBlank()) {
|
||||
Text(
|
||||
|
|
@ -818,11 +821,12 @@ fun ActiveProfileMiniAvatar(
|
|||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
if (avatarImageUrl != null) {
|
||||
AsyncImage(
|
||||
model = avatarImageUrl,
|
||||
CollectionCardRemoteImage(
|
||||
imageUrl = avatarImageUrl,
|
||||
contentDescription = profile.name,
|
||||
modifier = Modifier.size(size.dp).clip(CircleShape),
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentScale = ContentScale.Crop,
|
||||
animateIfPossible = true,
|
||||
)
|
||||
} else if (profile.name.isNotBlank()) {
|
||||
Text(
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.itemsIndexed
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
|
|
@ -213,21 +215,22 @@ private fun AppearanceLanguageBottomSheet(
|
|||
},
|
||||
sheetState = sheetState,
|
||||
) {
|
||||
Column(
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = 16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(0.dp),
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(Res.string.settings_appearance_app_language_sheet_title),
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp),
|
||||
)
|
||||
item {
|
||||
Text(
|
||||
text = stringResource(Res.string.settings_appearance_app_language_sheet_title),
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp),
|
||||
)
|
||||
}
|
||||
|
||||
options.forEachIndexed { index, option ->
|
||||
itemsIndexed(options) { index, option ->
|
||||
if (index > 0) {
|
||||
NuvioBottomSheetDivider()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ internal actual fun CollectionCardRemoteImage(
|
|||
|
||||
UIKitView(
|
||||
modifier = modifier,
|
||||
interactive = false,
|
||||
factory = {
|
||||
UIImageView().apply {
|
||||
contentMode = UIViewContentMode.UIViewContentModeScaleAspectFill
|
||||
|
|
|
|||
Loading…
Reference in a new issue