Skip to content

Commit

Permalink
remove card content for now
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Feb 7, 2024
1 parent c78c04a commit e156642
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import cafe.adriel.voyager.core.model.screenModelScope
import com.aliucord.manager.BuildConfig
import com.aliucord.manager.R
import com.aliucord.manager.domain.repository.GithubRepository
import com.aliucord.manager.installer.util.uninstallApk
import com.aliucord.manager.manager.PreferencesManager
import com.aliucord.manager.network.utils.fold
import com.aliucord.manager.ui.util.DiscordVersion
import com.aliucord.manager.util.launchBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.*
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.aliucord.manager.R
import com.aliucord.manager.ui.components.SegmentedButton
import com.aliucord.manager.ui.screens.home.InstallData
Expand Down Expand Up @@ -43,7 +42,7 @@ fun InstalledItemCard(
)
) {
Column(
verticalArrangement = Arrangement.spacedBy(14.dp),
verticalArrangement = Arrangement.spacedBy(24.dp),
modifier = Modifier.padding(20.dp),
) {
Row(
Expand All @@ -59,12 +58,24 @@ fun InstalledItemCard(
.clip(CircleShape),
)

Text(
text = "\"${data.name}\"",
fontWeight = FontWeight.SemiBold,
style = LocalTextStyle.current.copy(fontSize = 18.sp),
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = .94f),
)
Column {
Text(
text = "\"${data.name}\"",
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = .94f),
)

Text(
text = data.packageName,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier
.padding(start = 1.dp)
.offset(y = (-2).dp)
.alpha(.7f)
.basicMarquee(),
)
}

Spacer(Modifier.weight(1f, fill = true))

Expand All @@ -88,77 +99,6 @@ fun InstalledItemCard(
}
}

FlowRow(
maxItemsInEachRow = 2,
// horizontalArrangement = Arrangement.spacedBy(10.dp),
horizontalArrangement = Arrangement.SpaceAround,
verticalArrangement = Arrangement.spacedBy(4.dp),
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 4.dp),
) {
Column(
verticalArrangement = Arrangement.spacedBy(2.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "Account:",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
)
Text(
text = "rushii",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.basicMarquee(),
)
}

Column(
verticalArrangement = Arrangement.spacedBy(2.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "Plugins:",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
)
Text(
text = "129",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.basicMarquee(),
)
}

Column(
verticalArrangement = Arrangement.spacedBy(2.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "Package name:",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface,
)
Text(
text = data.packageName,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.basicMarquee(),
)
}
// LabelTextItem(
// label = stringResource(R.string.label_pkg_name),
// value = data.packageName,
// modifier = Modifier.basicMarquee(),
// )
//
// LabelTextItem(
// label = "Plugins:",
// value = "Unknown",
// )
}

Row(
horizontalArrangement = Arrangement.spacedBy(2.dp),
modifier = Modifier.clip(MaterialTheme.shapes.large),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlin.coroutines.CoroutineContext
*/
inline fun CoroutineScope.launchBlock(
context: CoroutineContext = Dispatchers.Main,
noinline block: suspend CoroutineScope.() -> Unit
noinline block: suspend CoroutineScope.() -> Unit,
) {
launch(context, block = block)
}
Expand Down

0 comments on commit e156642

Please sign in to comment.