Refactor Applications, add app list view

This commit is contained in:
BinTianqi
2025-03-22 09:45:55 +08:00
parent 52a29331be
commit 1212a40e7a
11 changed files with 1025 additions and 811 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -602,9 +602,17 @@ fun AddDelegatedAdminScreen(data: AddDelegatedAdmin, onNavigateUp: () -> Unit) {
readOnly = updateMode,
modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp, horizontal = HorizontalPadding)
)
DelegatedScope.entries.filter { VERSION.SDK_INT >= it.requiresApi }.forEach {scope ->
FullWidthCheckBoxItem(scope.string, scope in scopes) {
if(it) scopes += scope else scopes -= scope
DelegatedScope.entries.filter { VERSION.SDK_INT >= it.requiresApi }.forEach { scope ->
val checked = scope in scopes
Row(
Modifier.fillMaxWidth().clickable { if(!checked) scopes += scope else scopes -= scope }.padding(vertical = 4.dp),
verticalAlignment = Alignment.CenterVertically
) {
Checkbox(checked, { if(it) scopes += scope else scopes -= scope }, modifier = Modifier.padding(horizontal = 4.dp))
Column {
Text(stringResource(scope.string))
Text(scope.id, style = typography.bodyMedium, color = colorScheme.onSurfaceVariant)
}
}
}
Button(