mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add help screen
This commit is contained in:
parent
ff29bf5802
commit
1af8bbfd78
27
java/res/drawable/help_circle.xml
Normal file
27
java/res/drawable/help_circle.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M9.09,9a3,3 0,0 1,5.83 1c0,2 -3,3 -3,3"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12,17L12.01,17"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
@ -12,6 +12,7 @@ import org.futo.inputmethod.latin.uix.ErrorDialog
|
||||
import org.futo.inputmethod.latin.uix.InfoDialog
|
||||
import org.futo.inputmethod.latin.uix.settings.pages.AdvancedParametersScreen
|
||||
import org.futo.inputmethod.latin.uix.settings.pages.BlacklistScreen
|
||||
import org.futo.inputmethod.latin.uix.settings.pages.HelpScreen
|
||||
import org.futo.inputmethod.latin.uix.settings.pages.HomeScreen
|
||||
import org.futo.inputmethod.latin.uix.settings.pages.LanguagesScreen
|
||||
import org.futo.inputmethod.latin.uix.settings.pages.PredictiveTextScreen
|
||||
@ -46,6 +47,7 @@ fun SettingsNavigator(
|
||||
composable("typing") { TypingScreen(navController) }
|
||||
composable("voiceInput") { VoiceInputScreen(navController) }
|
||||
composable("themes") { ThemeScreen(navController) }
|
||||
composable("help") { HelpScreen(navController) }
|
||||
composable("blacklist") { BlacklistScreen(navController) }
|
||||
dialog("error/{title}/{body}") {
|
||||
ErrorDialog(
|
||||
|
@ -0,0 +1,36 @@
|
||||
package org.futo.inputmethod.latin.uix.settings.pages
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.navigation.NavHostController
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import org.futo.inputmethod.latin.BuildConfig
|
||||
import org.futo.inputmethod.latin.uix.settings.NavigationItem
|
||||
import org.futo.inputmethod.latin.uix.settings.NavigationItemStyle
|
||||
import org.futo.inputmethod.latin.uix.settings.ScreenTitle
|
||||
import org.futo.inputmethod.latin.uix.settings.ScrollableList
|
||||
import org.futo.inputmethod.latin.uix.settings.Tip
|
||||
import org.futo.inputmethod.updates.openURI
|
||||
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun HelpScreen(navController: NavHostController = rememberNavController()) {
|
||||
val context = LocalContext.current
|
||||
|
||||
ScrollableList {
|
||||
ScreenTitle("Help & Feedback", showBack = true, navController)
|
||||
|
||||
Tip("We wanna hear from you! If you're reporting an issue, your version may be relevant: zv${BuildConfig.VERSION_NAME}")
|
||||
|
||||
NavigationItem(title = "Discord Server", style = NavigationItemStyle.Misc, navigate = {
|
||||
context.openURI("https://keyboard.futo.org/discord")
|
||||
})
|
||||
NavigationItem(title = "FUTO Chat", style = NavigationItemStyle.Misc, navigate = {
|
||||
context.openURI("https://chat.futo.org/")
|
||||
})
|
||||
NavigationItem(title = "Email us", style = NavigationItemStyle.Misc, navigate = {
|
||||
context.openURI("mailto:keyboard@futo.org")
|
||||
})
|
||||
}
|
||||
}
|
@ -102,6 +102,13 @@ fun HomeScreen(navController: NavHostController = rememberNavController()) {
|
||||
icon = painterResource(id = R.drawable.eye)
|
||||
)
|
||||
|
||||
NavigationItem(
|
||||
title = "Help & Feedback",
|
||||
style = NavigationItemStyle.HomePrimary,
|
||||
navigate = { navController.navigate("help") },
|
||||
icon = painterResource(id = R.drawable.help_circle)
|
||||
)
|
||||
|
||||
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Text(
|
||||
|
Loading…
Reference in New Issue
Block a user