From 5be1938a8aca2f1a30531355d4f25dcc5839468e Mon Sep 17 00:00:00 2001 From: mnlg Date: Thu, 5 Aug 2021 16:53:20 +0200 Subject: [PATCH 01/43] Fix Gopher collections query --- database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.go b/database.go index f474ae9..3af063d 100644 --- a/database.go +++ b/database.go @@ -1688,7 +1688,7 @@ func (db *datastore) GetPublicCollections(hostName string) (*[]Collection, error FROM collections c LEFT JOIN users u ON u.id = c.owner_id WHERE c.privacy = 1 AND u.status = 0 - ORDER BY id ASC`) + ORDER BY title ASC`) if err != nil { log.Error("Failed selecting public collections: %v", err) return nil, impart.HTTPError{http.StatusInternalServerError, "Couldn't retrieve public collections."} From ae7e42e24e2d66142298bd4bdd3145b3619a0cc2 Mon Sep 17 00:00:00 2001 From: mnlg Date: Thu, 12 Aug 2021 20:23:44 +0200 Subject: [PATCH 02/43] Fix date format in anonymous posts --- database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database.go b/database.go index f474ae9..f441c46 100644 --- a/database.go +++ b/database.go @@ -1833,7 +1833,7 @@ func (db *datastore) GetAnonymousPosts(u *User, page int) (*[]PublicPost, error) if page > 0 { limitStr = fmt.Sprintf(" LIMIT %d, %d", start, pagePosts) } - rows, err := db.Query("SELECT id, view_count, title, created, updated, content FROM posts WHERE owner_id = ? AND collection_id IS NULL ORDER BY created DESC"+limitStr, u.ID) + rows, err := db.Query("SELECT id, view_count, title, language, created, updated, content FROM posts WHERE owner_id = ? AND collection_id IS NULL ORDER BY created DESC"+limitStr, u.ID) if err != nil { log.Error("Failed selecting from posts: %v", err) return nil, impart.HTTPError{http.StatusInternalServerError, "Couldn't retrieve user anonymous posts."} @@ -1843,7 +1843,7 @@ func (db *datastore) GetAnonymousPosts(u *User, page int) (*[]PublicPost, error) posts := []PublicPost{} for rows.Next() { p := Post{} - err = rows.Scan(&p.ID, &p.ViewCount, &p.Title, &p.Created, &p.Updated, &p.Content) + err = rows.Scan(&p.ID, &p.ViewCount, &p.Title, &p.Language, &p.Created, &p.Updated, &p.Content) if err != nil { log.Error("Failed scanning row: %v", err) break From cc69f9f2f1d69fdf7ea0159d7b7f3c43bd463a07 Mon Sep 17 00:00:00 2001 From: HeartDev <88726114+lt3Dev@users.noreply.github.com> Date: Sat, 21 Aug 2021 08:57:25 +0000 Subject: [PATCH 03/43] Templates: use relative URLs for static assets I noticed most asset links use relative URLs, except for a few. This commit remedies this inconsistency. OpenGraph embeds were not changed, because in my experience, some embed scrapers require absolute URLs. Motivation: The site I use has an onion and a clearnet version, and currently, visiting the onion loads fonts, styles, and the favicon over the clearnet. --- templates/base.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/base.tmpl b/templates/base.tmpl index 604d0ff..389f303 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -2,8 +2,8 @@ {{ template "head" . }} - - + + @@ -86,7 +86,7 @@ {{end}} {{else}} - {{if .WebFonts}}{{end}} + {{if .WebFonts}}{{end}} {{end}} {{end}} From 44bfd4573e2f1e6c20686b68cd336f321b836f4f Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 23 Aug 2021 14:07:25 -0400 Subject: [PATCH 04/43] Support keyboard navigation on pad publish target dropdown --- templates/pad.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pad.tmpl b/templates/pad.tmpl index 8da063e..aff281d 100644 --- a/templates/pad.tmpl +++ b/templates/pad.tmpl @@ -24,7 +24,7 @@ {{if not .SingleUser}}

{{end}}