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 -> {
|
||||
WelcomePage(
|
||||
tabViewModel = tabViewModel,
|
||||
onShowCloneDialog = { showSettingsDialog = true }
|
||||
onShowCloneDialog = { showCloneDialog = true },
|
||||
onShowSettings = { showSettingsDialog = true }
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import com.jetpackduba.gitnuro.viewmodels.TabViewModel
|
|||
fun WelcomePage(
|
||||
tabViewModel: TabViewModel,
|
||||
onShowCloneDialog: () -> Unit,
|
||||
onShowSettings: () -> Unit,
|
||||
) {
|
||||
val appStateManager = tabViewModel.appStateManager
|
||||
var showAdditionalInfo by remember { mutableStateOf(false) }
|
||||
|
@ -63,6 +64,7 @@ fun WelcomePage(
|
|||
tabViewModel = tabViewModel,
|
||||
onShowCloneView = onShowCloneDialog,
|
||||
onShowAdditionalInfo = { showAdditionalInfo = true },
|
||||
onShowSettings = onShowSettings,
|
||||
)
|
||||
|
||||
RecentRepositories(appStateManager, tabViewModel)
|
||||
|
@ -93,6 +95,7 @@ fun HomeButtons(
|
|||
tabViewModel: TabViewModel,
|
||||
onShowCloneView: () -> Unit,
|
||||
onShowAdditionalInfo: () -> Unit,
|
||||
onShowSettings: () -> Unit,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(end = 32.dp),
|
||||
|
@ -128,7 +131,7 @@ fun HomeButtons(
|
|||
)
|
||||
|
||||
Text(
|
||||
text = "About",
|
||||
text = "Additional options",
|
||||
style = MaterialTheme.typography.h3,
|
||||
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
|
||||
)
|
||||
|
@ -155,6 +158,12 @@ fun HomeButtons(
|
|||
onClick = onShowAdditionalInfo
|
||||
)
|
||||
|
||||
IconTextButton(
|
||||
title = "Settings",
|
||||
painter = painterResource("settings.svg"),
|
||||
onClick = onShowSettings
|
||||
)
|
||||
|
||||
if (newUpdate != null) {
|
||||
IconTextButton(
|
||||
title = "New update ${newUpdate.appVersion} available ",
|
||||
|
|
Loading…
Reference in a new issue