diff --git a/appview/pages/templates/fragments/pullActions.html b/appview/pages/templates/fragments/pullActions.html index 4af59429dcac08ad25b687dfcaf57702840cd1cb..7b1d560b318955dbe823cd363ad55aec31aa89ed 100644 --- a/appview/pages/templates/fragments/pullActions.html +++ b/appview/pages/templates/fragments/pullActions.html @@ -79,7 +79,7 @@ {{ end }} diff --git a/appview/pages/templates/repo/issues/issue.html b/appview/pages/templates/repo/issues/issue.html index 611d1707fa2d8f2d11c1f4c13dbb61cde5ad20fb..f083453d7d5caf4aeb324462bdbb61a4e9ba4a31 100644 --- a/appview/pages/templates/repo/issues/issue.html +++ b/appview/pages/templates/repo/issues/issue.html @@ -45,7 +45,7 @@ {{ end }} {{ define "repoAfter" }} {{ if gt (len .Comments) 0 }} -
+
{{ range $index, $comment := .Comments }}
-
+
{{ didOrHandle .LoggedInUser.Did .LoggedInUser.Handle }}
@@ -84,7 +83,6 @@ placeholder="Add to the discussion. Markdown is supported." onkeyup="updateCommentForm()" >
-
@@ -100,7 +98,7 @@ > {{ i "message-square-plus" "w-4 h-4" }} comment - + {{ $isIssueAuthor := and .LoggedInUser (eq .LoggedInUser.Did .Issue.OwnerDid) }} {{ $isRepoCollaborator := .RepoInfo.Roles.IsCollaborator }} {{ if and (or $isIssueAuthor $isRepoCollaborator) (eq .State "open") }} @@ -119,16 +117,30 @@ hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment" hx-trigger="click from:#close-button" hx-disabled-elt="#close-with-comment" hx-target="#issue-comment" - hx-vals="js:{body: document.getElementById('comment-textarea').value.trim() !== '' ? document.getElementById('comment-textarea').value : null}"> + hx-vals="js:{body: document.getElementById('comment-textarea').value.trim() !== '' ? document.getElementById('comment-textarea').value : ''}" + hx-swap="none" + >
+ hx-swap="none" + >
+ {{ else if and (or $isIssueAuthor $isRepoCollaborator) (eq .State "closed") }} {{ end }} - + {{ else }} -
+
login to join the discussion