More consistent ChevronIcon usage on the context actions

This commit is contained in:
Artem Chepurnoy 2024-01-15 10:44:01 +02:00
parent 2113847162
commit 7fa1bf4c55
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
7 changed files with 30 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import com.artemchep.keyguard.feature.navigation.Route
import com.artemchep.keyguard.feature.navigation.state.TranslatorScope import com.artemchep.keyguard.feature.navigation.state.TranslatorScope
import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.ui.FlatItemAction import com.artemchep.keyguard.ui.FlatItemAction
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.iconSmall import com.artemchep.keyguard.ui.icons.iconSmall
object EmailRelayListRoute : Route { object EmailRelayListRoute : Route {
@ -25,6 +26,9 @@ object EmailRelayListRoute : Route {
) = FlatItemAction( ) = FlatItemAction(
leading = iconSmall(Icons.Outlined.ForwardToInbox), leading = iconSmall(Icons.Outlined.ForwardToInbox),
title = translator.translate(Res.strings.emailrelay_list_header_title), title = translator.translate(Res.strings.emailrelay_list_header_title),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val route = EmailRelayListRoute val route = EmailRelayListRoute
val intent = NavigationIntent.NavigateToRoute(route) val intent = NavigationIntent.NavigateToRoute(route)

View File

@ -7,6 +7,7 @@ import com.artemchep.keyguard.feature.navigation.Route
import com.artemchep.keyguard.feature.navigation.state.TranslatorScope import com.artemchep.keyguard.feature.navigation.state.TranslatorScope
import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.ui.FlatItemAction import com.artemchep.keyguard.ui.FlatItemAction
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.KeyguardWordlist import com.artemchep.keyguard.ui.icons.KeyguardWordlist
import com.artemchep.keyguard.ui.icons.iconSmall import com.artemchep.keyguard.ui.icons.iconSmall
@ -25,6 +26,9 @@ object WordlistRoute : Route {
) = FlatItemAction( ) = FlatItemAction(
leading = iconSmall(Icons.Outlined.KeyguardWordlist), leading = iconSmall(Icons.Outlined.KeyguardWordlist),
title = translator.translate(Res.strings.wordlist_list_header_title), title = translator.translate(Res.strings.wordlist_list_header_title),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val route = WordlistRoute val route = WordlistRoute
val intent = NavigationIntent.NavigateToRoute(route) val intent = NavigationIntent.NavigateToRoute(route)

View File

@ -384,6 +384,9 @@ fun vaultListScreenState(
Icon(Icons.Outlined.Delete, null) Icon(Icons.Outlined.Delete, null)
}, },
title = translate(Res.strings.trash), title = translate(Res.strings.trash),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val newArgs = args.copy( val newArgs = args.copy(
appBar = VaultRoute.Args.AppBar( appBar = VaultRoute.Args.AppBar(
@ -406,6 +409,9 @@ fun vaultListScreenState(
Icon(Icons.Outlined.Download, null) Icon(Icons.Outlined.Download, null)
}, },
title = translate(Res.strings.downloads), title = translate(Res.strings.downloads),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val route = AttachmentsRoute() val route = AttachmentsRoute()
val intent = NavigationIntent.NavigateToRoute(route) val intent = NavigationIntent.NavigateToRoute(route)

View File

@ -53,6 +53,7 @@ import com.artemchep.keyguard.feature.navigation.state.RememberStateFlowScope
import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.ui.FlatItemAction import com.artemchep.keyguard.ui.FlatItemAction
import com.artemchep.keyguard.ui.SimpleNote import com.artemchep.keyguard.ui.SimpleNote
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.icon import com.artemchep.keyguard.ui.icons.icon
import com.artemchep.keyguard.ui.theme.badgeContainer import com.artemchep.keyguard.ui.theme.badgeContainer
@ -513,6 +514,9 @@ fun RememberStateFlowScope.cipherViewPasswordHistoryAction(
} }
}, },
title = title, title = title,
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val intent = NavigationIntent.NavigateToRoute( val intent = NavigationIntent.NavigateToRoute(
VaultViewPasswordHistoryRoute( VaultViewPasswordHistoryRoute(

View File

@ -9,6 +9,7 @@ import com.artemchep.keyguard.feature.navigation.Route
import com.artemchep.keyguard.feature.navigation.state.TranslatorScope import com.artemchep.keyguard.feature.navigation.state.TranslatorScope
import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.ui.FlatItemAction import com.artemchep.keyguard.ui.FlatItemAction
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.iconSmall import com.artemchep.keyguard.ui.icons.iconSmall
object JustDeleteMeServiceListRoute : Route { object JustDeleteMeServiceListRoute : Route {
@ -26,6 +27,9 @@ object JustDeleteMeServiceListRoute : Route {
) = FlatItemAction( ) = FlatItemAction(
leading = iconSmall(Icons.Outlined.AccountBox, Icons.Outlined.Delete), leading = iconSmall(Icons.Outlined.AccountBox, Icons.Outlined.Delete),
title = translator.translate(Res.strings.uri_action_how_to_delete_account_title), title = translator.translate(Res.strings.uri_action_how_to_delete_account_title),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val route = JustDeleteMeServiceListRoute val route = JustDeleteMeServiceListRoute
val intent = NavigationIntent.NavigateToRoute(route) val intent = NavigationIntent.NavigateToRoute(route)

View File

@ -9,6 +9,7 @@ import com.artemchep.keyguard.feature.navigation.Route
import com.artemchep.keyguard.feature.navigation.state.TranslatorScope import com.artemchep.keyguard.feature.navigation.state.TranslatorScope
import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.ui.FlatItemAction import com.artemchep.keyguard.ui.FlatItemAction
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.iconSmall import com.artemchep.keyguard.ui.icons.iconSmall
object PasskeysServiceListRoute : Route { object PasskeysServiceListRoute : Route {
@ -27,6 +28,9 @@ object PasskeysServiceListRoute : Route {
leading = iconSmall(Icons.Outlined.Folder, Icons.Outlined.Key), leading = iconSmall(Icons.Outlined.Folder, Icons.Outlined.Key),
title = translator.translate(Res.strings.passkeys_directory_title), title = translator.translate(Res.strings.passkeys_directory_title),
text = translator.translate(Res.strings.passkeys_directory_text), text = translator.translate(Res.strings.passkeys_directory_text),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val route = PasskeysServiceListRoute val route = PasskeysServiceListRoute
val intent = NavigationIntent.NavigateToRoute(route) val intent = NavigationIntent.NavigateToRoute(route)

View File

@ -8,6 +8,7 @@ import com.artemchep.keyguard.feature.navigation.Route
import com.artemchep.keyguard.feature.navigation.state.TranslatorScope import com.artemchep.keyguard.feature.navigation.state.TranslatorScope
import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.res.Res
import com.artemchep.keyguard.ui.FlatItemAction import com.artemchep.keyguard.ui.FlatItemAction
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.KeyguardTwoFa import com.artemchep.keyguard.ui.icons.KeyguardTwoFa
import com.artemchep.keyguard.ui.icons.iconSmall import com.artemchep.keyguard.ui.icons.iconSmall
@ -27,6 +28,9 @@ object TwoFaServiceListRoute : Route {
leading = iconSmall(Icons.Outlined.Folder, Icons.Outlined.KeyguardTwoFa), leading = iconSmall(Icons.Outlined.Folder, Icons.Outlined.KeyguardTwoFa),
title = translator.translate(Res.strings.tfa_directory_title), title = translator.translate(Res.strings.tfa_directory_title),
text = translator.translate(Res.strings.tfa_directory_text), text = translator.translate(Res.strings.tfa_directory_text),
trailing = {
ChevronIcon()
},
onClick = { onClick = {
val route = TwoFaServiceListRoute val route = TwoFaServiceListRoute
val intent = NavigationIntent.NavigateToRoute(route) val intent = NavigationIntent.NavigateToRoute(route)