From 5ff7bd93c4faa517233dd8f588cb958b67eb5848 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 23 Feb 2025 20:08:17 +0000 Subject: [PATCH] restore timeline and follow changes --- appview/db/db.go | 1 - appview/pages/templates/timeline.html | 62 +++++++++++++++------------ 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/appview/db/db.go b/appview/db/db.go index 07320b92..9f5d0f5a 100644 --- a/appview/db/db.go +++ b/appview/db/db.go @@ -60,7 +60,6 @@ func Make(dbPath string) (*DB, error) { create table if not exists follows ( user_did text not null, subject_did text not null, - at_uri text not null unique, rkey text not null, followed_at text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')), primary key (user_did, subject_did), diff --git a/appview/pages/templates/timeline.html b/appview/pages/templates/timeline.html index 7816e7a8..ed89fb6c 100644 --- a/appview/pages/templates/timeline.html +++ b/appview/pages/templates/timeline.html @@ -4,36 +4,44 @@

Timeline

{{ range .Timeline }} +
{{ if .Repo }} -
-
-
- {{ .Repo.Did }} created -
- div> -
{{ .Repo.Name }}
-
- - -
+ {{ $userHandle := index $.DidHandleMap .Repo.Did }} +
+

+ {{ $userHandle }} + created + {{ .Repo.Name }} + +

+
{{ else if .Follow }} -
-
-
- {{ .Follow.UserDid }} followed -
-
- {{ .Follow.SubjectDid }} -
-
- - -
+ {{ $userHandle := index $.DidHandleMap .Follow.UserDid }} + {{ $subjectHandle := index $.DidHandleMap .Follow.SubjectDid }} +
+

+ {{ $userHandle }} + followed + {{ $subjectHandle }} + +

+
{{ end }} +
{{ end }} {{ end }} -- knotmirror 0.0.1