-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: conform to standards, remove dead code
- Loading branch information
Showing
16 changed files
with
86 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package controls | ||
|
||
import "github.com/charmbracelet/lipgloss" | ||
|
||
var controlStyle = func() lipgloss.Style { | ||
b := lipgloss.RoundedBorder() | ||
b.Left = "┤" | ||
b.Right = "├" | ||
return lipgloss.NewStyle(). | ||
BorderStyle(lipgloss.RoundedBorder()). | ||
BorderStyle(b) | ||
}() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package accounts | ||
|
||
import ( | ||
"github.com/algorandfoundation/hack-tui/internal" | ||
tea "github.com/charmbracelet/bubbletea" | ||
) | ||
|
||
// EmitAccountSelected waits for and retrieves a new set of table rows from a given channel. | ||
func EmitAccountSelected(account internal.Account) tea.Cmd { | ||
return func() tea.Msg { | ||
return account | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package accounts | ||
|
||
import "github.com/charmbracelet/lipgloss" | ||
|
||
var green = lipgloss.NewStyle().Foreground(lipgloss.Color("10")) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package generate | ||
|
||
import ( | ||
"fmt" | ||
"github.com/charmbracelet/lipgloss" | ||
) | ||
|
||
var ( | ||
focusedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) | ||
blurredStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("240")) | ||
cursorStyle = focusedStyle | ||
noStyle = lipgloss.NewStyle() | ||
helpStyle = blurredStyle | ||
cursorModeHelpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("244")) | ||
|
||
focusedButton = focusedStyle.Render("[ Submit ]") | ||
blurredButton = fmt.Sprintf("[ %s ]", blurredStyle.Render("Submit")) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package keys | ||
|
||
import ( | ||
"github.com/algorandfoundation/hack-tui/api" | ||
tea "github.com/charmbracelet/bubbletea" | ||
) | ||
|
||
type DeleteKey *api.ParticipationKey | ||
|
||
func EmitDeleteKey(key *api.ParticipationKey) tea.Cmd { | ||
return func() tea.Msg { | ||
return DeleteKey(key) | ||
} | ||
} | ||
|
||
// EmitKeySelected waits for and retrieves a new set of table rows from a given channel. | ||
func EmitKeySelected(key *api.ParticipationKey) tea.Cmd { | ||
return func() tea.Msg { | ||
return key | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package keys | ||
|
||
import "github.com/charmbracelet/lipgloss" | ||
|
||
var green = lipgloss.NewStyle().Foreground(lipgloss.Color("10")) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.