remove survery intro, will find better way
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
Title = "Welcome to the PM CLI Survey!"
|
||||
Description = "Thank you for taking the time to participate in our survey. Your feedback is crucial in helping us improve the PM CLI and make it a more effective tool for project management. Please read the following information about the PM CLI before proceeding with the survey."
|
||||
|
||||
[About]
|
||||
Title = "About the PM CLI"
|
||||
Description = "YO PM CLI is a tool designed to help you manage your projects more efficiently. It provides features such as task management, issue tracking, and team collaboration, all through a simple command-line interface."
|
||||
|
||||
[Disclaimer]
|
||||
Title = "Disclaimer"
|
||||
Description = "Please note that the PM CLI is currently in its early stages of development. We are actively seeking feedback to improve the tool, so your input is highly valuable to us. By participating in this survey, you agree to provide honest and constructive feedback to help shape the future of the PM CLI."
|
||||
@@ -1,56 +0,0 @@
|
||||
package forms
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
type Introduction struct {
|
||||
Title string
|
||||
Description string
|
||||
About struct {
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
Disclaimer struct {
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
}
|
||||
|
||||
func NewIntroduction(fs embed.FS) (Introduction, error) {
|
||||
var intro Introduction
|
||||
if _, err := toml.DecodeFS(fs, "assets/intro.toml", &intro); err != nil {
|
||||
return Introduction{}, err
|
||||
}
|
||||
|
||||
return intro, nil
|
||||
}
|
||||
|
||||
func (i Introduction) Run() error {
|
||||
fmt.Print("\033[H\033[2J")
|
||||
|
||||
form := huh.NewForm(
|
||||
huh.NewGroup(
|
||||
huh.NewNote().
|
||||
Title(i.Title).
|
||||
Description(i.Description),
|
||||
),
|
||||
huh.NewGroup(
|
||||
huh.NewNote().
|
||||
Title(i.About.Title).
|
||||
Description(i.About.Description),
|
||||
),
|
||||
huh.NewGroup(
|
||||
huh.NewNote().
|
||||
Title(i.Disclaimer.Title).
|
||||
Description(i.Disclaimer.Description),
|
||||
),
|
||||
).WithLayout(huh.LayoutStack).
|
||||
WithTheme(huh.ThemeBase16())
|
||||
|
||||
return form.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user