Add initial credits screen

This commit is contained in:
Aleksandras Kostarevas 2024-04-28 23:16:59 -04:00
parent 0b1ad01f1a
commit 9aea3efd66
3 changed files with 29 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import org.futo.inputmethod.latin.uix.ErrorDialog
import org.futo.inputmethod.latin.uix.InfoDialog import org.futo.inputmethod.latin.uix.InfoDialog
import org.futo.inputmethod.latin.uix.settings.pages.AdvancedParametersScreen 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.BlacklistScreen
import org.futo.inputmethod.latin.uix.settings.pages.CreditsScreen
import org.futo.inputmethod.latin.uix.settings.pages.DeveloperScreen import org.futo.inputmethod.latin.uix.settings.pages.DeveloperScreen
import org.futo.inputmethod.latin.uix.settings.pages.HelpScreen 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.HomeScreen
@ -58,6 +59,7 @@ fun SettingsNavigator(
composable("blacklist") { BlacklistScreen(navController) } composable("blacklist") { BlacklistScreen(navController) }
composable("payment") { PaymentScreen(navController) { navController.navigateUp() } } composable("payment") { PaymentScreen(navController) { navController.navigateUp() } }
composable("paid") { PaymentThankYouScreen { navController.navigateUp() } } composable("paid") { PaymentThankYouScreen { navController.navigateUp() } }
composable("credits") { CreditsScreen(navController) }
dialog("error/{title}/{body}") { dialog("error/{title}/{body}") {
ErrorDialog( ErrorDialog(
it.arguments?.getString("title")?.urlDecode() ?: stringResource(R.string.unknown_error), it.arguments?.getString("title")?.urlDecode() ?: stringResource(R.string.unknown_error),

View File

@ -0,0 +1,21 @@
package org.futo.inputmethod.latin.uix.settings.pages
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import org.futo.inputmethod.latin.uix.settings.ScreenTitle
import org.futo.inputmethod.latin.uix.settings.ScrollableList
@Preview(showBackground = true)
@Composable
fun CreditsScreen(navController: NavHostController = rememberNavController()) {
ScrollableList {
ScreenTitle("Credits", showBack = true, navController)
ParagraphText("This keyboard is based on the LatinIME keyboard from the Android Open Source Project. Thank you to the original AOSP LatinIME Keyboard developers. The LatinIME keyboard is Apache-2.0 licensed and Copyright (C) 2011 The Android Open Source Project")
ParagraphText("Thank you to llama.cpp, whisper.cpp, ggml devs for making a compact machine learning inference library. These projects are MIT-licensed. Copyright (c) 2023 Georgi Gerganov")
ParagraphText("Thank you to OpenAI Whisper for the speech recognition model which is used for voice input. Whisper is MIT-licensed. Copyright (c) 2022 OpenAI")
ParagraphText("Thank you to Feather Icons for providing many of the icons seen in this app. Feather Icons is MIT-licensed. Copyright (c) 2013-2017 Cole Bemis")
}
}

View File

@ -137,6 +137,12 @@ fun HomeScreen(navController: NavHostController = rememberNavController()) {
) )
} }
NavigationItem(
title = "Credits",
style = NavigationItemStyle.MiscNoArrow,
navigate = { navController.navigate("credits") },
)
Spacer(modifier = Modifier.height(16.dp)) Spacer(modifier = Modifier.height(16.dp))