make it even more clear and add a line describing how to submit
This commit is contained in:
@@ -35,9 +35,7 @@ type Flags struct {
|
|||||||
var RootCmd = &cobra.Command{
|
var RootCmd = &cobra.Command{
|
||||||
Use: "pm",
|
Use: "pm",
|
||||||
Short: "Project Management User Interface Comparison CLI",
|
Short: "Project Management User Interface Comparison CLI",
|
||||||
Long: `Project Management User Interface Comparison CLI is a tool designed to evaluate and compare different project management interfaces through a series of tasks and surveys.
|
Long: `Project Management User Interface Comparison CLI is a tool designed to evaluate and compare different project management interfaces through a series of tasks and surveys.`,
|
||||||
|
|
||||||
Write 'exit' to skip this task.`,
|
|
||||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||||
// Inject app into context for all commands
|
// Inject app into context for all commands
|
||||||
if app != nil {
|
if app != nil {
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ func (m TaskModel) View() tea.View {
|
|||||||
style.TextStyle.Render(m.Description),
|
style.TextStyle.Render(m.Description),
|
||||||
"\n",
|
"\n",
|
||||||
style.TextStyle.Foreground(style.SecondaryColor).Render(detailsText),
|
style.TextStyle.Foreground(style.SecondaryColor).Render(detailsText),
|
||||||
|
style.ErrorStyle.Render(m.interfaceHelpText()),
|
||||||
|
style.ErrorStyle.Render(m.getQuitHelpText()),
|
||||||
)
|
)
|
||||||
|
|
||||||
if m.aboutVisible {
|
if m.aboutVisible {
|
||||||
@@ -109,7 +111,7 @@ func (m TaskModel) View() tea.View {
|
|||||||
|
|
||||||
b.WriteString("\n")
|
b.WriteString("\n")
|
||||||
|
|
||||||
helpText := "Press " + m.keys.Start.Help().Key + " to start • " + m.getQuitHelpText() + " • " + m.keys.About.Help().Key + " " + m.keys.About.Help().Desc
|
helpText := "Press " + m.keys.Start.Help().Key + " to start • " + m.keys.Quit.Help().Key + " to quit • " + m.keys.About.Help().Key + " " + m.keys.About.Help().Desc
|
||||||
b.WriteString(style.HelpStyle.Render(helpText))
|
b.WriteString(style.HelpStyle.Render(helpText))
|
||||||
|
|
||||||
final := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, b.String())
|
final := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, b.String())
|
||||||
@@ -132,6 +134,19 @@ func (m TaskModel) getQuitHelpText() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m TaskModel) interfaceHelpText() string {
|
||||||
|
switch m.InterfaceType {
|
||||||
|
case models.InterfaceTypeWeb:
|
||||||
|
return "Press the button in the upper right corner to view task progress and completion criteria"
|
||||||
|
case models.InterfaceTypeTUI:
|
||||||
|
return "Press Shift+S to view task progress and completion criteria"
|
||||||
|
case models.InterfaceTypeCLI, models.InterfaceTypeREPL:
|
||||||
|
return "Write 'status' to view task progress and completion criteria"
|
||||||
|
default:
|
||||||
|
return m.keys.Quit.Help().Key + " to quit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (m *TaskModel) SetSize(width, height int) {
|
func (m *TaskModel) SetSize(width, height int) {
|
||||||
m.width, m.height = width, height
|
m.width, m.height = width, height
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user