From 6abfabdac0a947002a20e4719e922f70aad91433 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Mon, 22 Jun 2026 22:33:09 +0300 Subject: [PATCH] fix(#287): fix empty-state subtitles and content description on Keys and Profiles screens (#311) * fix(#287): fix empty-state subtitles and content description on Keys and Profiles screens - Added `keys_empty_desc` and `profiles_empty_desc` string resources. - Updated `KeysScreen.kt` and `ProfilesScreen.kt` to use correct empty-state subtitles instead of the copy-pasted `toolsets_empty_desc`. - Added `content_desc_edit` string resource and applied it to the edit icon in `KeysScreen.kt` for accessibility. * fix(#287): correct empty-state descriptions and accessibility content descriptions - Replaced incorrect `toolsets_empty_desc` with newly added `keys_empty_desc` on the Keys screen. - Replaced incorrect `toolsets_empty_desc` with newly added `profiles_empty_desc` on the Profiles screen. - Updated the content description of the edit icon on the Keys screen to use newly added `content_desc_edit` instead of `nav_drawer_section_converse`. --- app/src/main/java/com/m57/hermescontrol/ui/keys/KeysScreen.kt | 4 ++-- .../java/com/m57/hermescontrol/ui/profiles/ProfilesScreen.kt | 2 +- app/src/main/res/values/strings.xml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/ui/keys/KeysScreen.kt b/app/src/main/java/com/m57/hermescontrol/ui/keys/KeysScreen.kt index 19c4a2fe..6a068f29 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/keys/KeysScreen.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/keys/KeysScreen.kt @@ -102,7 +102,7 @@ fun KeysScreen( state.envVars.isEmpty() -> { EmptyState( title = stringResource(R.string.keys_empty_title), - subtitle = stringResource(R.string.toolsets_empty_desc), + subtitle = stringResource(R.string.keys_empty_desc), onAction = { viewModel.loadKeys() }, actionLabel = stringResource(R.string.content_desc_refresh), modifier = Modifier.padding(paddingValues), @@ -232,7 +232,7 @@ fun KeysScreen( imageVector = Icons.Filled.Edit, contentDescription = stringResource( - R.string.nav_drawer_section_converse, + R.string.content_desc_edit, ), ) } diff --git a/app/src/main/java/com/m57/hermescontrol/ui/profiles/ProfilesScreen.kt b/app/src/main/java/com/m57/hermescontrol/ui/profiles/ProfilesScreen.kt index 3840bc0a..a28ac21f 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/profiles/ProfilesScreen.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/profiles/ProfilesScreen.kt @@ -97,7 +97,7 @@ fun ProfilesScreen( state.profiles.isEmpty() -> { EmptyState( title = stringResource(R.string.profiles_empty_title), - subtitle = stringResource(R.string.toolsets_empty_desc), + subtitle = stringResource(R.string.profiles_empty_desc), onAction = { viewModel.loadProfiles() }, actionLabel = stringResource(R.string.content_desc_refresh), modifier = Modifier.padding(paddingValues), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2e2e729b..726baa29 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -102,6 +102,7 @@ Scroll to bottom Interrupt Copy + Edit Connection @@ -286,6 +287,7 @@ No profiles available + Connection profiles from Hermes will appear here. Model: %1$s Provider: %1$s Edit Soul @@ -335,6 +337,7 @@ No environment keys reported + Environment keys from Hermes will appear here. Not configured Toggle Visibility