feat: Improve web app import and update about screen libraries

- Replaced "Import from Web App" TextButton with an IconButton (CloudDownload icon) in ShoppingListDetailScreen.
- Moved the web app import button to the TopAppBar in MainActivity, positioned left of the search icon for ShoppingListDetailScreen.
- Updated AboutScreen to include a more comprehensive list of used open-source libraries.
- Added corresponding string resources and German translations for the new library entries.
This commit is contained in:
2025-10-30 14:06:44 +01:00
parent 8e2ad2f0ec
commit de91d6e2de
5 changed files with 28 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.CloudDownload
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.ui.platform.LocalContext
@@ -1281,6 +1282,9 @@ fun AppShell(
}
when (currentScreen) {
is Screen.ShoppingListDetail -> {
IconButton(onClick = { selectedListId?.let { shoppingListsViewModel.importItemsFromWebApp(it) } }) {
Icon(Icons.Default.CloudDownload, contentDescription = stringResource(R.string.import_from_web_app))
}
IconButton(onClick = { shoppingListsViewModel.toggleDetailSearch() }) {
Icon(Icons.Default.Search, contentDescription = "Search")
}

View File

@@ -158,6 +158,14 @@ fun AboutScreen() {
Text(stringResource(id = R.string.about_library_androidx), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_junit), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_reorderable), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_room), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_biometric), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_material_icons_extended), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_documentfile), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_google_material), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_compose_markdown), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_kotlinx_serialization_json), style = MaterialTheme.typography.bodyMedium)
Text(stringResource(id = R.string.about_library_ktor), style = MaterialTheme.typography.bodyMedium)
}
}
}

View File

@@ -150,9 +150,6 @@ fun ShoppingListDetailScreen(
}) {
Text(if (showCompletedItems) stringResource(R.string.unmark_all_as_completed) else stringResource(R.string.mark_all_as_completed))
}
TextButton(onClick = { viewModel.importItemsFromWebApp(listWithItems.shoppingList.id) }) {
Text(stringResource(R.string.import_from_web_app))
}
}
OutlinedTextField(

View File

@@ -206,6 +206,14 @@
<string name="about_library_androidx">• AndroidX Libraries (Activity, Compose, Core, Lifecycle, Room)</string>
<string name="about_library_junit">• JUnit</string>
<string name="about_library_reorderable">• Reorderable for Compose by Calvin Shroff</string>
<string name="about_library_room">• Room (Datenbankpersistenz)</string>
<string name="about_library_biometric">• AndroidX Biometric (Biometrische Authentifizierung)</string>
<string name="about_library_material_icons_extended">• Material Icons Extended</string>
<string name="about_library_documentfile">• AndroidX DocumentFile (Dateizugriff)</string>
<string name="about_library_google_material">• Google Material Design Komponenten</string>
<string name="about_library_compose_markdown">• Compose Markdown (Markdown-Rendering)</string>
<string name="about_library_kotlinx_serialization_json">• Kotlinx Serialization (JSON-Parsing)</string>
<string name="about_library_ktor">• Ktor (HTTP-Client)</string>
<string name="color_scheme">Farbschema</string>
<string name="selected">Ausgewählt</string>
<string name="security">Sicherheit</string>

View File

@@ -206,6 +206,14 @@
<string name="about_library_androidx">• AndroidX Libraries (Activity, Compose, Core, Lifecycle, Room)</string>
<string name="about_library_junit">• JUnit</string>
<string name="about_library_reorderable">• Reorderable for Compose by Calvin Shroff</string>
<string name="about_library_room">• Room (Database persistence)</string>
<string name="about_library_biometric">• AndroidX Biometric (Biometric authentication)</string>
<string name="about_library_material_icons_extended">• Material Icons Extended</string>
<string name="about_library_documentfile">• AndroidX DocumentFile (File access)</string>
<string name="about_library_google_material">• Google Material Design Components</string>
<string name="about_library_compose_markdown">• Compose Markdown (Markdown rendering)</string>
<string name="about_library_kotlinx_serialization_json">• Kotlinx Serialization (JSON parsing)</string>
<string name="about_library_ktor">• Ktor (HTTP Client)</string>
<string name="color_scheme">Color Scheme</string>
<string name="selected">Selected</string>
<string name="security">Security</string>