From b4148f9d2e6538f6f14a9f22c5dadf1e657794ff Mon Sep 17 00:00:00 2001 From: Kyle Wong <62775956+y3owk1n@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:43:47 +0800 Subject: [PATCH] feat: better description and title for prompts (#105) --- core/project.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/project.go b/core/project.go index ee38989..c85725a 100644 --- a/core/project.go +++ b/core/project.go @@ -98,7 +98,7 @@ func SelectProject(projects []utils.Directory) (string, error) { form := huh.NewForm( huh.NewGroup( huh.NewSelect[string](). - Title("Choose a project"). + Title("Choose a project to copy from"). Options(generateProjectOptions(projects)...). Value(&selectedProject), )).WithTheme(baseTheme) @@ -219,7 +219,8 @@ func handleExistingFile(sourcePath, destinationPath string) error { form := huh.NewForm(huh.NewGroup( huh.NewConfirm(). - Title(fmt.Sprintf("%s exists, do you want to overwrite?", destinationPath)). + Title("File exists! Do you want to overwrite?"). + Description(fmt.Sprintf("File: %s", destinationPath)). Affirmative("Yes!"). Negative("No."). Value(&confirm), @@ -251,7 +252,8 @@ func ConfirmCwd() error { baseTheme := huh.ThemeBase() form := huh.NewForm(huh.NewGroup(huh.NewConfirm(). - Title(fmt.Sprintf("Is this your root directory to perform the backup? (%s)", dir)). + Title("Is this your root directory to perform the backup?"). + Description(fmt.Sprintf("Current Root Directory: %s", dir)). Affirmative("Yes!"). Negative("No."). Value(&confirm))).WithTheme(baseTheme)