mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
add string resources to navbar
This commit is contained in:
@@ -682,7 +682,7 @@ fun MainScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(it.route)
|
||||
Text(it.title)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -9,14 +9,18 @@ import androidx.compose.material.icons.outlined.Home
|
||||
import androidx.compose.material.icons.outlined.Settings
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import com.greenart7c3.nostrsigner.NostrSigner
|
||||
import com.greenart7c3.nostrsigner.R
|
||||
|
||||
@Immutable
|
||||
sealed class Route(
|
||||
val title: String,
|
||||
val route: String,
|
||||
val icon: ImageVector,
|
||||
val selectedIcon: ImageVector,
|
||||
) {
|
||||
data object Home : Route(
|
||||
title = NostrSigner.instance.getString(R.string.home),
|
||||
route = "Home",
|
||||
icon = Icons.Outlined.Home,
|
||||
selectedIcon = Icons.Default.Home,
|
||||
@@ -24,17 +28,20 @@ sealed class Route(
|
||||
|
||||
data object Permissions : Route(
|
||||
route = "Permissions",
|
||||
title = NostrSigner.instance.getString(R.string.permissions),
|
||||
icon = Icons.AutoMirrored.Outlined.ViewList,
|
||||
selectedIcon = Icons.AutoMirrored.Default.ViewList,
|
||||
)
|
||||
|
||||
data object Settings : Route(
|
||||
title = NostrSigner.instance.getString(R.string.settings),
|
||||
route = "Settings",
|
||||
icon = Icons.Outlined.Settings,
|
||||
selectedIcon = Icons.Default.Settings,
|
||||
)
|
||||
|
||||
data object Permission : Route(
|
||||
title = NostrSigner.instance.getString(R.string.permissions),
|
||||
route = "Permission/{packageName}",
|
||||
icon = Icons.AutoMirrored.Outlined.ViewList,
|
||||
selectedIcon = Icons.AutoMirrored.Default.ViewList,
|
||||
|
||||
@@ -125,4 +125,6 @@
|
||||
<string name="language">Language</string>
|
||||
<string name="language_description">For the App\'s Interface</string>
|
||||
<string name="no_activities_found">No activities found</string>
|
||||
<string name="home">Home</string>
|
||||
<string name="settings">Settings</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user