diff --git a/main.go b/main.go index dfed9d2..7873cdf 100644 --- a/main.go +++ b/main.go @@ -5891,10 +5891,10 @@ func newSetupMenuModel(homeDir, username, organization string) setupMenuModel { username: username, organization: organization, choices: []menuChoice{ - {icon: "🔗", name: "Login with GitHub (OAuth)", description: ""}, - {icon: "🔑", name: "Login with Personal Access Token", description: ""}, - {icon: "📄", name: "Open configuration file", description: ""}, - {icon: "←", name: "Back", description: ""}, + {icon: "✨", name: "Login with code", description: "Recommended for organization owners"}, + {icon: "🔑", name: "Login with PAT", description: "Works without organization ownership"}, + {icon: "📝", name: "Advanced", description: "Edit configuration file"}, + {icon: "🔙", name: "Back", description: "Esc"}, }, cursor: 0, width: 80, @@ -5966,26 +5966,24 @@ func (m setupMenuModel) View() string { b.WriteString(renderTitleBar("🔧 Setup", m.username, m.organization, innerWidth) + "\n") b.WriteString("\n") - // Menu items + // Menu items - same format as Home screen + selectorStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("12")) // Blue selector for i, choice := range m.choices { cursor := " " - style := dimStyle + descStyle := dimStyle if m.cursor == i { - cursor = "> " - style = selectedStyle + cursor = selectorStyle.Render("â–ļ") + " " + descStyle = selectedStyle } - line := fmt.Sprintf("%s%s %s", cursor, choice.icon, choice.name) - b.WriteString(style.Render(line) + "\n") + // Pad name to 15 characters for alignment + paddedName := fmt.Sprintf("%-15s", choice.name) + // Name is always bold (titleStyle), description uses current selection style + b.WriteString(fmt.Sprintf("%s%s %s %s", cursor, choice.icon, titleStyle.Render(paddedName), descStyle.Render(choice.description))) if i < len(m.choices)-1 { - b.WriteString("\n") + b.WriteString("\n\n") } } - b.WriteString("\n") - - // Help text - b.WriteString(dimStyle.Render("Press Enter to select, Esc to go back") + "\n") - // Create border style borderStyle := lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). diff --git a/main.md b/main.md index 021fb9f..4c38bb6 100644 --- a/main.md +++ b/main.md @@ -111,26 +111,23 @@ The Setup submenu provides authentication and configuration options: ``` ╭────────────────────────────────────────────────────────────────╮ -│ GitHub Brain 1.0.0 / 🔧 Setup 👤 Not logged in │ -│ │ -│ > 🔗 Login with GitHub (OAuth) │ -│ 🔑 Login with Personal Access Token │ -│ 📄 Open configuration file │ -│ ← Back │ -│ │ -│ Press Enter to select, Esc to go back │ +│ GitHub Brain / 🔧 Setup 👤 Not logged in │ │ │ +│ â–ļ ✨ Login with code Recommended for organization owners │ +│ 🔑 Login with PAT Works without organization ownership │ +│ 📝 Advanced Edit configuration file │ +│ â†Šī¸ Back Esc │ ╰────────────────────────────────────────────────────────────────╯ ``` ### Setup Menu Items -1. **🔗 Login with GitHub (OAuth)** - Runs the OAuth device flow (see [OAuth Login](#oauth-login) section) -2. **🔑 Login with Personal Access Token** - Manually enter a PAT (see [PAT Login](#pat-login) section) -3. **📄 Open configuration file** - Opens `.env` file in default editor -4. **← Back** - Return to main menu +1. **✨ Login with code** - Recommended for organization owners. Runs the OAuth device flow (see [OAuth Login](#oauth-login) section) +2. **🔑 Login with PAT** - Works without organization ownership. Manually enter a PAT (see [PAT Login](#pat-login) section) +3. **📝 Advanced** - Edit configuration file `{HomeDir}/.env` +4. **â†Šī¸ Back** - Return to main menu (Esc) -### Open Configuration File +### Open Configuration File (Advanced) Opens the `.env` file located at `{HomeDir}/.env` using the system default editor: