Compare commits
No commits in common. "1209ca13107eba05b3fa52a6e1ac8c802ee11622" and "d57c150cf3d66bf4e075bf731e28510e2fd77464" have entirely different histories.
1209ca1310
...
d57c150cf3
15
feed.go
15
feed.go
@ -30,7 +30,7 @@ func getActivityFeed() []Activity {
|
||||
feed := []Activity{}
|
||||
for _, server := range config.servers {
|
||||
client := Servers[server.servername]
|
||||
resp, err := http.Get(fmt.Sprintf("%s/api/v1/users/%s/activities/feeds?limit=15&page=1",
|
||||
resp, err := http.Get(fmt.Sprintf("%s/api/v1/users/%s/activities/feeds?limit=10&page=1",
|
||||
server.url,
|
||||
server.username,
|
||||
))
|
||||
@ -52,6 +52,17 @@ func getActivityFeed() []Activity {
|
||||
fmt.Println("Error getting user: "+fmt.Sprint(err))
|
||||
continue
|
||||
}
|
||||
// repo, _, err := client.GetRepo(
|
||||
// obj["repo"].
|
||||
// (map[string]interface{})["name"].(string),
|
||||
// obj["repo"].
|
||||
// (map[string]interface{})["owner"].
|
||||
// (map[string]interface{})["login"].(string),
|
||||
// )
|
||||
// if err != nil {
|
||||
// fmt.Println("Failed to get repository: "+fmt.Sprint(err))
|
||||
// continue
|
||||
// }
|
||||
var comment gitea.Comment
|
||||
if obj["comment"] != nil {
|
||||
raw_comment := obj["comment"].(map[string]interface{})
|
||||
@ -83,5 +94,3 @@ func getActivityFeed() []Activity {
|
||||
}
|
||||
return feed
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,9 +25,9 @@ type IndicatorInfo struct {
|
||||
|
||||
func (i IndicatorInfo) String() string {
|
||||
if i.duration == 0 {
|
||||
return styles.text.Render(strings.Repeat(".", 30))
|
||||
return textStyle.Render(strings.Repeat(".", 30))
|
||||
}
|
||||
return fmt.Sprintf("%s %s", styles.text.Render(i.duration.String()), i.info)
|
||||
return fmt.Sprintf("%s %s", textStyle.Render(i.duration.String()), i.info)
|
||||
}
|
||||
|
||||
func initialIndicator(text string) Indicator {
|
||||
|
@ -10,7 +10,6 @@ type Colors struct {
|
||||
}
|
||||
|
||||
type Styles struct {
|
||||
text lipgloss.Style
|
||||
}
|
||||
|
||||
var colors = Colors{
|
||||
@ -27,7 +26,3 @@ var colors = Colors{
|
||||
lipgloss.Color("#939ab7"),
|
||||
},
|
||||
}
|
||||
|
||||
var styles = Styles{
|
||||
text: lipgloss.NewStyle().Foreground(colors.surface[2]),
|
||||
}
|
||||
|
4
times.go
4
times.go
@ -59,6 +59,8 @@ func getTimeLogs(since time.Time, on_process_repo func(repo gitea.Repository, to
|
||||
return times
|
||||
}
|
||||
|
||||
var textStyle = lipgloss.NewStyle().Foreground(colors.surface[2])
|
||||
|
||||
type timesviewer struct {
|
||||
table table.Model
|
||||
length int
|
||||
@ -91,7 +93,7 @@ func (m timesviewer) View() string {
|
||||
Foreground(colors.overlay[0]).
|
||||
Bold(true)
|
||||
return m.table.View() +
|
||||
styles.text.Render("\nUse Up and Down arrows to navigate") +
|
||||
textStyle.Render("\nUse Up and Down arrows to navigate") +
|
||||
totalTextStyle.Render(fmt.Sprintf("\nTotal - %s\n", m.total_time.String()))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user