-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new list, go 1.17, bump deps (#17)
* wip: list Signed-off-by: Carlos Alexandro Becker <[email protected]> * wip: list Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: bugs Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: relative days Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: reset selection and filtering Signed-off-by: Carlos Alexandro Becker <[email protected]> * feat: custom spinner, more logs Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: do not propagate esc Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: rename msg Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: improving some conds Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: improve diff Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: timeago Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: cmds Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: help Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: remove replace Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: view improvements Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: today view tz Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: time Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: improve keys Signed-off-by: Carlos Alexandro Becker <[email protected]> * feat: bump deps Signed-off-by: Carlos Alexandro Becker <[email protected]> * feat: go 1.17 Signed-off-by: Carlos Alexandro Becker <[email protected]> * feat: go 1.17 Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: improve keymaps Signed-off-by: Carlos Alexandro Becker <[email protected]> * feat: deps Signed-off-by: Carlos Alexandro Becker <[email protected]>
- Loading branch information
Showing
7 changed files
with
278 additions
and
185 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
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 |
---|---|---|
@@ -1,14 +1,55 @@ | ||
module github.com/caarlos0/tasktimer | ||
|
||
go 1.16 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/charmbracelet/bubbles v0.8.0 | ||
github.com/charmbracelet/bubbletea v0.14.1 | ||
github.com/caarlos0/timea.go v1.0.2 | ||
github.com/charmbracelet/bubbles v0.9.0 | ||
github.com/charmbracelet/bubbletea v0.15.0 | ||
github.com/charmbracelet/glamour v0.3.0 | ||
github.com/charmbracelet/lipgloss v0.3.0 | ||
github.com/charmbracelet/lipgloss v0.4.0 | ||
github.com/dgraph-io/badger/v3 v3.2103.1 | ||
github.com/mattn/go-isatty v0.0.13 | ||
github.com/mattn/go-isatty v0.0.14 | ||
github.com/muesli/go-app-paths v0.2.1 | ||
github.com/spf13/cobra v1.2.1 | ||
) | ||
|
||
require ( | ||
github.com/alecthomas/chroma v0.8.2 // indirect | ||
github.com/atotto/clipboard v0.1.2 // indirect | ||
github.com/aymerick/douceur v0.2.0 // indirect | ||
github.com/cespare/xxhash v1.1.0 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.1 // indirect | ||
github.com/containerd/console v1.0.2 // indirect | ||
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect | ||
github.com/dgraph-io/ristretto v0.1.0 // indirect | ||
github.com/dlclark/regexp2 v1.4.0 // indirect | ||
github.com/dustin/go-humanize v1.0.0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect | ||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/golang/snappy v0.0.3 // indirect | ||
github.com/google/flatbuffers v1.12.0 // indirect | ||
github.com/gorilla/css v1.0.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/klauspost/compress v1.12.3 // indirect | ||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | ||
github.com/mattn/go-runewidth v0.0.13 // indirect | ||
github.com/microcosm-cc/bluemonday v1.0.6 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/muesli/reflow v0.3.0 // indirect | ||
github.com/muesli/termenv v0.9.0 // indirect | ||
github.com/olekukonko/tablewriter v0.0.5 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/rivo/uniseg v0.2.0 // indirect | ||
github.com/sahilm/fuzzy v0.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/yuin/goldmark v1.3.5 // indirect | ||
github.com/yuin/goldmark-emoji v1.0.1 // indirect | ||
go.opencensus.io v0.23.0 // indirect | ||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect | ||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect | ||
golang.org/x/term v0.0.0-20210422114643-f5beecf764ed // indirect | ||
google.golang.org/protobuf v1.26.0 // indirect | ||
) |
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 |
---|---|---|
@@ -1,37 +1,28 @@ | ||
package ui | ||
|
||
import "github.com/charmbracelet/lipgloss" | ||
import ( | ||
"github.com/charmbracelet/bubbles/list" | ||
"github.com/charmbracelet/lipgloss" | ||
) | ||
|
||
// light palette: https://colorhunt.co/palette/201882 | ||
// dark palette: https://colorhunt.co/palette/273948 | ||
var ( | ||
primaryColor = lipgloss.AdaptiveColor{ | ||
Light: "#1a1a2e", | ||
Dark: "#f7f3e9", | ||
} | ||
secondaryColor = lipgloss.AdaptiveColor{ | ||
Light: "#16213e", | ||
Dark: "#a3d2ca", | ||
} | ||
activeColor = lipgloss.AdaptiveColor{ | ||
Light: "#16213e", | ||
Dark: "#5eaaa8", | ||
} | ||
defaultStyles = list.NewDefaultItemStyles() | ||
|
||
activeColor = defaultStyles.SelectedTitle.GetForeground() | ||
secondaryColor = defaultStyles.NormalTitle.GetForeground() | ||
|
||
errorColor = lipgloss.AdaptiveColor{ | ||
Light: "#e94560", | ||
Dark: "#f05945", | ||
} | ||
|
||
secondaryForeground = lipgloss.NewStyle().Foreground(secondaryColor) | ||
primaryForegroundBold = lipgloss.NewStyle().Bold(true).Foreground(primaryColor) | ||
activeForeground = lipgloss.NewStyle().Bold(true).Foreground(activeColor) | ||
boldStyle = lipgloss.NewStyle().Bold(true) | ||
activeForegroundBold = lipgloss.NewStyle().Bold(true).Foreground(activeColor) | ||
errorFaintForeground = lipgloss.NewStyle().Foreground(errorColor).Faint(true) | ||
errorForegroundPadded = lipgloss.NewStyle().Padding(4).Foreground(errorColor) | ||
separator = secondaryForeground.Render(" • ") | ||
) | ||
|
||
const ( | ||
iconDone = "●" | ||
iconOngoing = "○" | ||
listStyle = lipgloss.NewStyle().Margin(6, 2, 0, 2) | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.