Skip to content

Commit

Permalink
feat: better description and title for prompts (#105)
Browse files Browse the repository at this point in the history
y3owk1n authored Dec 8, 2024
1 parent 244ccad commit b4148f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/project.go
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit b4148f9

Please sign in to comment.