Skip to content

Commit

Permalink
Don't create links when clicking "load more" on location stats
Browse files Browse the repository at this point in the history
Also remove some TODOs that don't need to be done.
  • Loading branch information
arp242 committed Jan 7, 2020
1 parent 2f96743 commit 910c892
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions handlers/backend.go
Expand Up @@ -502,7 +502,7 @@ func (h backend) locations(w http.ResponseWriter, r *http.Request) error {
}

f := zhttp.FuncMap["hbar_chart"].(func(goatcounter.BrowserStats, int, int, float32, bool) template.HTML)
tpl := f(locStat, total, total, 0, true)
tpl := f(locStat, total, total, 0, false)
return zhttp.JSON(w, map[string]interface{}{
"html": string(tpl),
})
Expand Down Expand Up @@ -613,7 +613,8 @@ func (h backend) saveSettings(w http.ResponseWriter, r *http.Request) error {
v.Append(ferr.Path(), "must be a number")

// TODO: we return here because formam stops decoding on the first
// error. We should really fix this, but it's an incompatible change.
// error. We should really fix this in formam, but it's an incompatible
// change.
return h.settingsTpl(w, r, &v)
}

Expand Down
1 change: 0 additions & 1 deletion memstore.go
Expand Up @@ -40,7 +40,6 @@ func (m *ms) Persist(ctx context.Context) ([]Hit, error) {
return nil, nil
}

// TODO: this could be a channel.
m.Lock()
hits := make([]Hit, len(m.hits))
copy(hits, m.hits)
Expand Down
2 changes: 0 additions & 2 deletions pack/pack.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions public/style_backend.css
Expand Up @@ -143,8 +143,6 @@ form .err { color: red; display: block; }
.chart { margin-bottom: 1em; }
}

/* TODO: doesn't show well on iPhone :-/ .go:after { content: "🡭"; } */

.chart > .top {
font-size: 13px;
line-height: 1;
Expand Down

0 comments on commit 910c892

Please sign in to comment.