From a0f0f012096caf160bd03296d418cfec248faedf Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Sat, 30 May 2026 15:27:38 -0700 Subject: [PATCH] chore: spotless --- .../commonMain/kotlin/com/derakkuma/App.kt | 18 ++--- .../com/derakkuma/atproto/AtProtoSettings.kt | 28 +++---- .../com/derakkuma/ui/OnboardingScreen.kt | 4 +- .../ui/components/ExpressiveControls.kt | 31 ++++---- .../ui/components/ExpressiveSurfaces.kt | 5 +- .../com/derakkuma/ui/components/SongRow.kt | 78 +++++++++---------- .../com/derakkuma/ui/tabs/AppIconTab.kt | 6 +- .../com/derakkuma/ui/tabs/AppSettingsTab.kt | 12 +-- .../kotlin/com/derakkuma/ui/tabs/BubbleTab.kt | 2 +- .../com/derakkuma/ui/tabs/CollectionTab.kt | 4 +- .../com/derakkuma/ui/tabs/FavoritesTab.kt | 8 +- .../com/derakkuma/ui/tabs/FriendsTab.kt | 8 +- .../kotlin/com/derakkuma/ui/tabs/HomeTab.kt | 2 +- .../ui/tabs/KamaitachiSettingsTab.kt | 6 +- .../kotlin/com/derakkuma/ui/tabs/MoreTab.kt | 5 +- .../com/derakkuma/ui/tabs/MusicDetailTab.kt | 4 +- .../com/derakkuma/ui/tabs/PlayDetailTab.kt | 2 +- .../com/derakkuma/ui/tabs/PlayerDataTab.kt | 4 +- .../com/derakkuma/ui/tabs/PlayerNameTab.kt | 8 +- .../com/derakkuma/ui/tabs/RankingTab.kt | 8 +- .../kotlin/com/derakkuma/ui/tabs/RatingTab.kt | 2 +- .../kotlin/com/derakkuma/ui/tabs/ScoresTab.kt | 4 +- .../com/derakkuma/ui/tabs/SettingsTab.kt | 24 +++--- 23 files changed, 135 insertions(+), 138 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/App.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/App.kt index c187d85..116dc84 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/App.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/App.kt @@ -1,14 +1,5 @@ package com.derakkuma -import com.derakkuma.ui.components.ExpressiveLoadingIndicator -import com.derakkuma.ui.components.ExpressiveBadgedBox -import com.derakkuma.ui.components.ExpressiveBadge -import com.derakkuma.ui.components.ExpressiveScaffold -import com.derakkuma.ui.components.expressiveNavigationBarItemColors -import com.derakkuma.ui.components.ExpressiveNavigationBarItem -import com.derakkuma.ui.components.ExpressiveNavigationBar -import com.derakkuma.ui.components.ExpressiveTopLoadingIndicator -import com.derakkuma.ui.components.expressiveScreenBackground import androidx.compose.animation.core.LinearEasing import androidx.compose.animation.core.animateFloat import androidx.compose.animation.core.infiniteRepeatable @@ -62,8 +53,17 @@ import com.derakkuma.notifications.DeviceNotifier import com.derakkuma.ui.OnboardingScreen import com.derakkuma.ui.auth.AuthScreen import com.derakkuma.ui.auth.clearAuthWebViewSession +import com.derakkuma.ui.components.ExpressiveBadge +import com.derakkuma.ui.components.ExpressiveBadgedBox +import com.derakkuma.ui.components.ExpressiveLoadingIndicator +import com.derakkuma.ui.components.ExpressiveNavigationBar +import com.derakkuma.ui.components.ExpressiveNavigationBarItem +import com.derakkuma.ui.components.ExpressiveScaffold +import com.derakkuma.ui.components.ExpressiveTopLoadingIndicator import com.derakkuma.ui.components.MaintenanceBanner import com.derakkuma.ui.components.VerizonNetworkBanner +import com.derakkuma.ui.components.expressiveNavigationBarItemColors +import com.derakkuma.ui.components.expressiveScreenBackground import com.derakkuma.ui.icons.Diversity3 import com.derakkuma.ui.images.BundledIcon import com.derakkuma.ui.images.BundledImage diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/atproto/AtProtoSettings.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/atproto/AtProtoSettings.kt index 0314979..b70600b 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/atproto/AtProtoSettings.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/atproto/AtProtoSettings.kt @@ -1,16 +1,5 @@ package com.derakkuma.atproto -import com.derakkuma.ui.components.ExpressiveButton -import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveHorizontalDivider -import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator -import com.derakkuma.ui.components.ExpressiveOutlinedButton -import com.derakkuma.ui.components.ExpressiveSwitch -import com.derakkuma.ui.components.ExpressiveTextButton -import com.derakkuma.ui.components.ExpressiveAlertDialog -import com.derakkuma.ui.components.ExpressiveDropdownMenu -import com.derakkuma.ui.components.ExpressiveDropdownMenuItem -import com.derakkuma.ui.components.ExpressiveTextField import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.tween import androidx.compose.foundation.layout.* @@ -23,8 +12,8 @@ import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp @@ -33,6 +22,17 @@ import com.derakkuma.data.CacheStore import com.derakkuma.data.MaimaiClient import com.derakkuma.data.MaimaiUserCard import com.derakkuma.data.PlayStore +import com.derakkuma.ui.components.ExpressiveAlertDialog +import com.derakkuma.ui.components.ExpressiveButton +import com.derakkuma.ui.components.ExpressiveDropdownMenu +import com.derakkuma.ui.components.ExpressiveDropdownMenuItem +import com.derakkuma.ui.components.ExpressiveGlassCard +import com.derakkuma.ui.components.ExpressiveHorizontalDivider +import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator +import com.derakkuma.ui.components.ExpressiveOutlinedButton +import com.derakkuma.ui.components.ExpressiveSwitch +import com.derakkuma.ui.components.ExpressiveTextButton +import com.derakkuma.ui.components.ExpressiveTextField import com.derakkuma.ui.images.MaimaiRemoteImage import com.derakkuma.ui.theme.* import com.derakkuma.util.formatScore @@ -448,7 +448,7 @@ fun AtProtoSection( singleLine = true, label = { Text("Handle or DID") }, placeholder = { Text("you.bsky.social") }, - ) + ) ExpressiveDropdownMenu( expanded = handleSuggestions.isNotEmpty(), onDismissRequest = { handleSuggestions = emptyList() }, @@ -737,7 +737,7 @@ private fun PublishToggle( ExpressiveSwitch( checked = checked, onCheckedChange = onCheckedChange, - enabled = enabled + enabled = enabled, ) } } diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/OnboardingScreen.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/OnboardingScreen.kt index 3c434a7..f56caba 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/OnboardingScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/OnboardingScreen.kt @@ -24,12 +24,12 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.derakkuma.atproto.openOAuthUrl -import com.derakkuma.ui.components.MaintenanceBanner import com.derakkuma.ui.components.ExpressiveButton +import com.derakkuma.ui.components.ExpressiveCheckbox import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveIconSurface -import com.derakkuma.ui.components.ExpressiveCheckbox import com.derakkuma.ui.components.ExpressiveTextButton +import com.derakkuma.ui.components.MaintenanceBanner import com.derakkuma.ui.components.expressiveScreenBackground import com.derakkuma.ui.images.BundledIcon import com.derakkuma.ui.images.BundledImage diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveControls.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveControls.kt index 9ab47d1..54bccea 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveControls.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveControls.kt @@ -6,34 +6,34 @@ import androidx.compose.animation.core.spring import androidx.compose.animation.core.tween import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.collectIsPressedAsState -import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.BoxScope -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.size -import androidx.compose.material3.Button -import androidx.compose.material3.ButtonColors -import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.AlertDialog import androidx.compose.material3.AssistChip import androidx.compose.material3.AssistChipDefaults -import androidx.compose.material3.AlertDialog import androidx.compose.material3.Badge import androidx.compose.material3.BadgedBox +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Checkbox import androidx.compose.material3.CheckboxDefaults import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem -import androidx.compose.material3.FilterChip -import androidx.compose.material3.FilterChipDefaults +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.FabPosition import androidx.compose.material3.FilledTonalIconButton +import androidx.compose.material3.FilterChip +import androidx.compose.material3.FilterChipDefaults import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.LinearWavyProgressIndicator @@ -44,6 +44,10 @@ import androidx.compose.material3.NavigationBarItem import androidx.compose.material3.NavigationBarItemColors import androidx.compose.material3.NavigationBarItemDefaults import androidx.compose.material3.OutlinedButton +import androidx.compose.material3.Scaffold +import androidx.compose.material3.SearchBar +import androidx.compose.material3.SearchBarColors +import androidx.compose.material3.SearchBarDefaults import androidx.compose.material3.Slider import androidx.compose.material3.SliderDefaults import androidx.compose.material3.Snackbar @@ -69,11 +73,6 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import androidx.compose.material3.SearchBar -import androidx.compose.material3.SearchBarColors -import androidx.compose.material3.SearchBarDefaults -import androidx.compose.material3.Scaffold - @Composable fun expressiveTextFieldColors(): TextFieldColors = TextFieldDefaults.colors( focusedContainerColor = MaterialTheme.colorScheme.surfaceContainerHighest, diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveSurfaces.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveSurfaces.kt index 6978b5f..a093b2c 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveSurfaces.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/ExpressiveSurfaces.kt @@ -5,8 +5,8 @@ import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope -import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -19,8 +19,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp @Composable -fun Modifier.expressiveScreenBackground(): Modifier = - background(MaterialTheme.colorScheme.background) +fun Modifier.expressiveScreenBackground(): Modifier = background(MaterialTheme.colorScheme.background) @Composable fun ExpressiveGlassCard( diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt index 763e0ea..73fd756 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt @@ -59,29 +59,29 @@ fun SongRow( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), ) { - // Album art - Box(modifier = Modifier.size(artSize)) { - if (albumArtUrl != null) { - MaimaiRemoteImage( - url = albumArtUrl, - modifier = Modifier.fillMaxSize().clip(MaterialShapes.Square.toShape()), - contentDescription = name, - contentScale = ContentScale.Crop, - ) - } else { - Box( - modifier = Modifier.fillMaxSize() - .clip(MaterialShapes.Square.toShape()) - .background(MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.1f)), - ) - } - // Difficulty badge overlaid bottom-left + // Album art + Box(modifier = Modifier.size(artSize)) { + if (albumArtUrl != null) { MaimaiRemoteImage( - url = "$IMG_BASE/diff_$difficulty.png", - modifier = Modifier.height(14.dp).align(Alignment.BottomStart), - contentDescription = difficulty, + url = albumArtUrl, + modifier = Modifier.fillMaxSize().clip(MaterialShapes.Square.toShape()), + contentDescription = name, + contentScale = ContentScale.Crop, + ) + } else { + Box( + modifier = Modifier.fillMaxSize() + .clip(MaterialShapes.Square.toShape()) + .background(MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.1f)), ) } + // Difficulty badge overlaid bottom-left + MaimaiRemoteImage( + url = "$IMG_BASE/diff_$difficulty.png", + modifier = Modifier.height(14.dp).align(Alignment.BottomStart), + contentDescription = difficulty, + ) + } Column( modifier = Modifier.weight(1f), @@ -145,26 +145,26 @@ fun SongRow( } } - // Score + rank column - Column(horizontalAlignment = Alignment.End) { - Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(3.dp)) { - Text( - "${formatScore(score)}%", - fontSize = 13.sp, - fontWeight = FontWeight.Bold, - color = MaterialTheme.colorScheme.secondary, - ) - val rankIcon = if (usePlaylogRanks) scoreRankImage(scoreRank) else musicIconImage(scoreRank) - if (rankIcon != null) { - BundledIcon(image = rankIcon, modifier = Modifier.height(16.dp), contentDescription = scoreRank) - } - } - if (dxScore.isNotBlank()) { - Text("DX $dxScore", fontSize = 10.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) - } - if (datetime.isNotBlank()) { - Text(datetime, fontSize = 10.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + // Score + rank column + Column(horizontalAlignment = Alignment.End) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(3.dp)) { + Text( + "${formatScore(score)}%", + fontSize = 13.sp, + fontWeight = FontWeight.Bold, + color = MaterialTheme.colorScheme.secondary, + ) + val rankIcon = if (usePlaylogRanks) scoreRankImage(scoreRank) else musicIconImage(scoreRank) + if (rankIcon != null) { + BundledIcon(image = rankIcon, modifier = Modifier.height(16.dp), contentDescription = scoreRank) } } + if (dxScore.isNotBlank()) { + Text("DX $dxScore", fontSize = 10.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + } + if (datetime.isNotBlank()) { + Text(datetime, fontSize = 10.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + } + } } } diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppIconTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppIconTab.kt index 6a874a3..4ead0ef 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppIconTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppIconTab.kt @@ -30,11 +30,11 @@ import com.derakkuma.appicon.setAppIcon import com.derakkuma.atproto.openOAuthUrl import com.derakkuma.data.CacheStore import com.derakkuma.donation.DonationUnlock -import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.ExpressiveAlertDialog -import com.derakkuma.ui.components.ExpressiveSnackbar +import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveScaffold +import com.derakkuma.ui.components.ExpressiveSnackbar +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.SplitButtonRow import com.derakkuma.ui.theme.* import io.github.vinceglb.confettikit.compose.ConfettiKit diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppSettingsTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppSettingsTab.kt index 9f3db63..3702008 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppSettingsTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/AppSettingsTab.kt @@ -14,14 +14,14 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.derakkuma.data.CacheStore +import com.derakkuma.ui.components.ExpressiveAlertDialog import com.derakkuma.ui.components.ExpressiveButton import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveSwitch import com.derakkuma.ui.components.ExpressiveOutlinedButton -import com.derakkuma.ui.components.ExpressiveTextButton -import com.derakkuma.ui.components.ExpressiveAlertDialog -import com.derakkuma.ui.components.ExpressiveSnackbar import com.derakkuma.ui.components.ExpressiveScaffold +import com.derakkuma.ui.components.ExpressiveSnackbar +import com.derakkuma.ui.components.ExpressiveSwitch +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.SplitButtonRow import com.derakkuma.ui.theme.* import io.github.samuolis.posthog.PostHog @@ -110,7 +110,7 @@ fun AppSettingsTab( onCheckedChange = { parkState = it cacheStore.putSetting("parkAnimation", if (it) "true" else "false") - } + }, ) } } @@ -137,7 +137,7 @@ fun AppSettingsTab( analyticsEnabled = it cacheStore.putSetting("analyticsOptOut", if (it) "false" else "true") if (it) PostHog.optIn() else PostHog.optOut() - } + }, ) } } diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/BubbleTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/BubbleTab.kt index 2ab942b..00806f1 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/BubbleTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/BubbleTab.kt @@ -4,8 +4,8 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.icons.automirrored.outlined.BluetoothSearching import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.outlined.BluetoothSearching import androidx.compose.material.icons.outlined.PersonAdd import androidx.compose.material3.* import androidx.compose.runtime.* diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/CollectionTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/CollectionTab.kt index 05941d7..5f6521e 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/CollectionTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/CollectionTab.kt @@ -1,6 +1,5 @@ package com.derakkuma.ui.tabs -import com.derakkuma.ui.components.ExpressiveLoadingIndicator import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyRow @@ -32,8 +31,9 @@ import com.derakkuma.data.TourMemberFormationPage import com.derakkuma.data.TourMemberSelectionPage import com.derakkuma.ui.components.EmptyState import com.derakkuma.ui.components.ExpressiveButton -import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveFilterChip +import com.derakkuma.ui.components.ExpressiveGlassCard +import com.derakkuma.ui.components.ExpressiveLoadingIndicator import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.images.BundledIcon diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FavoritesTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FavoritesTab.kt index c82c08d..105d94f 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FavoritesTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FavoritesTab.kt @@ -8,9 +8,9 @@ import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Edit import androidx.compose.material.icons.filled.Search +import androidx.compose.material3.* import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.MaterialShapes -import androidx.compose.material3.* import androidx.compose.material3.toShape import androidx.compose.runtime.* import androidx.compose.ui.Alignment @@ -24,14 +24,14 @@ import com.derakkuma.atproto.AtProtoClient import com.derakkuma.atproto.syncFavoriteListToAtProto import com.derakkuma.data.* import com.derakkuma.ui.components.EmptyState -import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveCheckbox +import com.derakkuma.ui.components.ExpressiveFloatingActionButton +import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveLoadingIndicator import com.derakkuma.ui.components.ExpressiveScaffold import com.derakkuma.ui.components.ExpressiveSearchBar -import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.ExpressiveSnackbar -import com.derakkuma.ui.components.ExpressiveFloatingActionButton +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.images.* import com.derakkuma.ui.theme.* diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FriendsTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FriendsTab.kt index 6d50bfa..36ede9c 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FriendsTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/FriendsTab.kt @@ -40,15 +40,15 @@ import com.derakkuma.friends.FriendScanDeepLink import com.derakkuma.friends.friendScanCode import com.derakkuma.friends.friendScanUrl import com.derakkuma.ui.components.EmptyCard +import com.derakkuma.ui.components.ExpressiveAlertDialog import com.derakkuma.ui.components.ExpressiveAssistChip import com.derakkuma.ui.components.ExpressiveButton +import com.derakkuma.ui.components.ExpressiveFilterChip import com.derakkuma.ui.components.ExpressiveFloatingActionButton import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressivePullToRefreshBox -import com.derakkuma.ui.components.ExpressiveFilterChip import com.derakkuma.ui.components.ExpressiveOutlinedButton +import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.ExpressiveTextButton -import com.derakkuma.ui.components.ExpressiveAlertDialog import com.derakkuma.ui.components.ExpressiveTextField import com.derakkuma.ui.components.InfoCard import com.derakkuma.ui.components.MaimaiProfile @@ -1027,7 +1027,7 @@ private fun CircleSearchDialog( modifier = Modifier.fillMaxWidth(), label = { Text("Circle code") }, singleLine = true, - ) + ) page?.message?.takeIf { it.isNotBlank() }?.let { Text(it, color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 13.sp) } } }, diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/HomeTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/HomeTab.kt index b604c33..2083035 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/HomeTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/HomeTab.kt @@ -24,8 +24,8 @@ import com.derakkuma.data.RatingData import com.derakkuma.ui.components.BigStat import com.derakkuma.ui.components.ErrorState import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator +import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.components.MaimaiProfile diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/KamaitachiSettingsTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/KamaitachiSettingsTab.kt index d63954d..c9410e3 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/KamaitachiSettingsTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/KamaitachiSettingsTab.kt @@ -1,6 +1,5 @@ package com.derakkuma.ui.tabs -import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator import androidx.compose.foundation.layout.* import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll @@ -18,10 +17,11 @@ import com.derakkuma.kamaitachi.KamaitachiClient import com.derakkuma.kamaitachi.KamaitachiSyncProgress import com.derakkuma.ui.components.ExpressiveButton import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveSnackbar +import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator import com.derakkuma.ui.components.ExpressiveLoadingIndicator -import com.derakkuma.ui.components.ExpressiveScaffold import com.derakkuma.ui.components.ExpressiveOutlinedButton +import com.derakkuma.ui.components.ExpressiveScaffold +import com.derakkuma.ui.components.ExpressiveSnackbar import com.derakkuma.ui.theme.* import kotlinx.coroutines.launch diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MoreTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MoreTab.kt index ba6af5d..c629f5e 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MoreTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MoreTab.kt @@ -29,6 +29,8 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.derakkuma.atproto.openOAuthUrl +import com.derakkuma.ui.components.ExpressiveGlassCard +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.icons.IdCard import com.derakkuma.ui.icons.Kamaitachi import com.derakkuma.ui.icons.License @@ -36,13 +38,10 @@ import com.derakkuma.ui.icons.MapSearchOutlined import com.derakkuma.ui.icons.PersonPinCircleOutlined import com.derakkuma.ui.icons.Signature import com.derakkuma.ui.icons.SocialLeaderboardOutlined -import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.images.BundledIcon import com.derakkuma.ui.images.BundledImage import com.derakkuma.ui.theme.* - @Composable fun MoreMenu( onPlayerData: () -> Unit, diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MusicDetailTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MusicDetailTab.kt index 522e770..776a6fa 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MusicDetailTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/MusicDetailTab.kt @@ -3,9 +3,9 @@ package com.derakkuma.ui.tabs import androidx.compose.foundation.layout.* import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.* import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.MaterialShapes -import androidx.compose.material3.* import androidx.compose.material3.toShape import androidx.compose.runtime.* import androidx.compose.ui.Alignment @@ -24,9 +24,9 @@ import com.derakkuma.data.* import com.derakkuma.data.CacheStore import com.derakkuma.ui.components.EmptyState import com.derakkuma.ui.components.ErrorState +import com.derakkuma.ui.components.ExpressiveBadgeSurface import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveHorizontalDivider -import com.derakkuma.ui.components.ExpressiveBadgeSurface import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.images.* import com.derakkuma.ui.theme.* diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt index 4777ec8..6a2b854 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt @@ -3,9 +3,9 @@ package com.derakkuma.ui.tabs import androidx.compose.foundation.layout.* import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.* import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi import androidx.compose.material3.MaterialShapes -import androidx.compose.material3.* import androidx.compose.material3.toShape import androidx.compose.runtime.* import androidx.compose.ui.Alignment diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerDataTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerDataTab.kt index ce7437a..f6c1604 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerDataTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerDataTab.kt @@ -1,6 +1,5 @@ package com.derakkuma.ui.tabs -import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.tween import androidx.compose.foundation.Canvas @@ -29,8 +28,9 @@ import com.derakkuma.data.* import com.derakkuma.data.CacheStore import com.derakkuma.ui.components.BigStat import com.derakkuma.ui.components.ErrorState -import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveDot +import com.derakkuma.ui.components.ExpressiveGlassCard +import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.images.* import com.derakkuma.ui.theme.* diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerNameTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerNameTab.kt index c71fadb..451b84b 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerNameTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayerNameTab.kt @@ -16,11 +16,11 @@ import com.derakkuma.atproto.AtProtoClient import com.derakkuma.atproto.syncCachedProfileToAtProto import com.derakkuma.data.* import com.derakkuma.ui.components.EmptyState +import com.derakkuma.ui.components.ExpressiveFloatingActionButton import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveTextButton -import com.derakkuma.ui.components.ExpressiveSnackbar import com.derakkuma.ui.components.ExpressiveScaffold -import com.derakkuma.ui.components.ExpressiveFloatingActionButton +import com.derakkuma.ui.components.ExpressiveSnackbar +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.ExpressiveTextField import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.theme.* @@ -134,7 +134,7 @@ fun PlayerNameTab( singleLine = true, enabled = !maintenanceMode, supportingText = { Text("${newName.length} / ${ns.maxLength}") }, - ) + ) if (ns.allowedSymbols.isNotEmpty()) { Text("Additional Symbols", fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onSurfaceVariant) diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RankingTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RankingTab.kt index 9a9bbea..c31a2b9 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RankingTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RankingTab.kt @@ -16,13 +16,13 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.derakkuma.data.* import com.derakkuma.ui.components.ErrorState -import com.derakkuma.ui.components.ExpressiveButton -import com.derakkuma.ui.components.ExpressiveGlassCard import com.derakkuma.ui.components.ExpressiveBadgeSurface -import com.derakkuma.ui.components.ExpressiveFilterChip -import com.derakkuma.ui.components.ExpressiveTextButton +import com.derakkuma.ui.components.ExpressiveButton import com.derakkuma.ui.components.ExpressiveDropdownMenu import com.derakkuma.ui.components.ExpressiveDropdownMenuItem +import com.derakkuma.ui.components.ExpressiveFilterChip +import com.derakkuma.ui.components.ExpressiveGlassCard +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.theme.* import com.derakkuma.util.formatScore diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RatingTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RatingTab.kt index db659cc..cedac9d 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RatingTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/RatingTab.kt @@ -20,8 +20,8 @@ import com.derakkuma.data.RatingSong import com.derakkuma.data.SessionExpiredException import com.derakkuma.ui.components.ErrorState import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.ExpressiveHorizontalDivider +import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.components.SongRow import com.derakkuma.ui.theme.* diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/ScoresTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/ScoresTab.kt index fdf2883..5772b25 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/ScoresTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/ScoresTab.kt @@ -28,13 +28,13 @@ import com.derakkuma.data.RatingData import com.derakkuma.data.RecentPlay import com.derakkuma.data.SessionExpiredException import com.derakkuma.ui.components.ErrorState +import com.derakkuma.ui.components.ExpressiveBadgeSurface import com.derakkuma.ui.components.ExpressiveButton import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.ExpressiveHorizontalDivider -import com.derakkuma.ui.components.ExpressiveBadgeSurface import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator import com.derakkuma.ui.components.ExpressiveLoadingIndicator +import com.derakkuma.ui.components.ExpressivePullToRefreshBox import com.derakkuma.ui.components.LoadingState import com.derakkuma.ui.components.SongRow import com.derakkuma.ui.images.BundledIcon diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/SettingsTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/SettingsTab.kt index 922a123..ec85365 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/SettingsTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/SettingsTab.kt @@ -1,16 +1,5 @@ package com.derakkuma.ui.tabs -import com.derakkuma.ui.components.ExpressiveSlider -import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator -import com.derakkuma.ui.components.ExpressiveGlassCard -import com.derakkuma.ui.components.ExpressiveHorizontalDivider -import com.derakkuma.ui.components.ExpressiveTextButton -import com.derakkuma.ui.components.ExpressiveDropdownMenu -import com.derakkuma.ui.components.ExpressiveDropdownMenuItem -import com.derakkuma.ui.components.ExpressiveSnackbar -import com.derakkuma.ui.components.ExpressiveScaffold -import com.derakkuma.ui.components.ExpressiveFloatingActionButton -import com.derakkuma.ui.components.ExpressiveSwitch import androidx.compose.foundation.Image import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* @@ -31,7 +20,19 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.derakkuma.data.* import com.derakkuma.ui.components.EmptyState +import com.derakkuma.ui.components.ExpressiveDropdownMenu +import com.derakkuma.ui.components.ExpressiveDropdownMenuItem +import com.derakkuma.ui.components.ExpressiveFloatingActionButton +import com.derakkuma.ui.components.ExpressiveGlassCard +import com.derakkuma.ui.components.ExpressiveHorizontalDivider +import com.derakkuma.ui.components.ExpressiveLinearProgressIndicator +import com.derakkuma.ui.components.ExpressiveScaffold +import com.derakkuma.ui.components.ExpressiveSlider +import com.derakkuma.ui.components.ExpressiveSnackbar +import com.derakkuma.ui.components.ExpressiveSwitch +import com.derakkuma.ui.components.ExpressiveTextButton import com.derakkuma.ui.components.LoadingState +import com.derakkuma.ui.components.SplitButtonRow import com.derakkuma.ui.icons.DoubleArrow import com.derakkuma.ui.icons.MobiledataArrows import com.derakkuma.ui.icons.ReplayFlipped @@ -39,7 +40,6 @@ import com.derakkuma.ui.images.MaimaiAssets import com.derakkuma.ui.images.rememberBundledImage import com.derakkuma.ui.theme.* import kotlinx.coroutines.launch -import com.derakkuma.ui.components.SplitButtonRow @Composable fun SettingsTab(client: MaimaiClient, cookie: String, maintenanceMode: Boolean = false) { -- 2.51.2