feat: the changelog in the status pane, built in #12
No files matched your search
+2
-1
@@ -116,7 +116,8 @@ On top, the status pane (`0`) shows the version, a newer release and how
|
|||||||
your accounts are doing. Focused, the right pane lists more: the version
|
your accounts are doing. Focused, the right pane lists more: the version
|
||||||
and updates (`U`), each account (`L` on one that needs it signs in), the
|
and updates (`U`), each account (`L` on one that needs it signs in), the
|
||||||
config, state and cache files (`e` opens one in your editor), and links
|
config, state and cache files (`e` opens one in your editor), and links
|
||||||
to the docs, source and issues (`o` opens one), then the changelog of
|
to the docs, source, issues, releases and changelog (`o` opens one; on
|
||||||
|
the version or update, its release), then the changelog of
|
||||||
every release up to yours, built in so it needs no network: `/` filters
|
every release up to yours, built in so it needs no network: `/` filters
|
||||||
it (`/fixed`, `/search`). `y` copies any row.
|
it (`/fixed`, `/search`). `y` copies any row.
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,17 @@ func (m Model) statusFields() []panes.Field {
|
|||||||
out = append(out, f)
|
out = append(out, f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add(panes.Field{Label: "version", Value: cmpOr(m.versionLabel(), "dev")})
|
// A release's rows open its release page.
|
||||||
add(panes.Field{Label: "update", Value: m.updateStatus(), Info: m.newer == nil})
|
version := panes.Field{Label: "version", Value: cmpOr(m.versionLabel(), "dev")}
|
||||||
|
if strings.HasPrefix(version.Value, "v") {
|
||||||
|
version.URL = update.DefaultRepo + "/releases/tag/" + version.Value
|
||||||
|
}
|
||||||
|
add(version)
|
||||||
|
upd := panes.Field{Label: "update", Value: m.updateStatus(), Info: m.newer == nil}
|
||||||
|
if m.newer != nil {
|
||||||
|
upd.URL = update.DefaultRepo + "/releases/tag/" + m.newer.Tag
|
||||||
|
}
|
||||||
|
add(upd)
|
||||||
add(panes.Field{Label: "license", Value: "GPL-3.0-or-later · © 2026 Karl-Einar Bergstrøm", Info: true})
|
add(panes.Field{Label: "license", Value: "GPL-3.0-or-later · © 2026 Karl-Einar Bergstrøm", Info: true})
|
||||||
|
|
||||||
for i, p := range m.providers {
|
for i, p := range m.providers {
|
||||||
@@ -94,6 +103,8 @@ func (m Model) statusFields() []panes.Field {
|
|||||||
add(panes.Field{Label: "docs", Value: repo + "/…/docs", URL: update.DefaultRepo + "/src/branch/main/docs"})
|
add(panes.Field{Label: "docs", Value: repo + "/…/docs", URL: update.DefaultRepo + "/src/branch/main/docs"})
|
||||||
add(panes.Field{Label: "source", Value: repo, URL: update.DefaultRepo})
|
add(panes.Field{Label: "source", Value: repo, URL: update.DefaultRepo})
|
||||||
add(panes.Field{Label: "issues", Value: repo + "/issues", URL: update.DefaultRepo + "/issues"})
|
add(panes.Field{Label: "issues", Value: repo + "/issues", URL: update.DefaultRepo + "/issues"})
|
||||||
|
add(panes.Field{Label: "releases", Value: repo + "/releases", URL: update.DefaultRepo + "/releases"})
|
||||||
|
add(panes.Field{Label: "changelog", Value: repo + "/…/CHANGELOG.md", URL: update.DefaultRepo + "/src/branch/main/CHANGELOG.md"})
|
||||||
return append(out, m.changelog...)
|
return append(out, m.changelog...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user