feat: UI Changes
* fix(#220): implement edit soul and set model dialogs * fix(#211): make UI more compact and information dense * fix(#211): make navigation drawer sidebar more compact * feat(#252): move settings item to end of navigation drawer * feat(#250): add bottom navigation bar display mode settings * feat(#225): add search bar filtering to remaining screens * fix: make bottom navigation bar display modes more compact * fix: resolve compilation error in KanbanScreen by referencing assignedTo * feat: add search to achievements screen and top padding for icon-only navigation bar * fix: adjust icon-only bottom bar height and remove padding * fix(#249): remove unused PaddingValues imports in 6 screens --------- Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
32def80694
commit
60bf6e8a33
20 files changed
+424
-61
No files matched your search
@@ -45,6 +45,7 @@ import com.m57.hermescontrol.ui.common.EmptyState
|
||||
import com.m57.hermescontrol.ui.common.ErrorState
|
||||
import com.m57.hermescontrol.ui.common.HermesScaffold
|
||||
import com.m57.hermescontrol.ui.common.LoadingState
|
||||
import com.m57.hermescontrol.ui.common.SearchBar
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
@@ -56,6 +57,18 @@ fun ModelScreen(
|
||||
val state by viewModel.uiState.collectAsStateWithLifecycle()
|
||||
val context = LocalContext.current
|
||||
var expandedProviderSlug by remember { mutableStateOf<String?>(null) }
|
||||
var query by remember { mutableStateOf("") }
|
||||
|
||||
val filteredProviders =
|
||||
remember(query, state.providers) {
|
||||
state.providers.filter { provider ->
|
||||
provider.name.contains(query, ignoreCase = true) ||
|
||||
provider.slug.contains(query, ignoreCase = true) ||
|
||||
provider.models.orEmpty().any { model ->
|
||||
model.contains(query, ignoreCase = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
viewModel.loadModelOptions()
|
||||
@@ -121,7 +134,14 @@ fun ModelScreen(
|
||||
contentPadding = PaddingValues(16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp),
|
||||
) {
|
||||
items(state.providers) { provider ->
|
||||
item {
|
||||
SearchBar(
|
||||
query = query,
|
||||
onQueryChange = { query = it },
|
||||
placeholder = "Search models...",
|
||||
)
|
||||
}
|
||||
items(filteredProviders) { provider ->
|
||||
val isExpanded = expandedProviderSlug == provider.slug
|
||||
val isCurrent = provider.is_current == true
|
||||
|
||||
|
||||
Reference in new issue
Block a user