Fixed clone button and added settings option
This commit is contained in:
parent
c4ce272359
commit
7449bdf446
2 changed files with 12 additions and 2 deletions
|
@ -86,7 +86,8 @@ fun AppTab(
|
||||||
RepositorySelectionStatus.None -> {
|
RepositorySelectionStatus.None -> {
|
||||||
WelcomePage(
|
WelcomePage(
|
||||||
tabViewModel = tabViewModel,
|
tabViewModel = tabViewModel,
|
||||||
onShowCloneDialog = { showSettingsDialog = true }
|
onShowCloneDialog = { showCloneDialog = true },
|
||||||
|
onShowSettings = { showSettingsDialog = true }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ import com.jetpackduba.gitnuro.viewmodels.TabViewModel
|
||||||
fun WelcomePage(
|
fun WelcomePage(
|
||||||
tabViewModel: TabViewModel,
|
tabViewModel: TabViewModel,
|
||||||
onShowCloneDialog: () -> Unit,
|
onShowCloneDialog: () -> Unit,
|
||||||
|
onShowSettings: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val appStateManager = tabViewModel.appStateManager
|
val appStateManager = tabViewModel.appStateManager
|
||||||
var showAdditionalInfo by remember { mutableStateOf(false) }
|
var showAdditionalInfo by remember { mutableStateOf(false) }
|
||||||
|
@ -63,6 +64,7 @@ fun WelcomePage(
|
||||||
tabViewModel = tabViewModel,
|
tabViewModel = tabViewModel,
|
||||||
onShowCloneView = onShowCloneDialog,
|
onShowCloneView = onShowCloneDialog,
|
||||||
onShowAdditionalInfo = { showAdditionalInfo = true },
|
onShowAdditionalInfo = { showAdditionalInfo = true },
|
||||||
|
onShowSettings = onShowSettings,
|
||||||
)
|
)
|
||||||
|
|
||||||
RecentRepositories(appStateManager, tabViewModel)
|
RecentRepositories(appStateManager, tabViewModel)
|
||||||
|
@ -93,6 +95,7 @@ fun HomeButtons(
|
||||||
tabViewModel: TabViewModel,
|
tabViewModel: TabViewModel,
|
||||||
onShowCloneView: () -> Unit,
|
onShowCloneView: () -> Unit,
|
||||||
onShowAdditionalInfo: () -> Unit,
|
onShowAdditionalInfo: () -> Unit,
|
||||||
|
onShowSettings: () -> Unit,
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(end = 32.dp),
|
modifier = Modifier.padding(end = 32.dp),
|
||||||
|
@ -128,7 +131,7 @@ fun HomeButtons(
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "About",
|
text = "Additional options",
|
||||||
style = MaterialTheme.typography.h3,
|
style = MaterialTheme.typography.h3,
|
||||||
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
|
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
|
||||||
)
|
)
|
||||||
|
@ -155,6 +158,12 @@ fun HomeButtons(
|
||||||
onClick = onShowAdditionalInfo
|
onClick = onShowAdditionalInfo
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IconTextButton(
|
||||||
|
title = "Settings",
|
||||||
|
painter = painterResource("settings.svg"),
|
||||||
|
onClick = onShowSettings
|
||||||
|
)
|
||||||
|
|
||||||
if (newUpdate != null) {
|
if (newUpdate != null) {
|
||||||
IconTextButton(
|
IconTextButton(
|
||||||
title = "New update ${newUpdate.appVersion} available ",
|
title = "New update ${newUpdate.appVersion} available ",
|
||||||
|
|
Loading…
Reference in a new issue