A few bug-fixes and maintenance tasks (#30)
- Fixed a bug which was not properly detecting whether MacOS was in light mode. - Fixed a bug which was breaking filtering with the table-selection mode. - Upgraded bubble-tea.
This commit is contained in:
parent
efdc7f9e25
commit
f373a3313a
7 changed files with 90 additions and 33 deletions
|
|
@ -7,7 +7,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/lmika/audax/internal/common/ui/commandctrl"
|
||||
"github.com/lmika/audax/internal/common/ui/logging"
|
||||
"github.com/lmika/audax/internal/common/ui/osstyle"
|
||||
|
|
@ -115,27 +114,10 @@ func main() {
|
|||
)
|
||||
|
||||
// Pre-determine if layout has dark background. This prevents calls for creating a list to hang.
|
||||
lipgloss.HasDarkBackground()
|
||||
|
||||
osstyle.DetectCurrentScheme()
|
||||
|
||||
p := tea.NewProgram(model, tea.WithAltScreen())
|
||||
|
||||
// Pre-determine if layout has dark background. This prevents calls for creating a list to hang.
|
||||
if lipgloss.HasDarkBackground() {
|
||||
if colorScheme := osstyle.CurrentColorScheme(); colorScheme == osstyle.ColorSchemeLightMode {
|
||||
log.Printf("terminal reads dark but really in light mode")
|
||||
lipgloss.SetHasDarkBackground(true)
|
||||
} else {
|
||||
log.Printf("in dark background")
|
||||
}
|
||||
} else {
|
||||
if colorScheme := osstyle.CurrentColorScheme(); colorScheme == osstyle.ColorSchemeDarkMode {
|
||||
log.Printf("terminal reads light but really in dark mode")
|
||||
lipgloss.SetHasDarkBackground(true)
|
||||
} else {
|
||||
log.Printf("cannot detect system darkmode")
|
||||
}
|
||||
}
|
||||
|
||||
log.Println("launching")
|
||||
if err := p.Start(); err != nil {
|
||||
fmt.Printf("Alas, there's been an error: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue