repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
6a6b81e
parent
cc24303
author
Eric Bower
date
2025-04-25 09:05:56 -0400 EDT
fix(tui): show truncated key

fix(prose): proper dates for rss feed
2 files changed,  +13, -2
M pkg/apps/prose/api.go
+8, -2
 1@@ -645,6 +645,11 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
 2 	curl := shared.CreateURLFromRequest(cfg, r)
 3 	blogUrl := cfg.FullBlogURL(curl, username)
 4 
 5+	updatedAt := &time.Time{}
 6+	if len(posts) > 0 {
 7+		updatedAt = posts[0].PublishAt
 8+	}
 9+
10 	feed := &feeds.Feed{
11 		Id:          blogUrl,
12 		Title:       headerTxt.Title,
13@@ -652,6 +657,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
14 		Description: headerTxt.Bio,
15 		Author:      &feeds.Author{Name: username},
16 		Created:     *user.CreatedAt,
17+		Updated:     *updatedAt,
18 	}
19 
20 	var feedItems []*feeds.Item
21@@ -690,8 +696,8 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
22 			Title:       utils.FilenameToTitle(post.Filename, post.Title),
23 			Link:        &feeds.Link{Href: realUrl},
24 			Content:     tpl.String(),
25-			Updated:     *post.UpdatedAt,
26-			Created:     *post.CreatedAt,
27+			Updated:     *post.PublishAt,
28+			Created:     *post.PublishAt,
29 			Description: post.Description,
30 		}
31 
M pkg/tui/pubkeys.go
+5, -0
 1@@ -108,11 +108,16 @@ func (m *PubkeysPage) getWidget(i uint, cursor uint) vxfw.Widget {
 2 		return nil
 3 	}
 4 
 5+	keyStr := pubkey.Key[0:25] + "..." + pubkey.Key[len(pubkey.Key)-15:]
 6+
 7 	txt := richtext.New([]vaxis.Segment{
 8 		{Text: "Name: ", Style: style},
 9 		{Text: pubkey.Name + "\n"},
10 
11 		{Text: "Key: ", Style: style},
12+		{Text: keyStr + "\n"},
13+
14+		{Text: "Sha: ", Style: style},
15 		{Text: ssh.FingerprintSHA256(key) + "\n"},
16 
17 		{Text: "Created: ", Style: style},