Adds replies to Yoten
+9
-1
internal/db/comment.go
+9
-1
internal/db/comment.go
···).Scan(&comment.ID, &comment.Did, &comment.Rkey, &studySessionUriStr, &parentCommentUri, &comment.Body, &comment.IsDeleted, &createdAtStr)···
+97
-38
internal/server/handlers/comment.go
+97
-38
internal/server/handlers/comment.go
···············ex, _ := client.RepoGetRecord(r.Context(), "", yoten.FeedCommentNSID, user.Did, updatedComment.Rkey)·········
+2
internal/server/handlers/router.go
+2
internal/server/handlers/router.go
···
+23
-4
internal/server/handlers/study-session.go
+23
-4
internal/server/handlers/study-session.go
···commentFeed, err := db.GetCommentsForSession(h.Db, studySessionUri.String(), pageSize+1, int(offset))···
+21
-39
internal/server/views/partials/comment.templ
+21
-39
internal/server/views/partials/comment.templ
···{{ elementId := SanitiseHtmlId(fmt.Sprintf("comment-%s-%s", params.Comment.Did, params.Comment.Rkey)) }}···+hx-target={ fmt.Sprintf("#comment-body-%s-%s", SanitiseHtmlId(params.Comment.Did), SanitiseHtmlId(params.Comment.Rkey)) }···+id={ fmt.Sprintf("comment-body-%s-%s", SanitiseHtmlId(params.Comment.Did), SanitiseHtmlId(params.Comment.Rkey)) }+hx-get={ templ.URL(fmt.Sprintf("/comment/reply?root=%s&parent=%s", params.Comment.StudySessionUri.String(), params.Comment.CommentAt().String())) }
+8
-1
internal/server/views/partials/discussion.templ
+8
-1
internal/server/views/partials/discussion.templ
···
+9
-4
internal/server/views/partials/edit-comment.templ
+9
-4
internal/server/views/partials/edit-comment.templ
···-{{ elementId := SanitiseHtmlId(fmt.Sprintf("comment-%s-%s", params.Comment.Did, params.Comment.Rkey)) }}···+hx-target={ fmt.Sprintf("#comment-body-%s-%s", SanitiseHtmlId(params.Comment.Did), SanitiseHtmlId(params.Comment.Rkey)) }
+14
internal/server/views/partials/partials.go
+14
internal/server/views/partials/partials.go
······
+76
internal/server/views/partials/reply.templ
+76
internal/server/views/partials/reply.templ
···+<div id={ replyId } class="flex flex-col gap-3 pl-4 py-2 border-l-2 border-gray-200" x-init="lucide.createIcons()">+<div class="absolute flex flex-col right-0 mt-2 p-1 gap-1 rounded w-32 bg-bg-light border border-bg-dark">+hx-target={ fmt.Sprintf("#comment-body-%s-%s", SanitiseHtmlId(props.Reply.Did), SanitiseHtmlId(props.Reply.Rkey)) }+<i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i>+<i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i>+id={ fmt.Sprintf("comment-body-%s-%s", SanitiseHtmlId(props.Reply.Did), SanitiseHtmlId(props.Reply.Rkey)) }
+1
internal/server/views/study-session.templ
+1
internal/server/views/study-session.templ
+1
internal/db/notification.go
+1
internal/db/notification.go