Release v2026.05.14.0 — player polish, CacheFiller, offline mutation queue #47
@@ -91,6 +91,37 @@ fun SettingsScreen(
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
) { inner ->
|
) { inner ->
|
||||||
|
SettingsList(
|
||||||
|
inner = inner,
|
||||||
|
state = state,
|
||||||
|
themeMode = themeMode,
|
||||||
|
onPickTheme = themeVm::setThemeMode,
|
||||||
|
onNavToRequests = { navController.navigate(Requests) },
|
||||||
|
onNavToAdmin = { navController.navigate(Admin) },
|
||||||
|
onSignOutClick = { showSignOutConfirm = true },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (showSignOutConfirm) {
|
||||||
|
SignOutConfirmDialog(
|
||||||
|
onConfirm = {
|
||||||
|
showSignOutConfirm = false
|
||||||
|
viewModel.signOut()
|
||||||
|
},
|
||||||
|
onDismiss = { showSignOutConfirm = false },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun SettingsList(
|
||||||
|
inner: androidx.compose.foundation.layout.PaddingValues,
|
||||||
|
state: SettingsState,
|
||||||
|
themeMode: ThemeMode,
|
||||||
|
onPickTheme: (ThemeMode) -> Unit,
|
||||||
|
onNavToRequests: () -> Unit,
|
||||||
|
onNavToAdmin: () -> Unit,
|
||||||
|
onSignOutClick: () -> Unit,
|
||||||
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
@@ -108,36 +139,23 @@ fun SettingsScreen(
|
|||||||
icon = Lucide.ListMusic,
|
icon = Lucide.ListMusic,
|
||||||
title = "My requests",
|
title = "My requests",
|
||||||
subtitle = "Track what you've asked Minstrel to add",
|
subtitle = "Track what you've asked Minstrel to add",
|
||||||
onClick = { navController.navigate(Requests) },
|
onClick = onNavToRequests,
|
||||||
)
|
)
|
||||||
if (state.isAdmin) {
|
if (state.isAdmin) {
|
||||||
NavTile(
|
NavTile(
|
||||||
icon = Lucide.Shield,
|
icon = Lucide.Shield,
|
||||||
title = "Admin",
|
title = "Admin",
|
||||||
subtitle = "Manage requests, quarantine, and users",
|
subtitle = "Manage requests, quarantine, and users",
|
||||||
onClick = { navController.navigate(Admin) },
|
onClick = onNavToAdmin,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ProfileCard()
|
ProfileCard()
|
||||||
PasswordCard()
|
PasswordCard()
|
||||||
ListenBrainzCard()
|
ListenBrainzCard()
|
||||||
AppearanceCard(themeMode = themeMode, onPick = themeVm::setThemeMode)
|
AppearanceCard(themeMode = themeMode, onPick = onPickTheme)
|
||||||
StorageCard()
|
StorageCard()
|
||||||
AboutCard()
|
AboutCard()
|
||||||
SignOutButton(
|
SignOutButton(isSigningOut = state.isSigningOut, onSignOut = onSignOutClick)
|
||||||
isSigningOut = state.isSigningOut,
|
|
||||||
onSignOut = { showSignOutConfirm = true },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (showSignOutConfirm) {
|
|
||||||
SignOutConfirmDialog(
|
|
||||||
onConfirm = {
|
|
||||||
showSignOutConfirm = false
|
|
||||||
viewModel.signOut()
|
|
||||||
},
|
|
||||||
onDismiss = { showSignOutConfirm = false },
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user