From 1931b62baa4452616203ccbb356da72688bc4587 Mon Sep 17 00:00:00 2001 From: Winter Date: Sat, 16 Aug 2025 13:45:29 -0400 Subject: [PATCH] *.html: format with prettier Signed-off-by: Winter --- appview/pages/templates/errors/404.html | 6 +- appview/pages/templates/errors/500.html | 4 +- appview/pages/templates/errors/503.html | 9 +- appview/pages/templates/favicon.html | 44 +- appview/pages/templates/knots/dashboard.html | 17 +- .../knots/fragments/addMemberModal.html | 79 ++- .../knots/fragments/knotListing.html | 24 +- .../knots/fragments/knotListingFull.html | 36 +- .../templates/knots/fragments/secret.html | 8 +- appview/pages/templates/knots/index.html | 49 +- appview/pages/templates/layouts/base.html | 108 ++-- appview/pages/templates/layouts/footer.html | 120 ++-- appview/pages/templates/layouts/topbar.html | 127 ++-- appview/pages/templates/legal/privacy.html | 222 +++++-- appview/pages/templates/legal/terms.html | 152 ++++- appview/pages/templates/repo/blob.html | 162 ++--- appview/pages/templates/repo/branches.html | 199 ++++--- appview/pages/templates/repo/commit.html | 152 +++-- .../pages/templates/repo/compare/compare.html | 21 +- appview/pages/templates/repo/compare/new.html | 25 +- appview/pages/templates/repo/empty.html | 65 +- appview/pages/templates/repo/fork.html | 71 ++- .../templates/repo/fragments/artifact.html | 40 +- .../repo/fragments/cloneInstructions.html | 97 ++- .../repo/fragments/compareAllowPull.html | 42 +- .../templates/repo/fragments/compareForm.html | 117 ++-- .../pages/templates/repo/fragments/diff.html | 205 ++++--- .../repo/fragments/diffChangedFiles.html | 7 +- .../templates/repo/fragments/diffOpts.html | 20 +- .../repo/fragments/diffStatPill.html | 21 +- .../repo/fragments/editRepoDescription.html | 27 +- .../templates/repo/fragments/fileTree.html | 11 +- .../templates/repo/fragments/interdiff.html | 206 ++++--- .../repo/fragments/interdiffFiles.html | 17 +- .../pages/templates/repo/fragments/meta.html | 42 +- .../pages/templates/repo/fragments/og.html | 14 +- .../templates/repo/fragments/reaction.html | 49 +- .../repo/fragments/reactionsPopUp.html | 42 +- .../repo/fragments/repoDescription.html | 20 +- .../templates/repo/fragments/repoStar.html | 45 +- .../templates/repo/fragments/splitDiff.html | 171 ++++-- .../pages/templates/repo/fragments/time.html | 20 +- .../templates/repo/fragments/unifiedDiff.html | 124 ++-- appview/pages/templates/repo/index.html | 562 ++++++++++-------- .../issues/fragments/editIssueComment.html | 83 +-- .../repo/issues/fragments/issueComment.html | 93 +-- .../pages/templates/repo/issues/issue.html | 244 ++++---- .../pages/templates/repo/issues/issues.html | 176 +++--- appview/pages/templates/repo/issues/new.html | 64 +- appview/pages/templates/repo/log.html | 342 ++++++----- appview/pages/templates/repo/new.html | 105 ++-- .../repo/pipelines/fragments/logBlock.html | 33 +- .../repo/pipelines/fragments/logLine.html | 5 +- .../pipelines/fragments/pipelineSymbol.html | 31 +- .../repo/pipelines/fragments/tooltip.html | 49 +- .../templates/repo/pipelines/pipelines.html | 154 ++--- .../templates/repo/pipelines/workflow.html | 85 +-- .../repo/pulls/fragments/pullActions.html | 125 ++-- .../pulls/fragments/pullCompareBranches.html | 81 +-- .../pulls/fragments/pullCompareForks.html | 90 +-- .../fragments/pullCompareForksBranches.html | 42 +- .../repo/pulls/fragments/pullHeader.html | 127 ++-- .../repo/pulls/fragments/pullNewComment.html | 59 +- .../repo/pulls/fragments/pullPatchUpload.html | 36 +- .../repo/pulls/fragments/pullResubmit.html | 110 ++-- .../repo/pulls/fragments/pullStack.html | 37 +- .../pulls/fragments/summarizedPullHeader.html | 11 +- .../pulls/fragments/summarizedPullState.html | 1 - .../pages/templates/repo/pulls/interdiff.html | 43 +- appview/pages/templates/repo/pulls/new.html | 282 +++++---- appview/pages/templates/repo/pulls/patch.html | 73 +-- appview/pages/templates/repo/pulls/pull.html | 355 ++++++----- appview/pages/templates/repo/pulls/pulls.html | 265 +++++---- .../pages/templates/repo/settings/access.html | 83 +-- .../settings/fragments/secretListing.html | 23 +- .../repo/settings/fragments/sidebar.html | 22 +- .../templates/repo/settings/general.html | 60 +- .../templates/repo/settings/pipelines.html | 124 ++-- appview/pages/templates/repo/tree.html | 184 +++--- appview/pages/templates/settings.html | 315 +++++----- .../pages/templates/spindles/dashboard.html | 102 ++-- .../spindles/fragments/addMemberModal.html | 78 +-- .../spindles/fragments/spindleListing.html | 65 +- appview/pages/templates/spindles/index.html | 52 +- .../pages/templates/strings/dashboard.html | 38 +- .../templates/strings/fragments/form.html | 40 +- appview/pages/templates/strings/string.html | 61 +- appview/pages/templates/timeline.html | 203 ++++--- .../pages/templates/user/completeSignup.html | 182 +++--- .../templates/user/fragments/bluesky.html | 16 +- .../templates/user/fragments/editBio.html | 90 ++- .../templates/user/fragments/editPins.html | 77 ++- .../templates/user/fragments/follow.html | 17 +- .../templates/user/fragments/picHandle.html | 7 +- .../user/fragments/picHandleLink.html | 6 +- .../templates/user/fragments/profileCard.html | 103 ++-- .../templates/user/fragments/repoCard.html | 10 +- appview/pages/templates/user/login.html | 126 ++-- appview/pages/templates/user/profile.html | 175 ++++-- appview/pages/templates/user/repos.html | 28 +- appview/pages/templates/user/signup.html | 110 ++-- 101 files changed, 5216 insertions(+), 3981 deletions(-) diff --git a/appview/pages/templates/errors/404.html b/appview/pages/templates/errors/404.html index 1f8b2681..a9d4798a 100644 --- a/appview/pages/templates/errors/404.html +++ b/appview/pages/templates/errors/404.html @@ -1,8 +1,6 @@ {{ define "title" }}404 · tangled{{ end }} {{ define "content" }} -

404 — nothing like that here!

-

- It seems we couldn't find what you were looking for. Sorry about that! -

+

404 — nothing like that here!

+

It seems we couldn't find what you were looking for. Sorry about that!

{{ end }} diff --git a/appview/pages/templates/errors/500.html b/appview/pages/templates/errors/500.html index 14709f29..b932fcd8 100644 --- a/appview/pages/templates/errors/500.html +++ b/appview/pages/templates/errors/500.html @@ -1,6 +1,6 @@ {{ define "title" }}500 · tangled{{ end }} {{ define "content" }} -

500 — something broke!

-

We're working on getting service back up. Hang tight!

+

500 — something broke!

+

We're working on getting service back up. Hang tight!

{{ end }} diff --git a/appview/pages/templates/errors/503.html b/appview/pages/templates/errors/503.html index 17254799..78bfee2b 100644 --- a/appview/pages/templates/errors/503.html +++ b/appview/pages/templates/errors/503.html @@ -1,9 +1,8 @@ {{ define "title" }}503 · tangled{{ end }} {{ define "content" }} -

503 — unable to reach knot

-

- We were unable to reach the knot hosting this repository. Try again - later. -

+

503 — unable to reach knot

+

+ We were unable to reach the knot hosting this repository. Try again later. +

{{ end }} diff --git a/appview/pages/templates/favicon.html b/appview/pages/templates/favicon.html index a042c3fe..0c8019cd 100644 --- a/appview/pages/templates/favicon.html +++ b/appview/pages/templates/favicon.html @@ -1,26 +1,30 @@ {{ define "favicon" }} - - + + + + + + {{ end }} diff --git a/appview/pages/templates/knots/dashboard.html b/appview/pages/templates/knots/dashboard.html index 29595c2d..dcdb742d 100644 --- a/appview/pages/templates/knots/dashboard.html +++ b/appview/pages/templates/knots/dashboard.html @@ -14,10 +14,16 @@
{{ $style := "px-2 py-1 rounded flex items-center flex-shrink-0 gap-2" }} {{ if .Registration.Registered }} - {{ i "shield-check" "w-4 h-4" }} verified + + {{ i "shield-check" "w-4 h-4" }} verified + {{ template "knots/fragments/addMemberModal" .Registration }} {{ else }} - {{ i "shield-off" "w-4 h-4" }} pending + + {{ i "shield-off" "w-4 h-4" }} pending + {{ end }}
@@ -25,9 +31,10 @@ {{ if .Members }} -
+
- {{ block "knotMember" . }} {{ end }} + {{ block "knotMember" . }}{{ end }}
{{ end }} @@ -39,7 +46,7 @@
{{ template "user/fragments/picHandleLink" . }} - {{.}} + {{ . }}
diff --git a/appview/pages/templates/knots/fragments/addMemberModal.html b/appview/pages/templates/knots/fragments/addMemberModal.html index 5d4aa9e3..74c2560a 100644 --- a/appview/pages/templates/knots/fragments/addMemberModal.html +++ b/appview/pages/templates/knots/fragments/addMemberModal.html @@ -3,10 +3,9 @@ class="btn gap-2 group" title="Add member to this spindle" popovertarget="add-member-{{ .Id }}" - popovertargetaction="toggle" - > + popovertargetaction="toggle"> {{ i "user-plus" "w-5 h-5" }} - + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} @@ -14,45 +13,45 @@ id="add-member-{{ .Id }}" popover class="bg-white w-full md:w-96 dark:bg-gray-800 p-4 rounded border border-gray-200 dark:border-gray-700 drop-shadow dark:text-white backdrop:bg-gray-400/50 dark:backdrop:bg-gray-800/50"> - {{ block "addKnotMemberPopover" . }} {{ end }} + {{ block "addKnotMemberPopover" . }}{{ end }}
{{ end }} {{ define "addKnotMemberPopover" }} -
- -

Members can create repositories on this knot.

- -
- - -
-
-
+
+ +

+ Members can create repositories on this knot. +

+ +
+ + +
+
+
{{ end }} - diff --git a/appview/pages/templates/knots/fragments/knotListing.html b/appview/pages/templates/knots/fragments/knotListing.html index 8cdfac26..260a5c86 100644 --- a/appview/pages/templates/knots/fragments/knotListing.html +++ b/appview/pages/templates/knots/fragments/knotListing.html @@ -1,10 +1,10 @@ {{ define "knots/fragments/knotListing" }} -
- {{ block "listLeftSide" . }} {{ end }} - {{ block "listRightSide" . }} {{ end }} + {{ block "listLeftSide" . }}{{ end }} + {{ block "listRightSide" . }}{{ end }}
{{ end }} @@ -28,11 +28,17 @@
{{ $style := "px-2 py-1 rounded flex items-center flex-shrink-0 gap-2 text-sm" }} {{ if .Registered }} - {{ i "shield-check" "w-4 h-4" }} verified + + {{ i "shield-check" "w-4 h-4" }} verified + {{ template "knots/fragments/addMemberModal" . }} {{ else }} - {{ i "shield-off" "w-4 h-4" }} pending - {{ block "initializeButton" . }} {{ end }} + + {{ i "shield-off" "w-4 h-4" }} pending + + {{ block "initializeButton" . }}{{ end }} {{ end }}
{{ end }} @@ -41,11 +47,9 @@ {{ end }} - diff --git a/appview/pages/templates/knots/fragments/knotListingFull.html b/appview/pages/templates/knots/fragments/knotListingFull.html index 748402e0..af114f29 100644 --- a/appview/pages/templates/knots/fragments/knotListingFull.html +++ b/appview/pages/templates/knots/fragments/knotListingFull.html @@ -1,18 +1,22 @@ {{ define "knots/fragments/knotListingFull" }} -
-

your knots

-
- {{ range $knot := .Registrations }} - {{ template "knots/fragments/knotListing" . }} - {{ else }} -
- no knots registered yet -
- {{ end }} -
-
-
+
+

+ your knots +

+
+ {{ range $knot := .Registrations }} + {{ template "knots/fragments/knotListing" . }} + {{ else }} +
+ no knots registered yet +
+ {{ end }} +
+
+
{{ end }} diff --git a/appview/pages/templates/knots/fragments/secret.html b/appview/pages/templates/knots/fragments/secret.html index 385847c5..3fddd73a 100644 --- a/appview/pages/templates/knots/fragments/secret.html +++ b/appview/pages/templates/knots/fragments/secret.html @@ -3,8 +3,12 @@ id="secret" hx-swap-oob="true" class="bg-gray-50 dark:bg-gray-700 border border-black dark:border-gray-500 rounded px-6 py-2 w-full lg:w-3xl"> -

generated secret

-

Configure your knot to use this secret, and then hit initialize.

+

+ generated secret +

+

+ Configure your knot to use this secret, and then hit initialize. +

{{ .Secret }} {{ end }} diff --git a/appview/pages/templates/knots/index.html b/appview/pages/templates/knots/index.html index 8d9019ae..6e140d1e 100644 --- a/appview/pages/templates/knots/index.html +++ b/appview/pages/templates/knots/index.html @@ -1,26 +1,30 @@ {{ define "title" }}knots{{ end }} {{ define "content" }} -
-

Knots

-
- -
-
- {{ block "about" . }} {{ end }} - {{ template "knots/fragments/knotListingFull" . }} - {{ block "register" . }} {{ end }} +
+

Knots

-
+ +
+
+ {{ block "about" . }}{{ end }} + {{ template "knots/fragments/knotListingFull" . }} + {{ block "register" . }}{{ end }} +
+
{{ end }} {{ define "about" }}

- Knots are lightweight headless servers that enable users to host Git repositories with ease. - Knots are designed for either single or multi-tenant use which is perfect for self-hosting on a Raspberry Pi at home, or larger “community” servers. - When creating a repository, you can choose a knot to store it on. - + Knots are lightweight headless servers that enable users to host Git + repositories with ease. Knots are designed for either single or + multi-tenant use which is perfect for self-hosting on a Raspberry Pi at + home, or larger “community” servers. When creating a repository, you can + choose a knot to store it on. + Checkout the documentation if you're interested in self-hosting.

@@ -29,14 +33,17 @@ {{ define "register" }}
-

register a knot

-

Enter the hostname of your knot to generate a key.

+

+ register a knot +

+

+ Enter the hostname of your knot to generate a key. +

+ hx-swap="none">
+ class="flex-1 w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400 px-3 py-2 border rounded" />
+{{ end }} {{ define "topbarLayout" }}
@@ -92,14 +124,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfterLeft" . }}{{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
-
{{ end }}
{{ end }} @@ -112,7 +144,7 @@ {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} -{{end}} +{{ end }} {{ define "contentAfterLeft" }}
@@ -121,4 +153,4 @@
{{ template "repo/fragments/diffChangedFiles" .Diff }}
-{{end}} +{{ end }} diff --git a/appview/pages/templates/repo/compare/compare.html b/appview/pages/templates/repo/compare/compare.html index 384e0f52..32fba21d 100644 --- a/appview/pages/templates/repo/compare/compare.html +++ b/appview/pages/templates/repo/compare/compare.html @@ -1,5 +1,6 @@ {{ define "title" }} - comparing {{ .Base }} and {{ .Head }} on {{ .RepoInfo.FullName }} + comparing {{ .Base }} and {{ .Head }} on + {{ .RepoInfo.FullName }} {{ end }} {{ define "repoContent" }} @@ -23,14 +24,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfterLeft" . }}{{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
-
{{ end }}
{{ end }} @@ -43,7 +44,7 @@ {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} -{{end}} +{{ end }} {{ define "contentAfterLeft" }}
@@ -52,4 +53,4 @@
{{ template "repo/fragments/diffChangedFiles" .Diff }}
-{{end}} +{{ end }} diff --git a/appview/pages/templates/repo/compare/new.html b/appview/pages/templates/repo/compare/new.html index 8270be63..ab9947ea 100644 --- a/appview/pages/templates/repo/compare/new.html +++ b/appview/pages/templates/repo/compare/new.html @@ -1,5 +1,6 @@ {{ define "title" }} - compare refs on {{ .RepoInfo.FullName }} + compare refs on + {{ .RepoInfo.FullName }} {{ end }} {{ define "repoContent" }} @@ -9,21 +10,27 @@ {{ define "repoAfter" }} {{ $brs := take .Branches 5 }} {{ if $brs }} -
+

- Recently updated branches in this repository: + Recently updated branches in this repository:

-
{{ end }} diff --git a/appview/pages/templates/repo/empty.html b/appview/pages/templates/repo/empty.html index 7190f132..72e72973 100644 --- a/appview/pages/templates/repo/empty.html +++ b/appview/pages/templates/repo/empty.html @@ -1,8 +1,8 @@ {{ define "title" }}{{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} - {{ template "repo/fragments/meta" . }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} + {{ template "repo/fragments/meta" . }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} {{ end }} {{ define "repoContent" }} @@ -10,41 +10,72 @@ {{ if gt (len .BranchesTrunc) 0 }}

- This branch is empty. Other branches in this repository are populated: + This branch is empty. Other branches in this repository are populated:

- {{ else if (and .LoggedInUser (eq .LoggedInUser.Did .RepoInfo.OwnerDid)) }} {{ $knot := .RepoInfo.Knot }} {{ if eq $knot "knot1.tangled.sh" }} - {{ $knot = "tangled.sh" }} + {{ $knot = "tangled.sh" }} {{ end }}

This is an empty repository. To get started:

{{ $bullet := "mx-2 text-xs bg-gray-200 dark:bg-gray-600 rounded-full size-5 flex items-center justify-center font-mono inline-flex align-middle" }} -

1First, generate a new SSH key pair.

-

2Then add the public key to your account from the settings page.

-

3Configure your remote to git@{{ $knot }}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}

-

4Push!

+ +

+ 1 + First, generate a new + + SSH key pair + + . +

+

+ 2 + Then add the public key to your account from the + settings + page. +

+

+ 3 + Configure your remote to + + git@{{ $knot }}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} + +

+

+ 4 + Push! +

{{ else }} -

This is an empty repository.

+

+ This is an empty repository. +

{{ end }} {{ end }} {{ define "repoAfter" }} - {{ template "repo/fragments/cloneInstructions" . }} + {{ template "repo/fragments/cloneInstructions" . }} {{ end }} diff --git a/appview/pages/templates/repo/fork.html b/appview/pages/templates/repo/fork.html index cb1b81bb..81d42861 100644 --- a/appview/pages/templates/repo/fork.html +++ b/appview/pages/templates/repo/fork.html @@ -1,38 +1,47 @@ {{ define "title" }}fork · {{ .RepoInfo.FullName }}{{ end }} {{ define "content" }} -
-

Fork {{ .RepoInfo.FullName }}

-
-
- -
- Select a knot to fork into -
-
- {{ range .Knots }} -
- - {{ . }} +
+

+ Fork {{ .RepoInfo.FullName }} +

+
+
+ +
+ Select a knot to fork into +
+
+ {{ range .Knots }} +
+ + {{ . }} +
+ {{ else }} +

No knots available.

+ {{ end }}
- {{ else }} -

No knots available.

- {{ end }}
-
-

A knot hosts repository data. Learn how to register your own knot.

-
+

+ A knot hosts repository data. + + Learn how to register your own knot. + +

+ -
- -
-
- -
+
+ +
+
+ +
{{ end }} diff --git a/appview/pages/templates/repo/fragments/artifact.html b/appview/pages/templates/repo/fragments/artifact.html index b4d98b7c..4f854081 100644 --- a/appview/pages/templates/repo/fragments/artifact.html +++ b/appview/pages/templates/repo/fragments/artifact.html @@ -1,20 +1,34 @@ {{ define "repo/fragments/artifact" }} -{{ $unique := .Artifact.BlobCid.String }} -
-
- {{ i "box" "w-4 h-4" }} - - {{ .Artifact.Name }} - - {{ byteFmt .Artifact.Size }} -
+ {{ $unique := .Artifact.BlobCid.String }} +
+
+ {{ i "box" "w-4 h-4" }} + + {{ .Artifact.Name }} + + + {{ byteFmt .Artifact.Size }} + +
-
- - {{ template "repo/fragments/shortTime" .Artifact.CreatedAt }} +
+ + + {{ template "repo/fragments/shortTime" .Artifact.CreatedAt }} + - + {{ if and .LoggedInUser (eq .LoggedInUser.Did .Artifact.Did) }}
{{ end }} diff --git a/appview/pages/templates/repo/fragments/compareAllowPull.html b/appview/pages/templates/repo/fragments/compareAllowPull.html index 870a3a9e..00f99149 100644 --- a/appview/pages/templates/repo/fragments/compareAllowPull.html +++ b/appview/pages/templates/repo/fragments/compareAllowPull.html @@ -1,28 +1,26 @@ {{ define "repo/fragments/compareAllowPull" }} -
-

- This comparison can be turned into a pull request to be reviewed and - discussed. -

+
+

+ This comparison can be turned into a pull request to be reviewed and + discussed. +

- {{ $newPullUrl := printf "/%s/pulls/new?strategy=branch&targetBranch=%s&sourceBranch=%s" .RepoInfo.FullName .Base .Head }} + {{ $newPullUrl := printf "/%s/pulls/new?strategy=branch&targetBranch=%s&sourceBranch=%s" .RepoInfo.FullName .Base .Head }} - + +
{{ end }} diff --git a/appview/pages/templates/repo/fragments/compareForm.html b/appview/pages/templates/repo/fragments/compareForm.html index 32c26dbd..f37c379e 100644 --- a/appview/pages/templates/repo/fragments/compareForm.html +++ b/appview/pages/templates/repo/fragments/compareForm.html @@ -1,73 +1,82 @@ {{ define "repo/fragments/compareForm" }} -
-

- Compare changes -

-

Choose any two refs to compare.

+
+

+ Compare changes +

+

Choose any two refs to compare.

-
-
- - {{ block "dropdown" (list $ "base" $.Base) }} {{ end }} -
- - {{ i "arrow-left" "w-4 h-4" }} - -
- - {{ block "dropdown" (list $ "head" $.Head) }} {{ end }} -
- -
-
- + // Run once on page load + toggleButtonState(); + {{ end }} {{ define "dropdown" }} -{{ $root := index . 0 }} -{{ $name := index . 1 }} -{{ $default := index . 2 }} - {{ range $root.Branches }} - {{ end }} - - {{ range $root.Tags }} - - {{ else }} - - {{ end }} - + + {{ range $root.Tags }} + + {{ else }} + + {{ end }} + {{ end }} diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html index 34da43cf..a966d4fe 100644 --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -10,98 +10,147 @@ {{ $parent := $commit.Parent }} {{ $last := sub (len $diff) 1 }} +
{{ range $idx, $hunk := $diff }} {{ with $hunk }} -
-
-
-
- -
-
-
- {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} - {{ if .IsNew }} - ADDED - {{ else if .IsDelete }} - DELETED - {{ else if .IsCopy }} - COPIED - {{ else if .IsRename }} - RENAMED - {{ else }} - MODIFIED - {{ end }} +
+
+
+
+ +
+
+
+ {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} + {{ if .IsNew }} + + ADDED + + {{ else if .IsDelete }} + + DELETED + + {{ else if .IsCopy }} + + COPIED + + {{ else if .IsRename }} + + RENAMED + + {{ else }} + + MODIFIED + + {{ end }} + + {{ template "repo/fragments/diffStatPill" .Stats }} +
- {{ template "repo/fragments/diffStatPill" .Stats }} +
+ {{ if .IsDelete }} + + {{ .Name.Old }} + + {{ else if (or .IsCopy .IsRename) }} + + {{ .Name.Old }} + + {{ i "arrow-right" "w-4 h-4" }} + + {{ .Name.New }} + + {{ else }} + + {{ .Name.New }} + + {{ end }} +
-
- {{ if .IsDelete }} - - {{ .Name.Old }} - - {{ else if (or .IsCopy .IsRename) }} - - {{ .Name.Old }} - - {{ i "arrow-right" "w-4 h-4" }} - - {{ .Name.New }} - - {{ else }} - - {{ .Name.New }} + {{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }} +
+ + {{ i "arrow-up-to-line" "w-4 h-4" }} + {{ if gt $idx 0 }} + {{ $prev := index $diff (sub $idx 1) }} + + {{ i "arrow-up" "w-4 h-4" }} + + {{ end }} + + {{ if lt $idx $last }} + {{ $next := index $diff (add $idx 1) }} + + {{ i "arrow-down" "w-4 h-4" }} + {{ end }}
+
- {{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }} -
- {{ i "arrow-up-to-line" "w-4 h-4" }} - {{ if gt $idx 0 }} - {{ $prev := index $diff (sub $idx 1) }} - {{ i "arrow-up" "w-4 h-4" }} - {{ end }} - - {{ if lt $idx $last }} - {{ $next := index $diff (add $idx 1) }} - {{ i "arrow-down" "w-4 h-4" }} +
+ {{ if .IsDelete }} +

+ This file has been deleted. +

+ {{ else if .IsCopy }} +

+ This file has been copied. +

+ {{ else if .IsBinary }} +

+ This is a binary file and will not be displayed. +

+ {{ else }} + {{ if $isSplit }} + {{- template "repo/fragments/splitDiff" .Split -}} + {{ else }} + {{- template "repo/fragments/unifiedDiff" . -}} {{ end }} -
- + {{- end -}}
-
- -
- {{ if .IsDelete }} -

- This file has been deleted. -

- {{ else if .IsCopy }} -

- This file has been copied. -

- {{ else if .IsBinary }} -

- This is a binary file and will not be displayed. -

- {{ else }} - {{ if $isSplit }} - {{- template "repo/fragments/splitDiff" .Split -}} - {{ else }} - {{- template "repo/fragments/unifiedDiff" . -}} - {{ end }} - {{- end -}} -
- -
- + +
-
-
+
{{ end }} {{ end }} diff --git a/appview/pages/templates/repo/fragments/diffChangedFiles.html b/appview/pages/templates/repo/fragments/diffChangedFiles.html index 34c43029..46bc78c1 100644 --- a/appview/pages/templates/repo/fragments/diffChangedFiles.html +++ b/appview/pages/templates/repo/fragments/diffChangedFiles.html @@ -1,10 +1,13 @@ {{ define "repo/fragments/diffChangedFiles" }} {{ $stat := .Stat }} {{ $fileTree := fileTree .ChangedFiles }} -
+
- Changed files + + Changed files + {{ template "repo/fragments/diffStatPill" $stat }}
{{ template "repo/fragments/fileTree" $fileTree }} diff --git a/appview/pages/templates/repo/fragments/diffOpts.html b/appview/pages/templates/repo/fragments/diffOpts.html index d6d0db0b..9ecdcaf3 100644 --- a/appview/pages/templates/repo/fragments/diffOpts.html +++ b/appview/pages/templates/repo/fragments/diffOpts.html @@ -1,12 +1,14 @@ {{ define "repo/fragments/diffOpts" }} -
+
options {{ $active := "unified" }} {{ if .Split }} {{ $active = "split" }} {{ end }} {{ $values := list "unified" "split" }} - {{ block "tabSelector" (dict "Name" "diff" "Values" $values "Active" $active) }} {{ end }} + {{ block "tabSelector" (dict "Name" "diff" "Values" $values "Active" $active) }} + {{ end }}
{{ end }} @@ -14,14 +16,20 @@ {{ $name := .Name }} {{ $all := .Values }} {{ $active := .Active }} -
+
{{ $activeTab := "bg-white dark:bg-gray-700 shadow-sm" }} {{ $inactiveTab := "bg-gray-100 dark:bg-gray-800 shadow-inner" }} {{ range $index, $value := $all }} {{ $isActive := eq $value $active }} - - {{ $value }} + + {{ $value }} {{ end }}
diff --git a/appview/pages/templates/repo/fragments/diffStatPill.html b/appview/pages/templates/repo/fragments/diffStatPill.html index 4ebbf745..76bb4d6d 100644 --- a/appview/pages/templates/repo/fragments/diffStatPill.html +++ b/appview/pages/templates/repo/fragments/diffStatPill.html @@ -1,13 +1,24 @@ {{ define "repo/fragments/diffStatPill" }}
{{ if and .Insertions .Deletions }} - +{{ .Insertions }} - -{{ .Deletions }} + + +{{ .Insertions }} + + + -{{ .Deletions }} + {{ else if .Insertions }} - +{{ .Insertions }} + + +{{ .Insertions }} + {{ else if .Deletions }} - -{{ .Deletions }} + + -{{ .Deletions }} + {{ end }}
{{ end }} - diff --git a/appview/pages/templates/repo/fragments/editRepoDescription.html b/appview/pages/templates/repo/fragments/editRepoDescription.html index 85d6b8c1..8f39037a 100644 --- a/appview/pages/templates/repo/fragments/editRepoDescription.html +++ b/appview/pages/templates/repo/fragments/editRepoDescription.html @@ -1,11 +1,24 @@ {{ define "repo/fragments/editRepoDescription" }} -
- - - -
+ {{ end }} diff --git a/appview/pages/templates/repo/fragments/fileTree.html b/appview/pages/templates/repo/fragments/fileTree.html index 3453c208..ae176860 100644 --- a/appview/pages/templates/repo/fragments/fileTree.html +++ b/appview/pages/templates/repo/fragments/fileTree.html @@ -4,7 +4,9 @@ {{ i "folder" "flex-shrink-0 size-4 fill-current" }} - {{ .Name }} + + {{ .Name }} +
@@ -16,7 +18,11 @@ {{ else if .Name }}
{{ i "file" "flex-shrink-0 size-4" }} - {{ .Name }} + + {{ .Name }} +
{{ else }} {{ range $child := .Children }} @@ -24,4 +30,3 @@ {{ end }} {{ end }} {{ end }} - diff --git a/appview/pages/templates/repo/fragments/interdiff.html b/appview/pages/templates/repo/fragments/interdiff.html index d66d73c9..26969beb 100644 --- a/appview/pages/templates/repo/fragments/interdiff.html +++ b/appview/pages/templates/repo/fragments/interdiff.html @@ -1,92 +1,134 @@ {{ define "repo/fragments/interdiff" }} -{{ $repo := index . 0 }} -{{ $x := index . 1 }} -{{ $opts := index . 2 }} -{{ $fileTree := fileTree $x.AffectedFiles }} -{{ $diff := $x.Files }} -{{ $last := sub (len $diff) 1 }} -{{ $isSplit := $opts.Split }} + {{ $repo := index . 0 }} + {{ $x := index . 1 }} + {{ $opts := index . 2 }} + {{ $fileTree := fileTree $x.AffectedFiles }} + {{ $diff := $x.Files }} + {{ $last := sub (len $diff) 1 }} + {{ $isSplit := $opts.Split }} -
- {{ range $idx, $hunk := $diff }} - {{ with $hunk }} -
-
-
-
- -
-
-
- {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} - {{ if .Status.IsOk }} - CHANGED - {{ else if .Status.IsUnchanged }} - UNCHANGED - {{ else if .Status.IsOnlyInOne }} - REVERTED - {{ else if .Status.IsOnlyInTwo }} - NEW - {{ else if .Status.IsRebased }} - REBASED - {{ else }} - ERROR - {{ end }} -
- -
+
+ {{ range $idx, $hunk := $diff }} + {{ with $hunk }} +
+
+
+
+ +
+
+
+ {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} + {{ if .Status.IsOk }} + + CHANGED + + {{ else if .Status.IsUnchanged }} + + UNCHANGED + + {{ else if .Status.IsOnlyInOne }} + + REVERTED + + {{ else if .Status.IsOnlyInTwo }} + + NEW + + {{ else if .Status.IsRebased }} + + REBASED + + {{ else }} + + ERROR + + {{ end }} +
- {{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }} -
- {{ i "arrow-up-to-line" "w-4 h-4" }} - {{ if gt $idx 0 }} - {{ $prev := index $diff (sub $idx 1) }} - {{ i "arrow-up" "w-4 h-4" }} - {{ end }} + +
- {{ if lt $idx $last }} - {{ $next := index $diff (add $idx 1) }} - {{ i "arrow-down" "w-4 h-4" }} - {{ end }} -
+ {{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" }} +
+ + {{ i "arrow-up-to-line" "w-4 h-4" }} + + {{ if gt $idx 0 }} + {{ $prev := index $diff (sub $idx 1) }} + + {{ i "arrow-up" "w-4 h-4" }} + + {{ end }} -
-
+ {{ if lt $idx $last }} + {{ $next := index $diff (add $idx 1) }} + + {{ i "arrow-down" "w-4 h-4" }} + + {{ end }} +
+
+
-
- {{ if .Status.IsUnchanged }} -

- This file has not been changed. -

- {{ else if .Status.IsRebased }} -

- This patch was likely rebased, as context lines do not match. -

- {{ else if .Status.IsError }} -

- Failed to calculate interdiff for this file. -

- {{ else }} - {{ if $isSplit }} - {{- template "repo/fragments/splitDiff" .Split -}} - {{ else }} - {{- template "repo/fragments/unifiedDiff" . -}} - {{ end }} - {{- end -}} +
+ {{ if .Status.IsUnchanged }} +

+ This file has not been changed. +

+ {{ else if .Status.IsRebased }} +

+ This patch was likely rebased, as context lines do not + match. +

+ {{ else if .Status.IsError }} +

+ Failed to calculate interdiff for this file. +

+ {{ else }} + {{ if $isSplit }} + {{- template "repo/fragments/splitDiff" .Split -}} + {{ else }} + {{- template "repo/fragments/unifiedDiff" . -}} + {{ end }} + {{- end -}} +
+
- - - -
-
-
+
+
+ {{ end }} {{ end }} - {{ end }} - + {{ end }} - diff --git a/appview/pages/templates/repo/fragments/interdiffFiles.html b/appview/pages/templates/repo/fragments/interdiffFiles.html index 26d3d995..20674af4 100644 --- a/appview/pages/templates/repo/fragments/interdiffFiles.html +++ b/appview/pages/templates/repo/fragments/interdiffFiles.html @@ -1,11 +1,12 @@ {{ define "repo/fragments/interdiffFiles" }} -{{ $fileTree := fileTree .AffectedFiles }} -
-
-
- files + {{ $fileTree := fileTree .AffectedFiles }} +
+
+
+ files +
+ {{ template "repo/fragments/fileTree" $fileTree }}
- {{ template "repo/fragments/fileTree" $fileTree }} -
-
+
{{ end }} diff --git a/appview/pages/templates/repo/fragments/meta.html b/appview/pages/templates/repo/fragments/meta.html index 2fb0dd36..162ebf82 100644 --- a/appview/pages/templates/repo/fragments/meta.html +++ b/appview/pages/templates/repo/fragments/meta.html @@ -1,26 +1,20 @@ {{ define "repo/fragments/meta" }} - - - - - - + + + + + + {{ end }} diff --git a/appview/pages/templates/repo/fragments/og.html b/appview/pages/templates/repo/fragments/og.html index 88131589..c549a825 100644 --- a/appview/pages/templates/repo/fragments/og.html +++ b/appview/pages/templates/repo/fragments/og.html @@ -1,11 +1,11 @@ {{ define "repo/fragments/og" }} - {{ $title := or .Title .RepoInfo.FullName }} - {{ $description := or .Description .RepoInfo.Description }} - {{ $url := or .Url (printf "https://tangled.sh/%s" .RepoInfo.FullName) }} + {{ $title := or .Title .RepoInfo.FullName }} + {{ $description := or .Description .RepoInfo.Description }} + {{ $url := or .Url (printf "https://tangled.sh/%s" .RepoInfo.FullName) }} - - - - + + + + {{ end }} diff --git a/appview/pages/templates/repo/fragments/reaction.html b/appview/pages/templates/repo/fragments/reaction.html index c9d032fd..70c3bfb7 100644 --- a/appview/pages/templates/repo/fragments/reaction.html +++ b/appview/pages/templates/repo/fragments/reaction.html @@ -1,34 +1,27 @@ {{ define "repo/fragments/reaction" }} - + {{ if .IsReacted }} + hx-delete="/react?subject={{ .ThreadAt }}&kind={{ .Kind }}" + {{ else }} + hx-post="/react?subject={{ .ThreadAt }}&kind={{ .Kind }}" + {{ end }} + hx-swap="outerHTML" + hx-trigger="click from:(#reactBtn-{{ .Kind }}, #reactIndi-{{ .Kind }})" + hx-disabled-elt="this"> + {{ .Kind }} + {{ .Count }} + {{ end }} diff --git a/appview/pages/templates/repo/fragments/reactionsPopUp.html b/appview/pages/templates/repo/fragments/reactionsPopUp.html index 1464d3fa..0043a408 100644 --- a/appview/pages/templates/repo/fragments/reactionsPopUp.html +++ b/appview/pages/templates/repo/fragments/reactionsPopUp.html @@ -1,30 +1,24 @@ {{ define "repo/fragments/reactionsPopUp" }} -
- + - {{ i "smile" "size-4" }} - -
- {{ range $kind := . }} - - {{ end }} -
-
+ cursor-pointer list-none"> + {{ i "smile" "size-4" }} + +
+ {{ range $kind := . }} + + {{ end }} +
+ {{ end }} diff --git a/appview/pages/templates/repo/fragments/repoDescription.html b/appview/pages/templates/repo/fragments/repoDescription.html index 3d4685a1..4203c43d 100644 --- a/appview/pages/templates/repo/fragments/repoDescription.html +++ b/appview/pages/templates/repo/fragments/repoDescription.html @@ -1,15 +1,21 @@ {{ define "repo/fragments/repoDescription" }} - + {{ if .RepoInfo.Description }} - {{ .RepoInfo.Description }} + {{ .RepoInfo.Description }} {{ else }} - this repo has no description + this repo has no description {{ end }} {{ if .RepoInfo.Roles.IsOwner }} - + {{ end }} - + {{ end }} diff --git a/appview/pages/templates/repo/fragments/repoStar.html b/appview/pages/templates/repo/fragments/repoStar.html index 7ca59a95..76db9fce 100644 --- a/appview/pages/templates/repo/fragments/repoStar.html +++ b/appview/pages/templates/repo/fragments/repoStar.html @@ -1,26 +1,25 @@ {{ define "repo/fragments/repoStar" }} - + hx-trigger="click" + hx-target="this" + hx-swap="outerHTML" + hx-disabled-elt="#starBtn"> + {{ if .IsStarred }} + {{ i "star" "w-4 h-4 fill-current" }} + {{ else }} + {{ i "star" "w-4 h-4" }} + {{ end }} + + {{ .Stats.StarCount }} + + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} + {{ end }} diff --git a/appview/pages/templates/repo/fragments/splitDiff.html b/appview/pages/templates/repo/fragments/splitDiff.html index 1fe3c9a4..32e119ff 100644 --- a/appview/pages/templates/repo/fragments/splitDiff.html +++ b/appview/pages/templates/repo/fragments/splitDiff.html @@ -1,61 +1,116 @@ {{ define "repo/fragments/splitDiff" }} -{{ $name := .Id }} -{{- $lineNrStyle := "min-w-[3.5rem] flex-shrink-0 select-none text-right bg-white dark:bg-gray-800" -}} -{{- $linkStyle := "text-gray-400 dark:text-gray-500 hover:underline" -}} -{{- $lineNrSepStyle := "pr-2 border-r border-gray-200 dark:border-gray-700" -}} -{{- $containerStyle := "flex min-w-full items-center target:border target:rounded-sm target:border-yellow-200 target:dark:border-yellow-700 scroll-mt-20" -}} -{{- $emptyStyle := "bg-gray-200/30 dark:bg-gray-700/30" -}} -{{- $addStyle := "bg-green-100 dark:bg-green-800/30 text-green-700 dark:text-green-400" -}} -{{- $delStyle := "bg-red-100 dark:bg-red-800/30 text-red-700 dark:text-red-400 " -}} -{{- $ctxStyle := "bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400" -}} -{{- $opStyle := "w-5 flex-shrink-0 select-none text-center" -}} -
-
{{- range .TextFragments -}}
···
- {{- range .LeftLines -}} - {{- if .IsEmpty -}} -
-
-
- -
- {{- else if eq .Op.String "-" -}} -
- -
{{ .Op.String }}
-
{{ .Content }}
-
- {{- else if eq .Op.String " " -}} -
- -
{{ .Op.String }}
-
{{ .Content }}
-
- {{- end -}} - {{- end -}} - {{- end -}}
+ {{ $name := .Id }} + {{- $lineNrStyle := "min-w-[3.5rem] flex-shrink-0 select-none text-right bg-white dark:bg-gray-800" -}} + {{- $linkStyle := "text-gray-400 dark:text-gray-500 hover:underline" -}} + {{- $lineNrSepStyle := "pr-2 border-r border-gray-200 dark:border-gray-700" -}} + {{- $containerStyle := "flex min-w-full items-center target:border target:rounded-sm target:border-yellow-200 target:dark:border-yellow-700 scroll-mt-20" -}} + {{- $emptyStyle := "bg-gray-200/30 dark:bg-gray-700/30" -}} + {{- $addStyle := "bg-green-100 dark:bg-green-800/30 text-green-700 dark:text-green-400" -}} + {{- $delStyle := "bg-red-100 dark:bg-red-800/30 text-red-700 dark:text-red-400 " -}} + {{- $ctxStyle := "bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400" -}} + {{- $opStyle := "w-5 flex-shrink-0 select-none text-center" -}} +
+
{{- range .TextFragments -}} +
+ ··· +
+ {{- range .LeftLines -}} + {{- if .IsEmpty -}} +
+
+ +
+
+ +
+ +
+ {{- else if eq .Op.String "-" -}} +
+ +
{{ .Op.String }}
+
{{ .Content }}
+
+ {{- else if eq .Op.String " " -}} +
+ +
{{ .Op.String }}
+
{{ .Content }}
+
+ {{- end -}} + {{- end -}} + {{- end -}} +
-
{{- range .TextFragments -}}
···
- {{- range .RightLines -}} - {{- if .IsEmpty -}} -
-
-
- -
- {{- else if eq .Op.String "+" -}} -
- -
{{ .Op.String }}
-
{{ .Content }}
-
- {{- else if eq .Op.String " " -}} -
- -
{{ .Op.String }}
-
{{ .Content }}
-
- {{- end -}} - {{- end -}} - {{- end -}}
-
+
{{- range .TextFragments -}} +
+ ··· +
+ {{- range .RightLines -}} + {{- if .IsEmpty -}} +
+
+ +
+
+ +
+ +
+ {{- else if eq .Op.String "+" -}} +
+ +
{{ .Op.String }}
+
{{ .Content }}
+
+ {{- else if eq .Op.String " " -}} +
+ +
{{ .Op.String }}
+
{{ .Content }}
+
+ {{- end -}} + {{- end -}} + {{- end -}}
+
{{ end }} diff --git a/appview/pages/templates/repo/fragments/time.html b/appview/pages/templates/repo/fragments/time.html index 1e2521a3..9d83e9cc 100644 --- a/appview/pages/templates/repo/fragments/time.html +++ b/appview/pages/templates/repo/fragments/time.html @@ -1,19 +1,27 @@ {{ define "repo/fragments/timeWrapper" }} - + {{ end }} {{ define "repo/fragments/time" }} -{{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (. | relTimeFmt)) }} + {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (. | relTimeFmt)) }} {{ end }} {{ define "repo/fragments/shortTime" }} -{{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (. | shortRelTimeFmt)) }} + {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (. | shortRelTimeFmt)) }} {{ end }} {{ define "repo/fragments/shortTimeAgo" }} -{{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (print (. | shortRelTimeFmt) " ago")) }} + {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" (print (. | shortRelTimeFmt) " ago")) }} {{ end }} {{ define "repo/fragments/duration" }} - -{{ end }} \ No newline at end of file + +{{ end }} diff --git a/appview/pages/templates/repo/fragments/unifiedDiff.html b/appview/pages/templates/repo/fragments/unifiedDiff.html index e036410d..66ea2653 100644 --- a/appview/pages/templates/repo/fragments/unifiedDiff.html +++ b/appview/pages/templates/repo/fragments/unifiedDiff.html @@ -1,47 +1,81 @@ {{ define "repo/fragments/unifiedDiff" }} -{{ $name := .Id }} -
{{- range .TextFragments -}}
···
- {{- $oldStart := .OldPosition -}} - {{- $newStart := .NewPosition -}} - {{- $lineNrStyle := "min-w-[3.5rem] flex-shrink-0 select-none text-right bg-white dark:bg-gray-800 target:bg-yellow-200 target:dark:bg-yellow-600" -}} - {{- $linkStyle := "text-gray-400 dark:text-gray-500 hover:underline" -}} - {{- $lineNrSepStyle1 := "" -}} - {{- $lineNrSepStyle2 := "pr-2 border-r border-gray-200 dark:border-gray-700" -}} - {{- $containerStyle := "flex min-w-full items-center target:border target:rounded-sm target:border-yellow-200 target:dark:border-yellow-700 scroll-mt-20" -}} - {{- $addStyle := "bg-green-100 dark:bg-green-800/30 text-green-700 dark:text-green-400 " -}} - {{- $delStyle := "bg-red-100 dark:bg-red-800/30 text-red-700 dark:text-red-400 " -}} - {{- $ctxStyle := "bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400" -}} - {{- $opStyle := "w-5 flex-shrink-0 select-none text-center" -}} - {{- range .Lines -}} - {{- if eq .Op.String "+" -}} -
-
- -
{{ .Op.String }}
-
{{ .Line }}
-
- {{- $newStart = add64 $newStart 1 -}} - {{- end -}} - {{- if eq .Op.String "-" -}} -
- -
-
{{ .Op.String }}
-
{{ .Line }}
-
- {{- $oldStart = add64 $oldStart 1 -}} - {{- end -}} - {{- if eq .Op.String " " -}} -
- - -
{{ .Op.String }}
-
{{ .Line }}
-
- {{- $newStart = add64 $newStart 1 -}} - {{- $oldStart = add64 $oldStart 1 -}} - {{- end -}} - {{- end -}} - {{- end -}}
+ {{ $name := .Id }} +
{{- range .TextFragments -}} +
+ ··· +
+ {{- $oldStart := .OldPosition -}} + {{- $newStart := .NewPosition -}} + {{- $lineNrStyle := "min-w-[3.5rem] flex-shrink-0 select-none text-right bg-white dark:bg-gray-800 target:bg-yellow-200 target:dark:bg-yellow-600" -}} + {{- $linkStyle := "text-gray-400 dark:text-gray-500 hover:underline" -}} + {{- $lineNrSepStyle1 := "" -}} + {{- $lineNrSepStyle2 := "pr-2 border-r border-gray-200 dark:border-gray-700" -}} + {{- $containerStyle := "flex min-w-full items-center target:border target:rounded-sm target:border-yellow-200 target:dark:border-yellow-700 scroll-mt-20" -}} + {{- $addStyle := "bg-green-100 dark:bg-green-800/30 text-green-700 dark:text-green-400 " -}} + {{- $delStyle := "bg-red-100 dark:bg-red-800/30 text-red-700 dark:text-red-400 " -}} + {{- $ctxStyle := "bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400" -}} + {{- $opStyle := "w-5 flex-shrink-0 select-none text-center" -}} + {{- range .Lines -}} + {{- if eq .Op.String "+" -}} +
+
+ +
+ +
{{ .Op.String }}
+
{{ .Line }}
+
+ {{- $newStart = add64 $newStart 1 -}} + {{- end -}} + {{- if eq .Op.String "-" -}} +
+ +
+ +
+
{{ .Op.String }}
+
{{ .Line }}
+
+ {{- $oldStart = add64 $oldStart 1 -}} + {{- end -}} + {{- if eq .Op.String " " -}} +
+ + +
{{ .Op.String }}
+
{{ .Line }}
+
+ {{- $newStart = add64 $newStart 1 -}} + {{- $oldStart = add64 $oldStart 1 -}} + {{- end -}} + {{- end -}} + {{- end -}}
{{ end }} - diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html index f7c5bdcc..9c6ff146 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -1,133 +1,137 @@ {{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }} - {{ define "extrameta" }} - {{ template "repo/fragments/meta" . }} + {{ template "repo/fragments/meta" . }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} {{ end }} {{ define "repoContent" }} -
- {{ if .Languages }} - {{ block "repoLanguages" . }}{{ end }} - {{ end }} - -
- {{ block "fileTree" . }}{{ end }} - {{ block "rightInfo" . }}{{ end }} -
-
+
+ {{ if .Languages }} + {{ block "repoLanguages" . }}{{ end }} + {{ end }} + +
+ {{ block "fileTree" . }}{{ end }} + {{ block "rightInfo" . }}{{ end }} +
+
{{ end }} {{ define "repoLanguages" }} -
- {{ range $value := .Languages }} -
- {{ end }} -
+
+ {{ range $value := .Languages }} +
+ {{ end }} +
{{ end }} - {{ define "branchSelector" }}
- {{ $isOwner := and .LoggedInUser .RepoInfo.Roles.IsOwner }} - {{ $isCollaborator := and .LoggedInUser .RepoInfo.Roles.IsCollaborator }} - {{ if and (or $isOwner $isCollaborator) .ForkInfo .ForkInfo.IsFork }} + {{ $isOwner := and .LoggedInUser .RepoInfo.Roles.IsOwner }} + {{ $isCollaborator := and .LoggedInUser .RepoInfo.Roles.IsCollaborator }} + {{ if and (or $isOwner $isCollaborator) .ForkInfo .ForkInfo.IsFork }} {{ $disabled := "" }} {{ $title := "" }} {{ if eq .ForkInfo.Status 0 }} - {{ $disabled = "disabled" }} - {{ $title = "This branch is not behind the upstream" }} + {{ $disabled = "disabled" }} + {{ $title = "This branch is not behind the upstream" }} {{ else if eq .ForkInfo.Status 2 }} - {{ $disabled = "disabled" }} - {{ $title = "This branch has conflicts that must be resolved" }} + {{ $disabled = "disabled" }} + {{ $title = "This branch has conflicts that must be resolved" }} {{ else if eq .ForkInfo.Status 3 }} - {{ $disabled = "disabled" }} - {{ $title = "This branch does not exist on the upstream" }} + {{ $disabled = "disabled" }} + {{ $title = "This branch does not exist on the upstream" }} {{ end }} + - {{ end }} - - {{ i "git-compare" "w-4 h-4" }} - + {{ end }} + + {{ i "git-compare" "w-4 h-4" }} +
-
+ {{ end }} {{ define "fileTree" }} -
+
{{ $linkstyle := "no-underline hover:underline dark:text-white" }} {{ range .Files }} @@ -152,7 +156,11 @@
@@ -161,149 +169,176 @@ {{ end }} {{ define "rightInfo" }} - + {{ end }} {{ define "commitLog" }} -
- -
- {{ range .CommitsTrunc }} -
-
- {{ $messageParts := splitN .Message "\n\n" 2 }} -
-
-
- {{ index $messageParts 0 }} - {{ if gt (len $messageParts) 1 }} +
+ +
+ {{ range .CommitsTrunc }} +
+
+ {{ $messageParts := splitN .Message "\n\n" 2 }} +
+
+
+ + {{ index $messageParts 0 }} + + {{ if gt (len $messageParts) 1 }} - - {{ end }} -
+ + {{ end }} +
{{ if gt (len $messageParts) 1 }} - + {{ end }} +
+
-
-
- -
- {{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} - {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} - {{ if $verified }} + +
+ {{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} + {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} + {{ if $verified }} {{ $hashStyle = "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 rounded" }} - {{ end }} - - - {{ slice .Hash.String 0 8 }} - {{ if $verified }} - {{ i "shield-check" "w-3 h-3" }} - {{ end }} + {{ end }} + + + {{ slice .Hash.String 0 8 }} + {{ if $verified }} + {{ i "shield-check" "w-3 h-3" }} + {{ end }} - - - - {{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }} - {{ if $didOrHandle }} - {{ template "user/fragments/picHandleLink" $didOrHandle }} - {{ else }} - {{ .Author.Name }} - {{ end }} - -
- {{ template "repo/fragments/time" .Committer.When }} + + + + {{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }} + + {{ if $didOrHandle }} + {{ template "user/fragments/picHandleLink" $didOrHandle }} + {{ else }} + {{ .Author.Name }} + {{ end }} + + +
+ {{ template "repo/fragments/time" .Committer.When }} - - {{ $tagsForCommit := index $.TagMap .Hash.String }} - {{ if gt (len $tagsForCommit) 0 }} -
- {{ end }} - {{ range $tagsForCommit }} - - {{ . }} - - {{ end }} - - {{ $pipeline := index $.Pipelines .Hash.String }} - {{ if and $pipeline (gt (len $pipeline.Statuses) 0) }} -
- {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }} - {{ end }} -
+ + {{ $tagsForCommit := index $.TagMap .Hash.String }} + {{ if gt (len $tagsForCommit) 0 }} +
+ {{ end }} + {{ range $tagsForCommit }} + + {{ . }} + + {{ end }} + + + + {{ $pipeline := index $.Pipelines .Hash.String }} + {{ if and $pipeline (gt (len $pipeline.Statuses) 0) }} +
+ {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }} + {{ end }} +
+
+ {{ end }}
- {{ end }}
-
{{ end }} {{ define "branchList" }} {{ if gt (len .BranchesTrunc) 0 }} -
- +
+ {{ i "git-branch" "w-4 h-4" }} branches - {{ len .Branches }} + + {{ len .Branches }} +
{{ range .BranchesTrunc }} -
-
- - {{ .Reference.Name }} - - {{ if .Commit }} - - {{ template "repo/fragments/time" .Commit.Committer.When }} - {{ end }} - {{ if .IsDefault }} - - default +
+
+ + {{ .Reference.Name }} + + {{ if .Commit }} + + + {{ template "repo/fragments/time" .Commit.Committer.When }} + + {{ end }} + {{ if .IsDefault }} + + + default + + {{ end }} +
+ {{ if ne $.Ref .Reference.Name }} + + {{ i "git-compare" "w-3 h-3" }} compare + {{ end }}
- {{ if ne $.Ref .Reference.Name }} - - {{ i "git-compare" "w-3 h-3" }} compare - - {{ end }} -
{{ end }}
@@ -312,34 +347,50 @@ {{ define "tagList" }} {{ if gt (len .TagsTrunc) 0 }} -
+
{{ range $idx, $tag := .TagsTrunc }} - {{ with $tag }} -
- -
- {{ with .Tag }} - {{ template "repo/fragments/time" .Tagger.When }} - {{ end }} - {{ if eq $idx 0 }} - {{ with .Tag }}{{ end }} - latest - {{ end }} -
-
- {{ end }} + {{ with $tag }} +
+ +
+ {{ with .Tag }} + + {{ template "repo/fragments/time" .Tagger.When }} + + {{ end }} + {{ if eq $idx 0 }} + {{ with .Tag }} + + {{ end }} + + latest + + {{ end }} +
+
+ {{ end }} {{ end }}
@@ -347,22 +398,25 @@ {{ end }} {{ define "repoAfter" }} - {{- if or .HTMLReadme .Readme -}} -
-
{{- if .Raw -}}
+  {{- if or .HTMLReadme .Readme -}}
+    
+
+ {{- if .Raw -}} +
                         {{- .Readme -}}
-                    
- {{- else -}} - {{ .HTMLReadme }} - {{- end -}}
-
- {{- end -}} +
+ {{- else -}} + {{ .HTMLReadme }} + {{- end -}} +
+
+ {{- end -}} - {{ template "repo/fragments/cloneInstructions" . }} + {{ template "repo/fragments/cloneInstructions" . }} {{ end }} diff --git a/appview/pages/templates/repo/issues/fragments/editIssueComment.html b/appview/pages/templates/repo/issues/fragments/editIssueComment.html index 5b62a8ac..735cf203 100644 --- a/appview/pages/templates/repo/issues/fragments/editIssueComment.html +++ b/appview/pages/templates/repo/issues/fragments/editIssueComment.html @@ -1,51 +1,56 @@ {{ define "repo/issues/fragments/editIssueComment" }} {{ with .Comment }} -
-
- {{ $owner := didOrHandle $.LoggedInUser.Did $.LoggedInUser.Handle }} - {{ $owner }} +
+
+ {{ $owner := didOrHandle $.LoggedInUser.Did $.LoggedInUser.Handle }} + + {{ $owner }} + - - {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} - {{ if $isIssueAuthor }} - - author - {{ end }} + + {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} + {{ if $isIssueAuthor }} + + author + {{ end }} - - + - {{ template "repo/fragments/time" .Created }} - + {{ template "repo/fragments/time" .Created }} + - - - -
+ + + +
-
- +
+ +
-
{{ end }} {{ end }} - diff --git a/appview/pages/templates/repo/issues/fragments/issueComment.html b/appview/pages/templates/repo/issues/fragments/issueComment.html index 27376710..74ed4cbe 100644 --- a/appview/pages/templates/repo/issues/fragments/issueComment.html +++ b/appview/pages/templates/repo/issues/fragments/issueComment.html @@ -1,58 +1,61 @@ {{ define "repo/issues/fragments/issueComment" }} {{ with .Comment }} -
-
- {{ template "user/fragments/picHandleLink" .OwnerDid }} +
+
+ {{ template "user/fragments/picHandleLink" .OwnerDid }} + + + + {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} + {{ if $isIssueAuthor }} + + author + {{ end }} - - {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} - {{ if $isIssueAuthor }} - - author - {{ end }} - - + - {{ if .Deleted }} - deleted {{ template "repo/fragments/time" .Deleted }} - {{ else if .Edited }} - edited {{ template "repo/fragments/time" .Edited }} - {{ else }} - {{ template "repo/fragments/time" .Created }} + {{ if .Deleted }} + deleted + {{ template "repo/fragments/time" .Deleted }} + {{ else if .Edited }} + edited + {{ template "repo/fragments/time" .Edited }} + {{ else }} + {{ template "repo/fragments/time" .Created }} + {{ end }} + + + {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} + {{ if and $isCommentOwner (not .Deleted) }} + + {{ end }} - - {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} - {{ if and $isCommentOwner (not .Deleted) }} - - +
+ {{ if not .Deleted }} +
+ {{ .Body | markdown }} +
{{ end }} - -
- {{ if not .Deleted }} -
- {{ .Body | markdown }}
- {{ end }} -
{{ end }} {{ end }} diff --git a/appview/pages/templates/repo/issues/issue.html b/appview/pages/templates/repo/issues/issue.html index 9dc9a65a..e5336200 100644 --- a/appview/pages/templates/repo/issues/issue.html +++ b/appview/pages/templates/repo/issues/issue.html @@ -1,138 +1,143 @@ -{{ define "title" }}{{ .Issue.Title }} · issue #{{ .Issue.IssueId }} · {{ .RepoInfo.FullName }}{{ end }} - +{{ define "title" }} + {{ .Issue.Title }} · issue #{{ .Issue.IssueId }} · + {{ .RepoInfo.FullName }} +{{ end }} {{ define "extrameta" }} - {{ $title := printf "%s · issue #%d · %s" .Issue.Title .Issue.IssueId .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/issues/%d" .RepoInfo.FullName .Issue.IssueId }} + {{ $title := printf "%s · issue #%d · %s" .Issue.Title .Issue.IssueId .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/issues/%d" .RepoInfo.FullName .Issue.IssueId }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} -
-

+
+

{{ .Issue.Title }} - #{{ .Issue.IssueId }} -

-
- - {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} - {{ $icon := "ban" }} - {{ if eq .State "open" }} - {{ $bgColor = "bg-green-600 dark:bg-green-700" }} - {{ $icon = "circle-dot" }} - {{ end }} + + #{{ .Issue.IssueId }} + +

+
+ + {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} + {{ $icon := "ban" }} + {{ if eq .State "open" }} + {{ $bgColor = "bg-green-600 dark:bg-green-700" }} + {{ $icon = "circle-dot" }} + {{ end }} -
-
-
- {{ i $icon "w-4 h-4 mr-1.5 text-white" }} - {{ .State }} -
- - opened by - {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} - {{ template "user/fragments/picHandleLink" $owner }} - - {{ template "repo/fragments/time" .Issue.Created }} - -
- {{ if .Issue.Body }} -
- {{ .Issue.Body | markdown }} -
- {{ end }} +
+
+
+ {{ i $icon "w-4 h-4 mr-1.5 text-white" }} + {{ .State }} +
+ + opened by + {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} + {{ template "user/fragments/picHandleLink" $owner }} + + {{ template "repo/fragments/time" .Issue.Created }} + +
-
- {{ template "repo/fragments/reactionsPopUp" .OrderedReactionKinds }} - {{ range $kind := .OrderedReactionKinds }} - {{ - template "repo/fragments/reaction" - (dict - "Kind" $kind - "Count" (index $.Reactions $kind) - "IsReacted" (index $.UserReacted $kind) - "ThreadAt" $.Issue.IssueAt) - }} - {{ end }} -
-
+ {{ if .Issue.Body }} +
+ {{ .Issue.Body | markdown }} +
+ {{ end }} + + +
+ {{ template "repo/fragments/reactionsPopUp" .OrderedReactionKinds }} + {{ range $kind := .OrderedReactionKinds }} + {{ template "repo/fragments/reaction" + (dict + "Kind" $kind + "Count" (index $.Reactions $kind) + "IsReacted" (index $.UserReacted $kind) + "ThreadAt" $.Issue.IssueAt) + }} + {{ end }} +
+
{{ end }} {{ define "repoAfter" }} -
- {{ range $index, $comment := .Comments }} -
- {{ if gt $index 0 }} -
- {{ end }} - {{ template "repo/issues/fragments/issueComment" (dict "RepoInfo" $.RepoInfo "LoggedInUser" $.LoggedInUser "Issue" $.Issue "Comment" .)}} -
+
+ {{ range $index, $comment := .Comments }} +
+ {{ if gt $index 0 }} +
{{ end }} -
+ {{ template "repo/issues/fragments/issueComment" (dict "RepoInfo" $.RepoInfo "LoggedInUser" $.LoggedInUser "Issue" $.Issue "Comment" .) }} +
+ {{ end }} + - {{ block "newComment" . }} {{ end }} + {{ block "newComment" . }}{{ end }} {{ end }} {{ define "newComment" }} {{ if .LoggedInUser }} -
-
-
- {{ template "user/fragments/picHandleLink" (didOrHandle .LoggedInUser.Did .LoggedInUser.Handle) }} + hx-on::after-request="if(event.detail.successful) this.reset()"> +
+
+ {{ template "user/fragments/picHandleLink" (didOrHandle .LoggedInUser.Did .LoggedInUser.Handle) }} +
+ +
+
- -
-
-
-
+
{{ $isIssueAuthor := and .LoggedInUser (eq .LoggedInUser.Did .Issue.OwnerDid) }} {{ $isRepoCollaborator := .RepoInfo.Roles.IsCollaborator }} {{ $isRepoOwner := .RepoInfo.Roles.IsOwner }} {{ if and (or $isIssueAuthor $isRepoCollaborator $isRepoOwner) (eq .State "open") }} - -
+
-
-
+
-
- + {{ else if and (or $isIssueAuthor $isRepoCollaborator $isRepoOwner) (eq .State "closed") }} - + {{ end }} -
- +
+ {{ else }} -
- login to join the discussion +
+ login + to join the discussion
{{ end }} {{ end }} diff --git a/appview/pages/templates/repo/issues/issues.html b/appview/pages/templates/repo/issues/issues.html index 7f01a1e3..829607be 100644 --- a/appview/pages/templates/repo/issues/issues.html +++ b/appview/pages/templates/repo/issues/issues.html @@ -1,124 +1,134 @@ {{ define "title" }}issues · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} - {{ $title := "issues"}} - {{ $url := printf "https://tangled.sh/%s/issues" .RepoInfo.FullName }} + {{ $title := "issues" }} + {{ $url := printf "https://tangled.sh/%s/issues" .RepoInfo.FullName }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} - -
+ +
+
{{ end }} {{ define "repoAfter" }} -
- {{ range .Issues }} -
- -

- {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} - {{ $icon := "ban" }} - {{ $state := "closed" }} - {{ if .Open }} - {{ $bgColor = "bg-green-600 dark:bg-green-700" }} - {{ $icon = "circle-dot" }} - {{ $state = "open" }} - {{ end }} +

+ {{ range .Issues }} +
+ +

+ {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} + {{ $icon := "ban" }} + {{ $state := "closed" }} + {{ if .Open }} + {{ $bgColor = "bg-green-600 dark:bg-green-700" }} + {{ $icon = "circle-dot" }} + {{ $state = "open" }} + {{ end }} + - - {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} - {{ $state }} - + + {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} + {{ $state }} + - - {{ template "user/fragments/picHandleLink" .OwnerDid }} - + + {{ template "user/fragments/picHandleLink" .OwnerDid }} + - - {{ template "repo/fragments/time" .Created }} - + + {{ template "repo/fragments/time" .Created }} + - - {{ $s := "s" }} - {{ if eq .Metadata.CommentCount 1 }} - {{ $s = "" }} - {{ end }} - {{ .Metadata.CommentCount }} comment{{$s}} - -

+ + {{ $s := "s" }} + {{ if eq .Metadata.CommentCount 1 }} + {{ $s = "" }} + {{ end }} + + {{ .Metadata.CommentCount }} comment{{ $s }} + + +

+
+ {{ end }}
- {{ end }} -
-{{ block "pagination" . }} {{ end }} + {{ block "pagination" . }}{{ end }} {{ end }} {{ define "pagination" }} -
+
{{ $currentState := "closed" }} {{ if .FilteringByOpen }} {{ $currentState = "open" }} {{ end }} {{ if gt .Page.Offset 0 }} - {{ $prev := .Page.Previous }} - - {{ i "chevron-left" "w-4 h-4" }} - previous - + {{ $prev := .Page.Previous }} + + {{ i "chevron-left" "w-4 h-4" }} + previous + {{ else }} -
+
{{ end }} {{ if eq (len .Issues) .Page.Limit }} - {{ $next := .Page.Next }} - - next - {{ i "chevron-right" "w-4 h-4" }} - + {{ $next := .Page.Next }} + + next + {{ i "chevron-right" "w-4 h-4" }} + {{ end }} -
+
{{ end }} diff --git a/appview/pages/templates/repo/issues/new.html b/appview/pages/templates/repo/issues/new.html index b3474856..9133799f 100644 --- a/appview/pages/templates/repo/issues/new.html +++ b/appview/pages/templates/repo/issues/new.html @@ -1,37 +1,35 @@ {{ define "title" }}new issue · {{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }} -
-
-
- - -
-
- - -
-
- -
-
-
-
+
+
+
+ + +
+
+ + +
+
+ +
+
+
+
{{ end }} diff --git a/appview/pages/templates/repo/log.html b/appview/pages/templates/repo/log.html index ae9f9d76..5b036dec 100644 --- a/appview/pages/templates/repo/log.html +++ b/appview/pages/templates/repo/log.html @@ -1,187 +1,259 @@ {{ define "title" }}commits · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} - {{ $title := printf "commits · %s" .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/commits" .RepoInfo.FullName }} + {{ $title := printf "commits · %s" .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/commits" .RepoInfo.FullName }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} -
-

- commits -

+
+

commits

-
+
+
+ {{ $verified := $.VerifiedCommits.IsVerified $commit.Hash.String }} + {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} + {{ if $verified }} + {{ $hashStyle = "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 rounded" }} + {{ end }} + + + {{ slice $commit.Hash.String 0 8 }} + {{ if $verified }} + {{ i "shield-check" "w-3 h-3" }} + {{ end }} + + + + + {{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }} + + {{ if $didOrHandle }} + {{ template "user/fragments/picHandleLink" $didOrHandle }} + {{ else }} + {{ $commit.Author.Name }} + {{ end }} + + +
+ + {{ template "repo/fragments/shortTime" $commit.Committer.When }} + + + + {{ $pipeline := index $.Pipelines .Hash.String }} + {{ if and $pipeline (gt (len $pipeline.Statuses) 0) }} +
+ + {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }} + + {{ end }} +
+
+ {{ end }} +
+ {{ end }} {{ define "repoAfter" }} {{ $commits_len := len .Commits }}
- {{ if gt .Page 1 }}{{ i "chevron-left" "w-4 h-4" }} previous{{ else }}
{{ end }} - {{ if eq $commits_len 60 }}next {{ i "chevron-right" "w-4 h-4" }}{{ end }} + {{ if gt .Page 1 }} + + {{ i "chevron-left" "w-4 h-4" }} previous + + {{ else }} +
+ {{ end }} + {{ if eq $commits_len 60 }} + + next {{ i "chevron-right" "w-4 h-4" }} + + {{ end }}
{{ end }} diff --git a/appview/pages/templates/repo/new.html b/appview/pages/templates/repo/new.html index 09724f5e..21f16f5a 100644 --- a/appview/pages/templates/repo/new.html +++ b/appview/pages/templates/repo/new.html @@ -1,74 +1,81 @@ {{ define "title" }}new repo{{ end }} {{ define "content" }} -
-

Create a new repository

-
-
-
-
- - +

Create a new repository

+
+
+ +
+ + -

All repositories are publicly visible.

+ class="w-full max-w-md dark:bg-gray-700 dark:text-white dark:border-gray-600" /> +

+ All repositories are publicly visible. +

- - Default branch + + class="w-full max-w-md dark:bg-gray-700 dark:text-white dark:border-gray-600" /> - - Description + -
+ class="w-full max-w-md dark:bg-gray-700 dark:text-white dark:border-gray-600" /> +
-
- Select a knot -
-
- {{ range .Knots }} -
- - {{ . }} +
+ Select a knot +
+
+ {{ range .Knots }} +
+ + {{ . }} +
+ {{ else }} +

No knots available.

+ {{ end }}
- {{ else }} -

No knots available.

- {{ end }}
-
-

A knot hosts repository data. Learn how to register your own knot.

-
+

+ A knot hosts repository data. + + Learn how to register your own knot. + +

+ -
+
-
- -
+
+ +
{{ end }} diff --git a/appview/pages/templates/repo/pipelines/fragments/logBlock.html b/appview/pages/templates/repo/pipelines/fragments/logBlock.html index 3e1b56df..b74928a8 100644 --- a/appview/pages/templates/repo/pipelines/fragments/logBlock.html +++ b/appview/pages/templates/repo/pipelines/fragments/logBlock.html @@ -1,15 +1,24 @@ {{ define "repo/pipelines/fragments/logBlock" }} -
-
- -
- {{ i "chevron-right" "w-4 h-4" }} {{ .Name }} +
+
+ +
+ {{ i "chevron-right" "w-4 h-4" }} + {{ .Name }} +
+ +
+
+
{{ .Command }}
+
- -
-
{{ .Command }}
-
-
+ +
{{ end }} diff --git a/appview/pages/templates/repo/pipelines/fragments/logLine.html b/appview/pages/templates/repo/pipelines/fragments/logLine.html index c1f3e1c6..b83642d1 100644 --- a/appview/pages/templates/repo/pipelines/fragments/logLine.html +++ b/appview/pages/templates/repo/pipelines/fragments/logLine.html @@ -1,4 +1,5 @@ {{ define "repo/pipelines/fragments/logLine" }} -

{{ .Content }}

+
+

{{ .Content }}

+
{{ end }} - diff --git a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html index 6dea6bca..dc9692d8 100644 --- a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html +++ b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html @@ -37,33 +37,46 @@ {{ $offset := 0.0 }}
- + {{ range $kind, $count := $c }} {{ $color := "" }} {{ if or (eq $kind "pending") (eq $kind "running") }} - {{ $color = "#eab308" }} {{/* amber-500 */}} + {{ $color = "#eab308" }} + {{/* amber-500 */}} {{ else if eq $kind "success" }} - {{ $color = "#10b981" }} {{/* green-500 */}} + {{ $color = "#10b981" }} + {{/* green-500 */}} {{ else if eq $kind "cancelled" }} - {{ $color = "#6b7280" }} {{/* gray-500 */}} + {{ $color = "#6b7280" }} + {{/* gray-500 */}} {{ else if eq $kind "timeout" }} - {{ $color = "#fb923c" }} {{/* orange-400 */}} + {{ $color = "#fb923c" }} + {{/* orange-400 */}} {{ else }} - {{ $color = "#ef4444" }} {{/* red-500 for failed or unknown */}} + {{ $color = "#ef4444" }} + {{/* red-500 for failed or unknown */}} {{ end }} {{ $percent := divf64 (f64 $count) (f64 $total) }} {{ $length := mulf64 $percent $circumference }} + + stroke-dashoffset="{{ printf "%.2f" (negf64 $offset) }}" /> {{ $offset = addf64 $offset $length }} {{ end }} diff --git a/appview/pages/templates/repo/pipelines/fragments/tooltip.html b/appview/pages/templates/repo/pipelines/fragments/tooltip.html index 1b2c9a94..73b64af1 100644 --- a/appview/pages/templates/repo/pipelines/fragments/tooltip.html +++ b/appview/pages/templates/repo/pipelines/fragments/tooltip.html @@ -2,33 +2,38 @@ {{ $repoinfo := .RepoInfo }} {{ $pipeline := .Pipeline }} {{ $id := $pipeline.Id }} -
+
diff --git a/appview/pages/templates/repo/pipelines/pipelines.html b/appview/pages/templates/repo/pipelines/pipelines.html index 457c1897..90639b56 100644 --- a/appview/pages/templates/repo/pipelines/pipelines.html +++ b/appview/pages/templates/repo/pipelines/pipelines.html @@ -1,31 +1,30 @@ {{ define "title" }}pipelines · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} - {{ $title := "pipelines"}} - {{ $url := printf "https://tangled.sh/%s/pipelines" .RepoInfo.FullName }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ $title := "pipelines" }} + {{ $url := printf "https://tangled.sh/%s/pipelines" .RepoInfo.FullName }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} -
-
- {{ range .Pipelines }} - {{ block "pipeline" (list $ .) }} {{ end }} - {{ else }} -

- No pipelines run for this repository. -

- {{ end }} +
+
+ {{ range .Pipelines }} + {{ block "pipeline" (list $ .) }}{{ end }} + {{ else }} +

+ No pipelines run for this repository. +

+ {{ end }} +
-
{{ end }} - {{ define "pipeline" }} {{ $root := index . 0 }} {{ $p := index . 1 }}
- {{ block "pipelineHeader" $ }} {{ end }} + {{ block "pipelineHeader" $ }}{{ end }}
{{ end }} @@ -33,70 +32,81 @@ {{ $root := index . 0 }} {{ $p := index . 1 }} {{ with $p }} -
-
- {{ .Trigger.Kind.String }} -
+
+
+ {{ .Trigger.Kind.String }} +
-
- {{ $target := .Trigger.TargetRef }} - {{ $workflows := .Workflows }} - {{ $link := "" }} - {{ if .IsResponding }} - {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }} - {{ end }} - {{ if .Trigger.IsPush }} - {{ $target }} - + {{ else if .Trigger.IsPullRequest }} + {{ $sha := deref .Trigger.PRSourceSha }} + + {{ $target }} + {{ i "arrow-left" "size-4" }} + {{ .Trigger.PRSourceBranch }} + + @ + + {{ slice $sha 0 8 }} + + + + {{ end }} +
-
- {{ template "repo/fragments/shortTimeAgo" .Created }} -
+
+ {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }} +
- {{ $t := .TimeTaken }} -
- {{ if $t }} - - {{ else }} - - {{ end }} -
+
+ {{ template "repo/fragments/shortTimeAgo" .Created }} +
-
- {{ if $link }} - - {{ i "arrow-up-right" "size-4" }} - - - {{ end }} -
+ {{ $t := .TimeTaken }} +
+ {{ if $t }} + + {{ else }} + + {{ end }} +
+ +
{{ end }} {{ end }} diff --git a/appview/pages/templates/repo/pipelines/workflow.html b/appview/pages/templates/repo/pipelines/workflow.html index 0ec37983..bb94aed2 100644 --- a/appview/pages/templates/repo/pipelines/workflow.html +++ b/appview/pages/templates/repo/pipelines/workflow.html @@ -1,20 +1,23 @@ -{{ define "title" }} {{ .Workflow }} · pipeline {{ .Pipeline.Id }} · {{ .RepoInfo.FullName }}{{ end }} +{{ define "title" }} + {{ .Workflow }} · pipeline {{ .Pipeline.Id }} · + {{ .RepoInfo.FullName }} +{{ end }} {{ define "extrameta" }} - {{ $title := "pipelines"}} - {{ $url := printf "https://tangled.sh/%s/pipelines" .RepoInfo.FullName }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ $title := "pipelines" }} + {{ $url := printf "https://tangled.sh/%s/pipelines" .RepoInfo.FullName }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} -
-
- {{ block "sidebar" . }} {{ end }} -
-
- {{ block "logs" . }} {{ end }} -
-
+
+
+ {{ block "sidebar" . }}{{ end }} +
+
+ {{ block "logs" . }}{{ end }} +
+
{{ end }} {{ define "sidebar" }} @@ -25,39 +28,47 @@ {{ with .Pipeline }} {{ $id := .Id }} -
+
{{ range $name, $all := .Statuses }} - - {{ end }} {{ end }} {{ define "logs" }} -
-
-
+
+
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullActions.html b/appview/pages/templates/repo/pulls/fragments/pullActions.html index e98b3d83..5f3391d2 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullActions.html +++ b/appview/pages/templates/repo/pulls/fragments/pullActions.html @@ -23,84 +23,83 @@ {{ $isSameRepoBranch := .Pull.IsBranchBased }} {{ $isUpToDate := .ResubmitCheck.No }}
-
- - {{ if and $isPushAllowed $isOpen $isLastRound }} - {{ $disabled := "" }} - {{ if $isConflicted }} - {{ $disabled = "disabled" }} - {{ end }} - +
+ + {{ if and $isPushAllowed $isOpen $isLastRound }} + {{ $disabled := "" }} + {{ if $isConflicted }} + {{ $disabled = "disabled" }} {{ end }} + + {{ end }} - {{ if and $isPullAuthor $isOpen $isLastRound }} - {{ $disabled := "" }} - {{ if $isUpToDate }} - {{ $disabled = "disabled" }} + {{ if and $isPullAuthor $isOpen $isLastRound }} + {{ $disabled := "" }} + {{ if $isUpToDate }} + {{ $disabled = "disabled" }} + {{ end }} + - {{ end }} + {{ if $disabled }} + title="Update this branch to resubmit this pull request" + {{ else }} + title="Resubmit this pull request" + {{ end }}> + {{ i "rotate-ccw" "w-4 h-4" }} + resubmit + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} + + {{ end }} - {{ if and (or $isPullAuthor $isPushAllowed) $isOpen $isLastRound }} - - {{ end }} + {{ end }} - {{ if and (or $isPullAuthor $isPushAllowed) $isClosed $isLastRound }} - - {{ end }} + {{ end }}
{{ end }} - - diff --git a/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html b/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html index bad7b045..dc127e67 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html @@ -1,45 +1,48 @@ {{ define "repo/pulls/fragments/pullCompareBranches" }} -
- -
- + + + {{ $recent := index .Branches 0 }} + {{ range .Branches }} + {{ $isRecent := eq .Reference.Name $recent.Reference.Name }} + {{ $preset := false }} + {{ if $.SourceBranch }} + {{ $preset = eq .Reference.Name $.SourceBranch }} + {{ else }} + {{ $preset = $isRecent }} + {{ end }} - {{ $recent := index .Branches 0 }} - {{ range .Branches }} - {{ $isRecent := eq .Reference.Name $recent.Reference.Name }} - {{ $preset := false }} - {{ if $.SourceBranch }} - {{ $preset = eq .Reference.Name $.SourceBranch }} - {{ else }} - {{ $preset = $isRecent }} - {{ end }} - - - {{ end }} - -
-
-
- - + + {{ end }} +
+
+ +
+ + +
-

- Title and description are optional; if left out, they will be extracted - from the first commit. -

+

+ Title and description are optional; if left out, they will be extracted from + the first commit. +

{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html b/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html index 3dd79030..016107a3 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html @@ -1,53 +1,53 @@ {{ define "repo/pulls/fragments/pullCompareForks" }} -
- - selected: {{ .Selected }} -
-
- +
+ + selected: + {{ .Selected }} +
+
+ - -
+ +
-
-
- Select a fork first to view available branches -
-
+
+
+ Select a fork first to view available branches
+
+
-
- - -
+
+ + +
-

- Title and description are optional; if left out, they will be extracted - from the first commit. -

+

+ Title and description are optional; if left out, they will be extracted from + the first commit. +

{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html b/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html index cc426f5f..450ea2f6 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html @@ -1,25 +1,23 @@ {{ define "repo/pulls/fragments/pullCompareForksBranches" }} -
- + - {{ $recent := index .SourceBranches 0 }} - {{ range .SourceBranches }} - {{ $isRecent := eq .Reference.Name $recent.Reference.Name }} - - {{ end }} - -
+ {{ $recent := index .SourceBranches 0 }} + {{ range .SourceBranches }} + {{ $isRecent := eq .Reference.Name $recent.Reference.Name }} + + {{ end }} + +
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullHeader.html b/appview/pages/templates/repo/pulls/fragments/pullHeader.html index 22968aa5..53a8d24f 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullHeader.html +++ b/appview/pages/templates/repo/pulls/fragments/pullHeader.html @@ -1,83 +1,92 @@ {{ define "repo/pulls/fragments/pullHeader" }} -
+

- {{ .Pull.Title }} - #{{ .Pull.PullId }} + {{ .Pull.Title }} + #{{ .Pull.PullId }}

-
+
-{{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} -{{ $icon := "ban" }} + {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} + {{ $icon := "ban" }} -{{ if .Pull.State.IsOpen }} + {{ if .Pull.State.IsOpen }} {{ $bgColor = "bg-green-600 dark:bg-green-700" }} {{ $icon = "git-pull-request" }} -{{ else if .Pull.State.IsMerged }} + {{ else if .Pull.State.IsMerged }} {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} {{ $icon = "git-merge" }} -{{ end }} + {{ end }} -{{ $owner := resolve .Pull.OwnerDid }} -
+ {{ $owner := resolve .Pull.OwnerDid }} +
-
- {{ i $icon "w-4 h-4 mr-1.5 text-white" }} - {{ .Pull.State.String }} -
- - opened by - {{ template "user/fragments/picHandleLink" .Pull.OwnerDid }} - - {{ template "repo/fragments/time" .Pull.Created }} +
+ {{ i $icon "w-4 h-4 mr-1.5 text-white" }} + {{ .Pull.State.String }} +
+ + opened by + {{ template "user/fragments/picHandleLink" .Pull.OwnerDid }} + + {{ template "repo/fragments/time" .Pull.Created }} + - - - targeting - - {{ .Pull.TargetBranch }} - - - {{ if not .Pull.IsPatchBased }} - from - - {{ if .Pull.IsForkBased }} - {{ if .Pull.PullSource.Repo }} - {{ $owner }}/{{ .Pull.PullSource.Repo.Name }}: - {{- else -}} - [deleted fork] - {{- end -}} - {{- end -}} - {{- .Pull.PullSource.Branch -}} - - {{ end }} + + + targeting + + + {{ .Pull.TargetBranch }} + + + {{ if not .Pull.IsPatchBased }} + from + + {{ if .Pull.IsForkBased }} + {{ if .Pull.PullSource.Repo }} + + {{ $owner }}/{{ .Pull.PullSource.Repo.Name }} + + : + {{- else -}} + [deleted fork] + {{- end -}} + {{- end -}} + {{- .Pull.PullSource.Branch -}} + + {{ end }} +
{{ if .Pull.Body }} -
- {{ .Pull.Body | markdown }} -
+
+ {{ .Pull.Body | markdown }} +
{{ end }} {{ with .OrderedReactionKinds }} -
+
{{ template "repo/fragments/reactionsPopUp" . }} {{ range $kind := . }} - {{ - template "repo/fragments/reaction" - (dict - "Kind" $kind - "Count" (index $.Reactions $kind) - "IsReacted" (index $.UserReacted $kind) - "ThreadAt" $.Pull.PullAt) - }} + {{ template "repo/fragments/reaction" + (dict + "Kind" $kind + "Count" (index $.Reactions $kind) + "IsReacted" (index $.UserReacted $kind) + "ThreadAt" $.Pull.PullAt) + }} {{ end }} -
+
{{ end }} -
- - +
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullNewComment.html b/appview/pages/templates/repo/pulls/fragments/pullNewComment.html index 986dd05a..c90b508a 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullNewComment.html +++ b/appview/pages/templates/repo/pulls/fragments/pullNewComment.html @@ -1,40 +1,37 @@ {{ define "repo/pulls/fragments/pullNewComment" }} -
-
- {{ didOrHandle .LoggedInUser.Did .LoggedInUser.Handle }} -
-
- - - -
-
-
+ + +
+ +
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html b/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html index 9f330a11..f1176e02 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html +++ b/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html @@ -1,21 +1,23 @@ {{ define "repo/pulls/fragments/pullPatchUpload" }} -
-

- You can paste a git diff or a - git format-patch patch series here. -

- -
++++ b/file.txt"> +
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullResubmit.html b/appview/pages/templates/repo/pulls/fragments/pullResubmit.html index e0ee0685..9a288d56 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullResubmit.html +++ b/appview/pages/templates/repo/pulls/fragments/pullResubmit.html @@ -1,65 +1,61 @@ {{ define "repo/pulls/fragments/pullResubmit" }}
+ id="resubmit-pull-card" + class="rounded relative border bg-amber-50 dark:bg-amber-900 border-amber-200 dark:border-amber-500 px-6 py-2"> +
+ {{ i "pencil" "w-4 h-4" }} + resubmit your patch +
-
- {{ i "pencil" "w-4 h-4" }} - resubmit your patch -
+
+ You can update this patch to address any reviews. This will begin a new + round of reviews, but you'll still be able to view your previous + submissions and feedback. +
-
- You can update this patch to address any reviews. - This will begin a new round of reviews, - but you'll still be able to view your previous submissions and feedback. -
- -
-
+ + - - - -
+ + + -
-
-
+
+
+
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullStack.html b/appview/pages/templates/repo/pulls/fragments/pullStack.html index 1c856236..472d1960 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullStack.html +++ b/appview/pages/templates/repo/pulls/fragments/pullStack.html @@ -1,6 +1,7 @@ {{ define "repo/pulls/fragments/pullStack" }}
- + {{ i "chevrons-up-down" "w-4 h-4" }} @@ -9,15 +10,19 @@ {{ i "chevrons-down-up" "w-4 h-4" }} STACK - {{ len .Stack }} + + {{ len .Stack }} + - {{ block "pullList" (list .Stack $) }} {{ end }} + {{ block "pullList" (list .Stack $) }}{{ end }}
{{ if gt (len .AbandonedPulls) 0 }}
- + {{ i "chevrons-up-down" "w-4 h-4" }} @@ -26,10 +31,13 @@ {{ i "chevrons-down-up" "w-4 h-4" }} ABANDONED PULLS - {{ len .AbandonedPulls }} + + {{ len .AbandonedPulls }} + - {{ block "pullList" (list .AbandonedPulls $) }} {{ end }} + {{ block "pullList" (list .AbandonedPulls $) }}{{ end }}
{{ end }} {{ end }} @@ -37,21 +45,30 @@ {{ define "pullList" }} {{ $list := index . 0 }} {{ $root := index . 1 }} -
+
{{ range $pull := $list }} {{ $isCurrent := false }} {{ $pipeline := index $root.Pipelines $pull.LatestSha }} {{ with $root.Pull }} {{ $isCurrent = eq $pull.PullId $root.Pull.PullId }} {{ end }} - -
+ +
{{ if $isCurrent }}
{{ i "arrow-right" "w-4 h-4" }}
{{ end }} -
+
{{ template "repo/pulls/fragments/summarizedHeader" (list $pull $pipeline) }}
diff --git a/appview/pages/templates/repo/pulls/fragments/summarizedPullHeader.html b/appview/pages/templates/repo/pulls/fragments/summarizedPullHeader.html index f6dc6db8..d78023c7 100644 --- a/appview/pages/templates/repo/pulls/fragments/summarizedPullHeader.html +++ b/appview/pages/templates/repo/pulls/fragments/summarizedPullHeader.html @@ -19,16 +19,20 @@ {{ $commentCount := len $lastSubmission.Comments }} {{ if and $pipeline $pipeline.Id }} {{ template "repo/pipelines/fragments/pipelineSymbol" $pipeline }} - + {{ end }}
{{ i "message-square" "w-3 h-3 md:hidden" }} {{ $commentCount }} - +
- + #{{ $latestRound }} @@ -37,4 +41,3 @@
{{ end }} {{ end }} - diff --git a/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html b/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html index c87eb0c5..50d69ccc 100644 --- a/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html +++ b/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html @@ -17,4 +17,3 @@ {{ i $icon $style }} {{ end }} - diff --git a/appview/pages/templates/repo/pulls/interdiff.html b/appview/pages/templates/repo/pulls/interdiff.html index 81da1b22..6ad47344 100644 --- a/appview/pages/templates/repo/pulls/interdiff.html +++ b/appview/pages/templates/repo/pulls/interdiff.html @@ -1,31 +1,35 @@ {{ define "title" }} - interdiff of round #{{ .Round }} and #{{ sub .Round 1 }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }} + interdiff of round #{{ .Round }} and #{{ sub .Round 1 }} · pull + #{{ .Pull.PullId }} · + {{ .RepoInfo.FullName }} {{ end }} - {{ define "extrameta" }} - {{ $title := printf "interdiff of %d and %d · %s · pull #%d · %s" .Round (sub .Round 1) .Pull.Title .Pull.PullId .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }} - - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" (unescapeHtml $title) "Url" $url) }} + {{ $title := printf "interdiff of %d and %d · %s · pull #%d · %s" .Round (sub .Round 1) .Pull.Title .Pull.PullId .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }} + + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" (unescapeHtml $title) "Url" $url) }} {{ end }} {{ define "content" }} -
+
- + {{ i "arrow-left" "w-5 h-5" }} back - interdiff of round #{{ .Round }} and #{{ sub .Round 1 }} + interdiff of round #{{ .Round }} and + #{{ sub .Round 1 }}
{{ template "repo/pulls/fragments/pullHeader" . }}
- {{ end }} {{ define "topbarLayout" }} @@ -41,14 +45,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfterLeft" . }}{{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
-
{{ end }}
{{ end }} @@ -59,10 +63,9 @@ {{ end }} - {{ define "contentAfter" }} {{ template "repo/fragments/interdiff" (list .RepoInfo.FullName .Interdiff .DiffOpts) }} -{{end}} +{{ end }} {{ define "contentAfterLeft" }}
@@ -71,4 +74,4 @@
{{ template "repo/fragments/interdiffFiles" .Interdiff }}
-{{end}} +{{ end }} diff --git a/appview/pages/templates/repo/pulls/new.html b/appview/pages/templates/repo/pulls/new.html index 9b7043ee..084da8f2 100644 --- a/appview/pages/templates/repo/pulls/new.html +++ b/appview/pages/templates/repo/pulls/new.html @@ -1,155 +1,145 @@ {{ define "title" }}new pull · {{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }} -

- Create new pull request -

- -
-
-
-

First, choose a target branch on {{ .RepoInfo.FullName }}:

-
- -
-
- -
-

- Choose pull strategy -

- -
- {{ if eq .Strategy "patch" }} - {{ template "repo/pulls/fragments/pullPatchUpload" . }} - {{ else if eq .Strategy "branch" }} - {{ template "repo/pulls/fragments/pullCompareBranches" . }} - {{ else }} - {{ template "repo/pulls/fragments/pullPatchUpload" . }} - {{ end }} -
- -
-
- -
- - - -
- -
- - - -
- -
- -
-
-
-
+ + +
+ {{ if eq .Strategy "patch" }} + {{ template "repo/pulls/fragments/pullPatchUpload" . }} + {{ else if eq .Strategy "branch" }} + {{ template "repo/pulls/fragments/pullCompareBranches" . }} + {{ else }} + {{ template "repo/pulls/fragments/pullPatchUpload" . }} + {{ end }} +
+ +
+
+ +
+ + + +
+ +
+ + + +
+ +
+ +
+
+
+ {{ end }} diff --git a/appview/pages/templates/repo/pulls/patch.html b/appview/pages/templates/repo/pulls/patch.html index 3769c3af..7bbf04a2 100644 --- a/appview/pages/templates/repo/pulls/patch.html +++ b/appview/pages/templates/repo/pulls/patch.html @@ -1,37 +1,42 @@ {{ define "title" }} - patch of {{ .Pull.Title }} · round #{{ .Round }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }} + patch of {{ .Pull.Title }} · round #{{ .Round }} · pull + #{{ .Pull.PullId }} · + {{ .RepoInfo.FullName }} {{ end }} - {{ define "extrameta" }} - {{ $title := printf "patch of %s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }} - - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} -{{ end }} + {{ $title := printf "patch of %s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} +{{ end }} {{ define "content" }} -
+
-
- - {{ i "arrow-left" "w-5 h-5" }} - back - - - round{{ i "hash" "w-4 h-4" }}{{ .Round }} - - - view raw - -
-
- {{ template "repo/pulls/fragments/pullHeader" . }} + class="bg-white dark:bg-gray-800 p-6 rounded relative w-full mx-auto drop-shadow-sm dark:text-white"> +
+ + {{ i "arrow-left" "w-5 h-5" }} + back + + + round + + {{ i "hash" "w-4 h-4" }}{{ .Round }} + + + + view raw + +
+
+ {{ template "repo/pulls/fragments/pullHeader" . }}
-
+
{{ end }} {{ define "topbarLayout" }} @@ -47,14 +52,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfterLeft" . }}{{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
-
{{ end }}
{{ end }} @@ -67,7 +72,7 @@ {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} -{{end}} +{{ end }} {{ define "contentAfterLeft" }}
@@ -76,4 +81,4 @@
{{ template "repo/fragments/diffChangedFiles" .Diff }}
-{{end}} +{{ end }} diff --git a/appview/pages/templates/repo/pulls/pull.html b/appview/pages/templates/repo/pulls/pull.html index d7bac1fe..2d18b6f8 100644 --- a/appview/pages/templates/repo/pulls/pull.html +++ b/appview/pages/templates/repo/pulls/pull.html @@ -1,15 +1,15 @@ {{ define "title" }} - {{ .Pull.Title }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }} + {{ .Pull.Title }} · pull #{{ .Pull.PullId }} · + {{ .RepoInfo.FullName }} {{ end }} {{ define "extrameta" }} - {{ $title := printf "%s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/pulls/%d" .RepoInfo.FullName .Pull.PullId }} + {{ $title := printf "%s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/pulls/%d" .RepoInfo.FullName .Pull.PullId }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} - {{ define "repoContent" }} {{ template "repo/pulls/fragments/pullHeader" . }} @@ -21,14 +21,14 @@ {{ end }} {{ define "repoAfter" }} -
-
- {{ block "submissions" . }} {{ end }} -
-
+
+
+ {{ block "submissions" . }}{{ end }} +
+
-
-
+
+
{{ end }} {{ define "submissions" }} @@ -37,123 +37,157 @@ {{ $repoName := .RepoInfo.FullName }} {{ range $idx, $item := .Pull.Submissions }} {{ with $item }} -
- +
+
-
- {{ i "hash" "w-4 h-4" }}{{ .RoundNumber }} +
+ + {{ i "hash" "w-4 h-4" }}{{ .RoundNumber }} +
-
+
{{ $owner := resolve $.Pull.OwnerDid }} {{ $re := "re" }} {{ if eq .RoundNumber 0 }} {{ $re = "" }} {{ end }} - - by {{ template "user/fragments/picHandleLink" $.Pull.OwnerDid }} + + by + {{ template "user/fragments/picHandleLink" $.Pull.OwnerDid }} - {{ template "repo/fragments/shortTime" .Created }} + + {{ template "repo/fragments/shortTime" .Created }} + {{ $s := "s" }} {{ if eq (len .Comments) 1 }} {{ $s = "" }} {{ end }} - {{ len .Comments }} comment{{$s}} + {{ len .Comments }} + comment{{ $s }}
- + {{ i "file-diff" "w-4 h-4" }} {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} {{ if not (eq .RoundNumber 0) }} - - {{ i "chevrons-left-right-ellipsis" "w-4 h-4 rotate-90" }} - - {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} - - + + {{ i "chevrons-left-right-ellipsis" "w-4 h-4 rotate-90" }} + + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} + + {{ end }}
{{ if .IsFormatPatch }} - {{ $patches := .AsFormatPatch }} - {{ $round := .RoundNumber }} -
- - {{ $s := "s" }} - {{ if eq (len $patches) 1 }} - {{ $s = "" }} - {{ end }} -
- {{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len $patches }} commit{{$s}} -
- -
- {{ range $patches }} -
-
- {{ i "git-commit-horizontal" "w-4 h-4" }} -
- - {{ $fullRepo := "" }} - {{ if and $.Pull.IsForkBased $.Pull.PullSource.Repo }} - {{ $fullRepo = printf "%s/%s" $owner $.Pull.PullSource.Repo.Name }} - {{ else if $.Pull.IsBranchBased }} - {{ $fullRepo = $.RepoInfo.FullName }} - {{ end }} + {{ $patches := .AsFormatPatch }} + {{ $round := .RoundNumber }} +
+ + {{ $s := "s" }} + {{ if eq (len $patches) 1 }} + {{ $s = "" }} + {{ end }} +
+ {{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len $patches }} + commit{{ $s }} +
+ +
+ {{ range $patches }} +
+
+ {{ i "git-commit-horizontal" "w-4 h-4" }} +
+ + {{ $fullRepo := "" }} + {{ if and $.Pull.IsForkBased $.Pull.PullSource.Repo }} + {{ $fullRepo = printf "%s/%s" $owner $.Pull.PullSource.Repo.Name }} + {{ else if $.Pull.IsBranchBased }} + {{ $fullRepo = $.RepoInfo.FullName }} + {{ end }} - - {{ if $fullRepo }} - {{ slice .SHA 0 8 }} - {{ else }} - {{ slice .SHA 0 8 }} - {{ end }} -
-
- {{ .Title }} - {{ if gt (len .Body) 0 }} - - {{ end }} -
-
- {{ if gt (len .Body) 0 }} - - {{ end }} -
- {{ end }} -
+ + + {{ if $fullRepo }} + + {{ slice .SHA 0 8 }} + + {{ else }} + {{ slice .SHA 0 8 }} + {{ end }} +
+
+ {{ .Title }} + {{ if gt (len .Body) 0 }} + + {{ end }} +
+
+ {{ if gt (len .Body) 0 }} + + {{ end }} +
+ {{ end }} +
{{ end }}
{{ range $cidx, $c := .Comments }} -
+
{{ if gt $cidx 0 }} -
+
{{ end }} -
+
{{ $c.Body | markdown }} @@ -161,60 +195,68 @@
{{ end }} - {{ block "pipelineStatus" (list $ .) }} {{ end }} + {{ block "pipelineStatus" (list $ .) }}{{ end }} {{ if eq $lastIdx .RoundNumber }} - {{ block "mergeStatus" $ }} {{ end }} - {{ block "resubmitStatus" $ }} {{ end }} + {{ block "mergeStatus" $ }}{{ end }} + {{ block "resubmitStatus" $ }}{{ end }} {{ end }} {{ if $.LoggedInUser }} {{ template "repo/pulls/fragments/pullActions" (dict "LoggedInUser" $.LoggedInUser "Pull" $.Pull "RepoInfo" $.RepoInfo "RoundNumber" .RoundNumber "MergeCheck" $.MergeCheck "ResubmitCheck" $.ResubmitCheck "Stack" $.Stack) }} {{ else }} -
-
- login to join the discussion +
+
+ login + to join the discussion
{{ end }}
-
+
{{ end }} {{ end }} {{ end }} {{ define "mergeStatus" }} {{ if .Pull.State.IsClosed }} -
-
- {{ i "ban" "w-4 h-4" }} - closed without merging +
+
+ {{ i "ban" "w-4 h-4" }} + closed without merging +
-
{{ else if .Pull.State.IsMerged }} -
-
- {{ i "git-merge" "w-4 h-4" }} - pull request successfully merged +
+
+ {{ i "git-merge" "w-4 h-4" }} + pull request successfully merged +
-
{{ else if .Pull.State.IsDeleted }} -
-
- {{ i "git-pull-request-closed" "w-4 h-4" }} - This pull has been deleted (possibly by jj abandon or jj squash) +
+
+ {{ i "git-pull-request-closed" "w-4 h-4" }} + + This pull has been deleted (possibly by jj abandon or jj squash) + +
-
{{ else if and .MergeCheck .MergeCheck.Error }} -
+
{{ i "triangle-alert" "w-4 h-4" }} {{ .MergeCheck.Error }}
{{ else if and .MergeCheck .MergeCheck.IsConflicted }} -
+
{{ i "triangle-alert" "w-4 h-4" }} @@ -224,15 +266,15 @@
    {{ range .MergeCheck.Conflicts }} {{ if .Filename }} -
  • - {{ i "file-warning" "w-4 h-4 mr-1.5 text-red-500 dark:text-red-300" }} - {{ .Filename }} -
  • +
  • + {{ i "file-warning" "w-4 h-4 mr-1.5 text-red-500 dark:text-red-300" }} + {{ .Filename }} +
  • {{ else if .Reason }} -
  • - {{ i "file-warning" "w-4 h-4 mr-1.5 text-red-500 dark:text-red-300" }} - {{.Reason}} -
  • +
  • + {{ i "file-warning" "w-4 h-4 mr-1.5 text-red-500 dark:text-red-300" }} + {{ .Reason }} +
  • {{ end }} {{ end }}
@@ -240,23 +282,27 @@
{{ else if .MergeCheck }} -
-
- {{ i "circle-check-big" "w-4 h-4" }} - no conflicts, ready to merge +
+
+ {{ i "circle-check-big" "w-4 h-4" }} + no conflicts, ready to merge +
-
{{ end }} {{ end }} {{ define "resubmitStatus" }} {{ if .ResubmitCheck.Yes }} -
-
- {{ i "triangle-alert" "w-4 h-4" }} - this branch has been updated, consider resubmitting +
+
+ {{ i "triangle-alert" "w-4 h-4" }} + + this branch has been updated, consider resubmitting + +
-
{{ end }} {{ end }} @@ -267,28 +313,31 @@ {{ with $pipeline }} {{ $id := .Id }} {{ if .Statuses }} -
+
{{ range $name, $all := .Statuses }} - - {{ end }} diff --git a/appview/pages/templates/repo/pulls/pulls.html b/appview/pages/templates/repo/pulls/pulls.html index 98babf57..5aade8b0 100644 --- a/appview/pages/templates/repo/pulls/pulls.html +++ b/appview/pages/templates/repo/pulls/pulls.html @@ -1,147 +1,166 @@ {{ define "title" }}pulls · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} - {{ $title := "pulls"}} - {{ $url := printf "https://tangled.sh/%s/pulls" .RepoInfo.FullName }} + {{ $title := "pulls" }} + {{ $url := printf "https://tangled.sh/%s/pulls" .RepoInfo.FullName }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} -
- - - {{ i "git-pull-request-create" "w-4 h-4" }} - new - + +
{{ end }} {{ define "repoAfter" }} -
- {{ range .Pulls }} -
-
-
- - {{ .Title }} - #{{ .PullId }} - +
+ {{ range .Pulls }} +
+
+ +
+ {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} + {{ $icon := "ban" }} + + {{ if .State.IsOpen }} + {{ $bgColor = "bg-green-600 dark:bg-green-700" }} + {{ $icon = "git-pull-request" }} + {{ else if .State.IsMerged }} + {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} + {{ $icon = "git-merge" }} + {{ end }} + + + + {{ i $icon "w-3 h-3 mr-1.5 text-white" }} + {{ .State.String }} + + + + {{ template "user/fragments/picHandleLink" .OwnerDid }} + + + + {{ template "repo/fragments/time" .Created }} + + + {{ $latestRound := .LastRoundNumber }} + {{ $lastSubmission := index .Submissions $latestRound }} + + + + {{ $commentCount := len $lastSubmission.Comments }} + {{ $s := "s" }} + {{ if eq $commentCount 1 }} + {{ $s = "" }} + {{ end }} + + {{ len $lastSubmission.Comments }} + comment{{ $s }} + + + + round + + #{{ .LastRoundNumber }} + + + + {{ $pipeline := index $.Pipelines .LatestSha }} + {{ if and $pipeline $pipeline.Id }} + + {{ template "repo/pipelines/fragments/pipelineSymbol" $pipeline }} + {{ end }} +
+
+ {{ if .StackId }} + {{ $otherPulls := index $.Stacks .StackId }} + {{ if gt (len $otherPulls) 0 }} +
+ + {{ $s := "s" }} + {{ if eq (len $otherPulls) 1 }} + {{ $s = "" }} + {{ end }} +
+ {{ i "chevrons-up-down" "w-4 h-4" }} expand + {{ len $otherPulls }} pull{{ $s }} in this stack
-
- {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} - {{ $icon := "ban" }} - - {{ if .State.IsOpen }} - {{ $bgColor = "bg-green-600 dark:bg-green-700" }} - {{ $icon = "git-pull-request" }} - {{ else if .State.IsMerged }} - {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} - {{ $icon = "git-merge" }} - {{ end }} - - - - {{ i $icon "w-3 h-3 mr-1.5 text-white" }} - {{ .State.String }} - - - - {{ template "user/fragments/picHandleLink" .OwnerDid }} - - - - {{ template "repo/fragments/time" .Created }} - - - - {{ $latestRound := .LastRoundNumber }} - {{ $lastSubmission := index .Submissions $latestRound }} - - - {{ $commentCount := len $lastSubmission.Comments }} - {{ $s := "s" }} - {{ if eq $commentCount 1 }} - {{ $s = "" }} - {{ end }} - - {{ len $lastSubmission.Comments}} comment{{$s}} - - - - round - - #{{ .LastRoundNumber }} - - - - {{ $pipeline := index $.Pipelines .LatestSha }} - {{ if and $pipeline $pipeline.Id }} - - {{ template "repo/pipelines/fragments/pipelineSymbol" $pipeline }} - {{ end }} + -
- {{ if .StackId }} - {{ $otherPulls := index $.Stacks .StackId }} - {{ if gt (len $otherPulls) 0 }} -
- - {{ $s := "s" }} - {{ if eq (len $otherPulls) 1 }} - {{ $s = "" }} - {{ end }} -
- {{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len $otherPulls }} pull{{$s}} in this stack -
- -
- {{ block "pullList" (list $otherPulls $) }} {{ end }} -
- {{ end }} - {{ end }} -
+ + {{ block "pullList" (list $otherPulls $) }}{{ end }} + + {{ end }} {{ end }} -
+
+ {{ end }} +
{{ end }} {{ define "pullList" }} {{ $list := index . 0 }} {{ $root := index . 1 }} -
+
{{ range $pull := $list }} {{ $pipeline := index $root.Pipelines $pull.LatestSha }} - +
{{ template "repo/pulls/fragments/summarizedHeader" (list $pull $pipeline) }} diff --git a/appview/pages/templates/repo/settings/access.html b/appview/pages/templates/repo/settings/access.html index 010c5c61..05c1c1ea 100644 --- a/appview/pages/templates/repo/settings/access.html +++ b/appview/pages/templates/repo/settings/access.html @@ -1,4 +1,6 @@ -{{ define "title" }}{{ .Tab }} settings · {{ .RepoInfo.FullName }}{{ end }} +{{ define "title" }} + {{ .Tab }} settings · {{ .RepoInfo.FullName }} +{{ end }} {{ define "repoContent" }}
@@ -16,7 +18,8 @@

Collaborators

- Any user added as a collaborator will be able to push commits and tags to this repository, upload releases, and workflows. + Any user added as a collaborator will be able to push commits and tags + to this repository, upload releases, and workflows.

{{ template "collaboratorsGrid" . }} @@ -34,7 +37,7 @@ {{ .Handle }} + class="rounded-full h-10 w-10 border border-gray-300 dark:border-gray-600 flex-shrink-0" />
@@ -54,7 +57,8 @@ popovertarget="add-collaborator-modal" popovertargetaction="toggle">
-
+
{{ i "user-plus" "size-4" }}
@@ -72,39 +76,40 @@ {{ end }} {{ define "addCollaboratorModal" }} -
- -

Collaborators can push to this repository.

- -
- - -
-
-
+
+ +

+ Collaborators can push to this repository. +

+ +
+ + +
+
+
{{ end }} diff --git a/appview/pages/templates/repo/settings/fragments/secretListing.html b/appview/pages/templates/repo/settings/fragments/secretListing.html index e5aab5ef..92a1ce8d 100644 --- a/appview/pages/templates/repo/settings/fragments/secretListing.html +++ b/appview/pages/templates/repo/settings/fragments/secretListing.html @@ -1,16 +1,24 @@ {{ define "repo/settings/fragments/secretListing" }} {{ $root := index . 0 }} {{ $secret := index . 1 }} -
-
+
+
{{ $secret.Key }} -
+
added by - {{ template "user/fragments/picHandleLink" $secret.CreatedBy }} + + {{ template "user/fragments/picHandleLink" $secret.CreatedBy }} + - {{ template "repo/fragments/shortTimeAgo" $secret.CreatedAt }} + + {{ template "repo/fragments/shortTimeAgo" $secret.CreatedAt }} +
diff --git a/appview/pages/templates/repo/settings/fragments/sidebar.html b/appview/pages/templates/repo/settings/fragments/sidebar.html index 90bbf957..0f77deb6 100644 --- a/appview/pages/templates/repo/settings/fragments/sidebar.html +++ b/appview/pages/templates/repo/settings/fragments/sidebar.html @@ -1,16 +1,24 @@ {{ define "repo/settings/fragments/sidebar" }} {{ $active := .Tab }} {{ $tabs := .Tabs }} -
+ {{ end }} diff --git a/appview/pages/templates/repo/settings/general.html b/appview/pages/templates/repo/settings/general.html index 65a1a6a9..5ebf4285 100644 --- a/appview/pages/templates/repo/settings/general.html +++ b/appview/pages/templates/repo/settings/general.html @@ -1,4 +1,6 @@ -{{ define "title" }}{{ .Tab }} settings · {{ .RepoInfo.FullName }}{{ end }} +{{ define "title" }} + {{ .Tab }} settings · {{ .RepoInfo.FullName }} +{{ end }} {{ define "repoContent" }}
@@ -22,13 +24,20 @@ unless you specify a different branch.

-
- + {{ range .Branches }} - {{ end }} @@ -43,26 +52,31 @@ {{ define "deleteRepo" }} {{ if .RepoInfo.Roles.RepoDeleteAllowed }} -
-
-

Delete Repository

-

- Deleting a repository is irreversible and permanent. Be certain before deleting a repository. -

-
-
- + +
-
{{ end }} {{ end }} diff --git a/appview/pages/templates/repo/settings/pipelines.html b/appview/pages/templates/repo/settings/pipelines.html index afcfa2dc..deaae77e 100644 --- a/appview/pages/templates/repo/settings/pipelines.html +++ b/appview/pages/templates/repo/settings/pipelines.html @@ -1,4 +1,6 @@ -{{ define "title" }}{{ .Tab }} settings · {{ .RepoInfo.FullName }}{{ end }} +{{ define "title" }} + {{ .Tab }} settings · {{ .RepoInfo.FullName }} +{{ end }} {{ define "repoContent" }}
@@ -22,37 +24,51 @@

Choose a spindle to execute your workflows on. Only repository owners can configure spindles. Spindles can be selfhosted, - + click to learn more.

{{ if not $.RepoInfo.Roles.IsOwner }} -
+
{{ or $.CurrentSpindle "No spindle configured" }}
{{ else }} - + in all scenarios unless it is preceded by a disabled select?? No idea, could just be a Firefox thing? */}} - {{ range $.Spindles }} - {{ end }} - @@ -66,16 +82,17 @@

SECRETS

- Secrets are accessible in workflow runs via environment variables. Anyone - with collaborator access to this repository can add and use secrets in - workflow runs. + Secrets are accessible in workflow runs via environment variables. + Anyone with collaborator access to this repository can add and use + secrets in workflow runs.

{{ template "addSecretButton" . }}
-
+
{{ range .Secrets }} {{ template "repo/settings/fragments/secretListing" (list $ .) }} {{ else }} @@ -100,46 +117,47 @@ class="bg-white w-full md:w-96 dark:bg-gray-800 p-4 rounded border border-gray-200 dark:border-gray-700 drop-shadow dark:text-white backdrop:bg-gray-400/50 dark:backdrop:bg-gray-800/50"> {{ template "addSecretModal" . }}
-{{ end}} +{{ end }} {{ define "addSecretModal" }} - -

ADD SECRET

-

Secrets are available as environment variables in the workflow.

- - -
- - -
-
- +
+

ADD SECRET

+

+ Secrets are available as environment variables in the workflow. +

+ + +
+ + +
+
+
{{ end }} diff --git a/appview/pages/templates/repo/tree.html b/appview/pages/templates/repo/tree.html index 098a1358..6e43fd5c 100644 --- a/appview/pages/templates/repo/tree.html +++ b/appview/pages/templates/repo/tree.html @@ -1,90 +1,120 @@ -{{ define "title"}}{{ range .BreadCrumbs }}{{ pathUnescape (index . 0)}}/{{ end }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }} - +{{ define "title" }} + {{ range .BreadCrumbs }}{{ pathUnescape (index . 0) }}/{{ end }} at {{ .Ref }} + · {{ .RepoInfo.FullName }} +{{ end }} {{ define "extrameta" }} - {{ $path := "" }} - {{ range .BreadCrumbs }} + {{ $path := "" }} + {{ range .BreadCrumbs }} {{ $path = printf "%s/%s" $path (index . 0) }} - {{ end }} + {{ end }} - {{ template "repo/fragments/meta" . }} - {{ $title := printf "%s at %s · %s" $path .Ref .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/tree/%s%s" .RepoInfo.FullName .Ref $path }} + {{ template "repo/fragments/meta" . }} + {{ $title := printf "%s at %s · %s" $path .Ref .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/tree/%s%s" .RepoInfo.FullName .Ref $path }} - {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} + {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} - -{{define "repoContent"}} -
-
- {{ $linkstyle := "no-underline hover:underline" }} - -
-
- -
- {{ $stats := .TreeStats }} - - at {{ $.Ref }} - {{ if eq $stats.NumFolders 1 }} - - {{ $stats.NumFolders }} folder - {{ else if gt $stats.NumFolders 1 }} - - {{ $stats.NumFolders }} folders - {{ end }} - - {{ if eq $stats.NumFiles 1 }} - - {{ $stats.NumFiles }} file - {{ else if gt $stats.NumFiles 1 }} - - {{ $stats.NumFiles }} files - {{ end }} - +{{ define "repoContent" }} +
+
+ {{ $linkstyle := "no-underline hover:underline" }} + + +
+
+ +
+ {{ $stats := .TreeStats }} + + + + at + + {{ $.Ref }} + + + {{ if eq $stats.NumFolders 1 }} + + {{ $stats.NumFolders }} folder + {{ else if gt $stats.NumFolders 1 }} + + {{ $stats.NumFolders }} folders + {{ end }} + + {{ if eq $stats.NumFiles 1 }} + + {{ $stats.NumFiles }} file + {{ else if gt $stats.NumFiles 1 }} + + {{ $stats.NumFiles }} files + {{ end }} + +
-
- {{ range .Files }} -
-
- {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) $.TreePath .Name }} - {{ $icon := "folder" }} - {{ $iconStyle := "size-4 fill-current" }} - - {{ if .IsFile }} - {{ $icon = "file" }} - {{ $iconStyle = "size-4" }} - {{ end }} - -
- {{ i $icon $iconStyle "flex-shrink-0" }} - {{ .Name }} -
-
+ {{ range .Files }} +
+
+ {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) $.TreePath .Name }} + {{ $icon := "folder" }} + {{ $iconStyle := "size-4 fill-current" }} + + {{ if .IsFile }} + {{ $icon = "file" }} + {{ $iconStyle = "size-4" }} + {{ end }} + +
+ {{ i $icon $iconStyle "flex-shrink-0" }} + {{ .Name }} +
+
+
+ + + +
+ {{ with .LastCommit }} + + {{ template "repo/fragments/time" .When }} + + {{ end }} +
+ {{ end }} - - -
- {{ with .LastCommit }} - {{ template "repo/fragments/time" .When }} - {{ end }} -
-
- {{ end }} - -
-
-{{end}} +
+
+{{ end }} diff --git a/appview/pages/templates/settings.html b/appview/pages/templates/settings.html index 8a1979ba..a673bc06 100644 --- a/appview/pages/templates/settings.html +++ b/appview/pages/templates/settings.html @@ -5,180 +5,207 @@

Settings

- {{ block "profile" . }} {{ end }} - {{ block "keys" . }} {{ end }} - {{ block "emails" . }} {{ end }} + {{ block "profile" . }}{{ end }} + {{ block "keys" . }}{{ end }} + {{ block "emails" . }}{{ end }}
{{ end }} {{ define "profile" }} -

profile

-
-
- {{ if .LoggedInUser.Handle }} -
handle
-
@{{ .LoggedInUser.Handle }}
- {{ end }} -
did
-
{{ .LoggedInUser.Did }}
-
pds
-
{{ .LoggedInUser.Pds }}
-
-
+

+ profile +

+
+
+ {{ if .LoggedInUser.Handle }} +
handle
+
@{{ .LoggedInUser.Handle }}
+ {{ end }} +
did
+
{{ .LoggedInUser.Did }}
+
pds
+
{{ .LoggedInUser.Pds }}
+
+
{{ end }} {{ define "keys" }} -

ssh keys

-
-

SSH public keys added here will be broadcasted to knots that you are a member of,
allowing you to push to repositories there.

-
- {{ range $index, $key := .PubKeys }} -
-
-
- {{ i "key" "w-3 h-3 dark:text-gray-300" }} -

{{ .Name }}

-
-

added {{ template "repo/fragments/time" .Created }}

-
- {{ .Key }} +

+ ssh keys +

+
+

+ SSH public keys added here will be broadcasted to knots that you are a + member of, +
+ allowing you to push to repositories there. +

+
+ {{ range $index, $key := .PubKeys }} +
+
+
+ {{ i "key" "w-3 h-3 dark:text-gray-300" }} +

{{ .Name }}

+
+

+ added {{ template "repo/fragments/time" .Created }} +

+
+ + {{ .Key }} + +
+
+
-
- + {{ end }}
- {{ end }} -
-
+ class="max-w-2xl mb-8 space-y-4"> + type="text" + id="name" + name="name" + placeholder="key name" + required + class="w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400" /> + id="key" + name="key" + placeholder="ssh-rsa AAAAAA..." + required + class="w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400" /> -
-
-
+ +
{{ end }} {{ define "emails" }} -

email addresses

-
-

Commits authored using emails listed here will be associated with your Tangled profile.

-
- {{ range $index, $email := .Emails }} -
-
-
- {{ i "mail" "w-3 h-3 dark:text-gray-300" }} -

{{ .Address }}

-
- {{ if .Verified }} - verified - {{ else }} - unverified +

+ email addresses +

+
+

+ Commits authored using emails listed here will be associated with your + Tangled profile. +

+
+ {{ range $index, $email := .Emails }} +
+
+
+ {{ i "mail" "w-3 h-3 dark:text-gray-300" }} +

{{ .Address }}

+
+ {{ if .Verified }} + + verified + + {{ else }} + + unverified + + {{ end }} + {{ if .Primary }} + + primary + + {{ end }} +
+
+

+ added {{ template "repo/fragments/time" .CreatedAt }} +

+
+
+ {{ if not .Verified }} + {{ end }} - {{ if .Primary }} - primary + {{ if and (not .Primary) .Verified }} + + set as primary + + {{ end }} + {{ if not .Primary }} +
+ + +
{{ end }}
-

added {{ template "repo/fragments/time" .CreatedAt }}

-
-
- {{ if not .Verified }} - - {{ end }} - {{ if and (not .Primary) .Verified }} - - set as primary - - {{ end }} - {{ if not .Primary }} -
- - -
- {{ end }} -
+ {{ end }}
- {{ end }} -
-
+ hx-indicator="#add-email-spinner"> + type="email" + id="email" + name="email" + placeholder="your@email.com" + required + class="w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400" />
-
-
-
+
+ + {{ end }} diff --git a/appview/pages/templates/spindles/dashboard.html b/appview/pages/templates/spindles/dashboard.html index 0497bda7..7bd2091c 100644 --- a/appview/pages/templates/spindles/dashboard.html +++ b/appview/pages/templates/spindles/dashboard.html @@ -1,42 +1,48 @@ -{{ define "title" }}{{.Spindle.Instance}} · spindles{{ end }} +{{ define "title" }}{{ .Spindle.Instance }} · spindles{{ end }} {{ define "content" }} -
-
-

{{ .Spindle.Instance }}

-
- {{ $style := "px-2 py-1 rounded flex items-center flex-shrink-0 gap-2" }} - {{ $isOwner := and .LoggedInUser (eq .LoggedInUser.Did .Spindle.Owner) }} - {{ if .Spindle.Verified }} - {{ i "shield-check" "w-4 h-4" }} verified - {{ if $isOwner }} - {{ template "spindles/fragments/addMemberModal" .Spindle }} +
+
+

{{ .Spindle.Instance }}

+
+ {{ $style := "px-2 py-1 rounded flex items-center flex-shrink-0 gap-2" }} + {{ $isOwner := and .LoggedInUser (eq .LoggedInUser.Did .Spindle.Owner) }} + {{ if .Spindle.Verified }} + + {{ i "shield-check" "w-4 h-4" }} verified + + {{ if $isOwner }} + {{ template "spindles/fragments/addMemberModal" .Spindle }} + {{ end }} + {{ else }} + + {{ i "shield-off" "w-4 h-4" }} unverified + + {{ if $isOwner }} + {{ block "retryButton" .Spindle }}{{ end }} + {{ end }} {{ end }} - {{ else }} - {{ i "shield-off" "w-4 h-4" }} unverified + {{ if $isOwner }} - {{ block "retryButton" .Spindle }} {{ end }} + {{ block "deleteButton" .Spindle }}{{ end }} {{ end }} - {{ end }} - - {{ if $isOwner }} - {{ block "deleteButton" .Spindle }} {{ end }} - {{ end }} +
+
-
-
-{{ if .Members }} -
-
- {{ block "member" . }} {{ end }} -
-
-{{ end }} + {{ if .Members }} +
+
+ {{ block "member" . }}{{ end }} +
+
+ {{ end }} {{ end }} - {{ define "member" }} {{ range .Members }}
@@ -45,7 +51,7 @@ {{ template "user/fragments/picHandleLink" . }}
{{ if ne $.LoggedInUser.Did . }} - {{ block "removeMemberButton" (list $ . ) }} {{ end }} + {{ block "removeMemberButton" (list $ . ) }}{{ end }} {{ end }}
@@ -74,44 +80,38 @@ hx-delete="/spindles/{{ .Instance }}" hx-swap="outerHTML" hx-confirm="Are you sure you want to delete the spindle '{{ .Instance }}'?" - hx-headers='{"shouldRedirect": "true"}' - > + hx-headers='{"shouldRedirect": "true"}'> {{ i "trash-2" "w-5 h-5" }} - + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} {{ end }} - {{ define "retryButton" }} {{ end }} - {{ define "removeMemberButton" }} {{ $root := index . 0 }} {{ $member := index . 1 }} - + {{ end }} - diff --git a/appview/pages/templates/spindles/fragments/addMemberModal.html b/appview/pages/templates/spindles/fragments/addMemberModal.html index 47f4d8e9..3da58f30 100644 --- a/appview/pages/templates/spindles/fragments/addMemberModal.html +++ b/appview/pages/templates/spindles/fragments/addMemberModal.html @@ -3,10 +3,9 @@ class="btn gap-2 group" title="Add member to this spindle" popovertarget="add-member-{{ .Instance }}" - popovertargetaction="toggle" - > + popovertargetaction="toggle"> {{ i "user-plus" "w-5 h-5" }} - + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} @@ -14,44 +13,45 @@ id="add-member-{{ .Instance }}" popover class="bg-white w-full md:w-96 dark:bg-gray-800 p-4 rounded border border-gray-200 dark:border-gray-700 drop-shadow dark:text-white backdrop:bg-gray-400/50 dark:backdrop:bg-gray-800/50"> - {{ block "addMemberPopover" . }} {{ end }} + {{ block "addMemberPopover" . }}{{ end }}
{{ end }} {{ define "addMemberPopover" }} -
- -

Members can register repositories and run workflows on this spindle.

- -
- - -
-
-
+
+ +

+ Members can register repositories and run workflows on this spindle. +

+ +
+ + +
+
+
{{ end }} diff --git a/appview/pages/templates/spindles/fragments/spindleListing.html b/appview/pages/templates/spindles/fragments/spindleListing.html index 56ae1e03..45929b0f 100644 --- a/appview/pages/templates/spindles/fragments/spindleListing.html +++ b/appview/pages/templates/spindles/fragments/spindleListing.html @@ -1,27 +1,31 @@ {{ define "spindles/fragments/spindleListing" }} -
- {{ block "leftSide" . }} {{ end }} - {{ block "rightSide" . }} {{ end }} +
+ {{ block "leftSide" . }}{{ end }} + {{ block "rightSide" . }}{{ end }}
{{ end }} {{ define "leftSide" }} {{ if .Verified }} - - {{ i "hard-drive" "w-4 h-4" }} - {{ .Instance }} - - {{ template "repo/fragments/shortTimeAgo" .Created }} - - + + {{ i "hard-drive" "w-4 h-4" }} + {{ .Instance }} + + {{ template "repo/fragments/shortTimeAgo" .Created }} + + {{ else }} -
- {{ i "hard-drive" "w-4 h-4" }} - {{ .Instance }} - - {{ template "repo/fragments/shortTimeAgo" .Created }} - -
+
+ {{ i "hard-drive" "w-4 h-4" }} + {{ .Instance }} + + {{ template "repo/fragments/shortTimeAgo" .Created }} + +
{{ end }} {{ end }} @@ -29,13 +33,19 @@
{{ $style := "px-2 py-1 rounded flex items-center flex-shrink-0 gap-2 text-sm" }} {{ if .Verified }} - {{ i "shield-check" "w-4 h-4" }} verified + + {{ i "shield-check" "w-4 h-4" }} verified + {{ template "spindles/fragments/addMemberModal" . }} {{ else }} - {{ i "shield-off" "w-4 h-4" }} unverified - {{ block "retryButton" . }} {{ end }} + + {{ i "shield-off" "w-4 h-4" }} unverified + + {{ block "retryButton" . }}{{ end }} {{ end }} - {{ block "deleteButton" . }} {{ end }} + {{ block "deleteButton" . }}{{ end }}
{{ end }} @@ -45,26 +55,23 @@ title="Delete spindle" hx-delete="/spindles/{{ .Instance }}" hx-swap="outerHTML" - hx-target="#spindle-{{.Id}}" - hx-confirm="Are you sure you want to delete the spindle '{{ .Instance }}'?" - > + hx-target="#spindle-{{ .Id }}" + hx-confirm="Are you sure you want to delete the spindle '{{ .Instance }}'?"> {{ i "trash-2" "w-5 h-5" }} - + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} {{ end }} - {{ define "retryButton" }} {{ end }} diff --git a/appview/pages/templates/spindles/index.html b/appview/pages/templates/spindles/index.html index d26c088c..2fbecea6 100644 --- a/appview/pages/templates/spindles/index.html +++ b/appview/pages/templates/spindles/index.html @@ -1,24 +1,26 @@ {{ define "title" }}spindles{{ end }} {{ define "content" }} -
-

Spindles

-
- -
-
- {{ block "about" . }} {{ end }} - {{ block "list" . }} {{ end }} - {{ block "register" . }} {{ end }} +
+

Spindles

-
+ +
+
+ {{ block "about" . }}{{ end }} + {{ block "list" . }}{{ end }} + {{ block "register" . }}{{ end }} +
+
{{ end }} {{ define "about" }}

Spindles are small CI runners. - + Checkout the documentation if you're interested in self-hosting.

@@ -27,12 +29,16 @@ {{ define "list" }}
-

your spindles

-
+

+ your spindles +

+
{{ range $spindle := .Spindles }} {{ template "spindles/fragments/spindleListing" . }} {{ else }} -
+
no spindles registered yet
{{ end }} @@ -43,14 +49,17 @@ {{ define "register" }}
-

register a spindle

-

Enter the hostname of your spindle to get started.

+

+ register a spindle +

+

+ Enter the hostname of your spindle to get started. +

+ hx-swap="none">
+ class="flex-1 w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400 px-3 py-2 border rounded" />
{{ end }} diff --git a/appview/pages/templates/strings/dashboard.html b/appview/pages/templates/strings/dashboard.html index e7ab5879..43542416 100644 --- a/appview/pages/templates/strings/dashboard.html +++ b/appview/pages/templates/strings/dashboard.html @@ -1,22 +1,25 @@ -{{ define "title" }}strings by {{ or .Card.UserHandle .Card.UserDid }}{{ end }} +{{ define "title" }}strings by {{ or .Card.UserHandle .Card.UserDid }}{{ end }} {{ define "extrameta" }} - - - - + + + + {{ end }} - {{ define "content" }} -
+
- {{ template "user/fragments/profileCard" .Card }} + {{ template "user/fragments/profileCard" .Card }}
- {{ block "allStrings" . }}{{ end }} + {{ block "allStrings" . }}{{ end }}
-
+
{{ end }} {{ define "allStrings" }} @@ -25,7 +28,9 @@ {{ range .Strings }} {{ template "singleString" (list $ .) }} {{ else }} -

This user does not have any strings yet.

+

+ This user does not have any strings yet. +

{{ end }}
{{ end }} @@ -35,17 +40,22 @@ {{ $s := index . 1 }}
{{ with $s.Description }}
- {{ . }} + {{ . }}
{{ end }} {{ $stat := $s.Stats }}
- {{ $stat.LineCount }} line{{if ne $stat.LineCount 1}}s{{end}} + + {{ $stat.LineCount }} line{{ if ne $stat.LineCount 1 }}s{{ end }} + {{ with $s.Edited }} edited {{ template "repo/fragments/shortTimeAgo" . }} diff --git a/appview/pages/templates/strings/fragments/form.html b/appview/pages/templates/strings/fragments/form.html index 2badb23e..837b48c1 100644 --- a/appview/pages/templates/strings/fragments/form.html +++ b/appview/pages/templates/strings/fragments/form.html @@ -3,7 +3,7 @@ {{ if eq .Action "new" }} hx-post="/strings/new" {{ else }} - hx-post="/strings/{{.String.Did}}/{{.String.Rkey}}/edit" + hx-post="/strings/{{ .String.Did }}/{{ .String.Rkey }}/edit" {{ end }} hx-indicator="#new-button" class="p-6 pb-4 dark:text-white flex flex-col gap-2 bg-white dark:bg-gray-800 drop-shadow-sm rounded" @@ -16,25 +16,25 @@ placeholder="Filename with extension" required value="{{ .String.Filename }}" - class="md:max-w-64 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400 px-3 py-2 border rounded" - > + class="md:max-w-64 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400 px-3 py-2 border rounded" /> + class="flex-1 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400 px-3 py-2 border rounded" />
+ required> +{{ .String.Contents }} - - complete signup · tangled - - -
-

- tangled -

-

- tightly-knit social coding. -

-
-
- - - - Enter the code sent to your email. - -
+ + + + + + + + + + + complete signup · tangled + + +
+

+ tangled +

+

+ tightly-knit social coding. +

+ +
+ + + + Enter the code sent to your email. + +
-
- - - - Your complete handle will be of the form user.tngl.sh. - -
+
+ + + + Your complete handle will be of the form + user.tngl.sh + . + +
-
- - - - Choose a strong password for your account. - -
+
+ + + + Choose a strong password for your account. + +
- - -

-

-
- - + + +

+

+
+ + {{ end }} diff --git a/appview/pages/templates/user/fragments/bluesky.html b/appview/pages/templates/user/fragments/bluesky.html index 98d1d400..07fe895d 100644 --- a/appview/pages/templates/user/fragments/bluesky.html +++ b/appview/pages/templates/user/fragments/bluesky.html @@ -1,6 +1,14 @@ {{ define "user/fragments/bluesky" }} - - Bluesky - - + + Bluesky + + {{ end }} diff --git a/appview/pages/templates/user/fragments/editBio.html b/appview/pages/templates/user/fragments/editBio.html index 042acd94..a9a82c2a 100644 --- a/appview/pages/templates/user/fragments/editBio.html +++ b/appview/pages/templates/user/fragments/editBio.html @@ -11,12 +11,14 @@ {{ $description = .Profile.Description }} {{ end }} - + placeholder="write a bio"> +{{ $description }}
@@ -27,7 +29,11 @@ {{ $location = .Profile.Location }} {{ end }} {{ i "map-pin" "size-4" }} - +
@@ -38,8 +44,15 @@ {{ if and .Profile .Profile.IncludeBluesky }} {{ $includeBsky = true }} {{ end }} - - + +
{{ $profile := .Profile }} @@ -51,9 +64,15 @@ {{ end }} {{ end }} +
{{ i "link" "size-4" }} - +
{{ end }}
@@ -61,27 +80,35 @@
{{ range $idx, $s := (sequence 2) }} - {{ $stat := "" }} - {{ if and $profile $profile.Stats }} - {{ if lt $idx (len $profile.Stats) }} - {{ $s := index $profile.Stats $idx }} - {{ $stat = $s.Kind }} - {{ end }} + {{ $stat := "" }} + {{ if and $profile $profile.Stats }} + {{ if lt $idx (len $profile.Stats) }} + {{ $s := index $profile.Stats $idx }} + {{ $stat = $s.Kind }} {{ end }} + {{ end }} - {{ block "stat" (list $idx $stat) }} {{ end }} + {{ block "stat" (list $idx $stat) }}{{ end }} {{ end }}
- - - @@ -92,20 +119,25 @@ {{ define "stat" }} {{ $id := index . 0 }} {{ $stat := index . 1 }} - {{ $stats := assoc - "merged-pull-request-count" "Merged PR Count" - "closed-pull-request-count" "Closed PR Count" - "open-pull-request-count" "Open PR Count" - "open-issue-count" "Open Issue Count" - "closed-issue-count" "Closed Issue Count" - "repository-count" "Repository Count" + "merged-pull-request-count" "Merged PR Count" + "closed-pull-request-count" "Closed PR Count" + "open-pull-request-count" "Open PR Count" + "open-issue-count" "Open Issue Count" + "closed-issue-count" "Closed Issue Count" + "repository-count" "Repository Count" }} {{ range $s := $stats }} - {{ $value := index $s 0 }} - {{ $label := index $s 1 }} - + {{ $value := index $s 0 }} + {{ $label := index $s 1 }} + {{ end }} {{ end }} diff --git a/appview/pages/templates/user/fragments/editPins.html b/appview/pages/templates/user/fragments/editPins.html index 15c1a5bb..3a16c5b4 100644 --- a/appview/pages/templates/user/fragments/editPins.html +++ b/appview/pages/templates/user/fragments/editPins.html @@ -1,33 +1,53 @@ {{ define "user/fragments/editPins" }} {{ $profile := .Profile }} -
-
-

SELECT PINNED REPOS

-
- + + - - - -
+
-
- {{ range $idx, $r := .AllRepos }} -
- -
+
+ {{ range $idx, $r := .AllRepos }} +
+ +
- - + {{ end }} +
+ {{ end }} diff --git a/appview/pages/templates/user/fragments/follow.html b/appview/pages/templates/user/fragments/follow.html index b5c65b4c..4b0e1c24 100644 --- a/appview/pages/templates/user/fragments/follow.html +++ b/appview/pages/templates/user/fragments/follow.html @@ -1,18 +1,21 @@ {{ define "user/fragments/follow" }} - {{ end }} diff --git a/appview/pages/templates/user/fragments/picHandle.html b/appview/pages/templates/user/fragments/picHandle.html index 55187d7b..dcbd2a74 100644 --- a/appview/pages/templates/user/fragments/picHandle.html +++ b/appview/pages/templates/user/fragments/picHandle.html @@ -1,8 +1,7 @@ {{ define "user/fragments/picHandle" }} -{{ . }} -{{ . | truncateAt30 }} + class="rounded-full h-6 w-6 mr-1 border border-gray-300 dark:border-gray-700" /> + {{ . | truncateAt30 }} {{ end }} diff --git a/appview/pages/templates/user/fragments/picHandleLink.html b/appview/pages/templates/user/fragments/picHandleLink.html index e718cb43..73455b5b 100644 --- a/appview/pages/templates/user/fragments/picHandleLink.html +++ b/appview/pages/templates/user/fragments/picHandleLink.html @@ -1,6 +1,6 @@ {{ define "user/fragments/picHandleLink" }} -{{ $resolved := resolve . }} - + {{ $resolved := resolve . }} + {{ template "user/fragments/picHandle" $resolved }} - + {{ end }} diff --git a/appview/pages/templates/user/fragments/profileCard.html b/appview/pages/templates/user/fragments/profileCard.html index 60d701f0..c7854e21 100644 --- a/appview/pages/templates/user/fragments/profileCard.html +++ b/appview/pages/templates/user/fragments/profileCard.html @@ -1,76 +1,91 @@ {{ define "user/fragments/profileCard" }} -
+
- +
-

+

{{ didOrHandle .UserDid .UserHandle }}

- {{ i "rss" "size-4" }} + + {{ i "rss" "size-4" }} +
- {{ block "followerFollowing" (list .Followers .Following) }} {{ end }} + {{ block "followerFollowing" (list .Followers .Following) }}{{ end }}
{{ $profile := .Profile }} {{ with .Profile }} + {{ if .Description }} +

{{ .Description }}

+ {{ end }} - {{ if .Description }} -

{{ .Description }}

- {{ end }} - - -
- {{ if .Location }} -
- {{ i "map-pin" "size-4" }} - {{ .Location }} -
- {{ end }} - {{ if .IncludeBluesky }} -
- {{ template "user/fragments/bluesky" "w-4 h-4 text-black dark:text-white" }} - {{ didOrHandle $.UserDid $.UserHandle }} + - {{ end }} - {{ range $link := .Links }} - {{ if $link }} -
- {{ i "link" "size-4" }} - {{ $link }} -
+ +
+ {{ if .Location }} +
+ {{ i "map-pin" "size-4" }} + {{ .Location }} +
{{ end }} - {{ end }} - {{ if not $profile.IsStatsEmpty }} -
- {{ range $stat := .Stats }} - {{ if $stat.Kind }} -
- {{ $stat.Value }} - {{ $stat.Kind.String }} + {{ if .IncludeBluesky }} +
+ + {{ template "user/fragments/bluesky" "w-4 h-4 text-black dark:text-white" }} + + + {{ didOrHandle $.UserDid $.UserHandle }} + +
+ {{ end }} + {{ range $link := .Links }} + {{ if $link }} +
+ {{ i "link" "size-4" }} + {{ $link }}
{{ end }} {{ end }} + {{ if not $profile.IsStatsEmpty }} +
+ {{ range $stat := .Stats }} + {{ if $stat.Kind }} +
+ {{ $stat.Value }} + {{ $stat.Kind.String }} +
+ {{ end }} + {{ end }} +
+ {{ end }}
- {{ end }} -
{{ end }} {{ if ne .FollowStatus.String "IsSelf" }} {{ template "user/fragments/follow" . }} {{ else }} - - -

- Don't have an account? Create an account on Tangled now! -

+ + +

+ Don't have an account? + Create an account + on Tangled now! +

-

- - - +

+ + + {{ end }} diff --git a/appview/pages/templates/user/profile.html b/appview/pages/templates/user/profile.html index 7696aab8..5e7d9726 100644 --- a/appview/pages/templates/user/profile.html +++ b/appview/pages/templates/user/profile.html @@ -1,18 +1,22 @@ {{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }}{{ end }} {{ define "extrameta" }} - - - - + + + + {{ end }} {{ define "content" }} -
+
{{ template "user/fragments/profileCard" .Card }} - {{ block "punchcard" .Punchcard }} {{ end }} + {{ block "punchcard" .Punchcard }}{{ end }}
@@ -22,9 +26,9 @@
- {{ block "profileTimeline" . }}{{ end }} + {{ block "profileTimeline" . }}{{ end }}
-
+
{{ end }} {{ define "profileTimeline" }} @@ -33,30 +37,32 @@ {{ with .ProfileTimeline }} {{ range $idx, $byMonth := .ByMonth }} {{ with $byMonth }} -
- {{ if eq $idx 0 }} +
+ {{ if eq $idx 0 }} - {{ else }} - {{ $s := "s" }} - {{ if eq $idx 1 }} - {{ $s = "" }} + {{ else }} + {{ $s := "s" }} + {{ if eq $idx 1 }} + {{ $s = "" }} + {{ end }} +

+ {{ $idx }} month{{ $s }} ago +

{{ end }} -

{{$idx}} month{{$s}} ago

- {{ end }} - - {{ if .IsEmpty }} -
- No activity for this month -
- {{ else }} -
- {{ block "repoEvents" .RepoEvents }} {{ end }} - {{ block "issueEvents" .IssueEvents }} {{ end }} - {{ block "pullEvents" .PullEvents }} {{ end }} -
- {{ end }} -
+ {{ if .IsEmpty }} +
+ No activity for this month +
+ {{ else }} +
+ {{ block "repoEvents" .RepoEvents }}{{ end }} + {{ block "issueEvents" .IssueEvents }}{{ end }} + {{ block "pullEvents" .PullEvents }}{{ end }} +
+ {{ end }} +
{{ end }} {{ else }}

This user does not have any activity yet.

@@ -68,10 +74,12 @@ {{ define "repoEvents" }} {{ if gt (len .) 0 }}
- +
{{ i "book-plus" "w-4 h-4" }} - created {{ len . }} {{if eq (len .) 1 }}repository{{else}}repositories{{end}} + created {{ len . }} + {{ if eq (len .) 1 }}repository{{ else }}repositories{{ end }}
@@ -84,7 +92,9 @@ {{ i "book-plus" "w-4 h-4" }} {{ end }} - + {{- .Repo.Name -}}
@@ -100,24 +110,29 @@ {{ if gt (len $items) 0 }}
- +
{{ i "circle-dot" "w-4 h-4" }} +
- created {{ len $items }} {{if eq (len $items) 1 }}issue{{else}}issues{{end}} + created {{ len $items }} + {{ if eq (len $items) 1 }}issue{{ else }}issues{{ end }}
{{ if gt $stats.Open 0 }} - - {{$stats.Open}} open + + {{ $stats.Open }} open {{ end }} {{ if gt $stats.Closed 0 }} - - {{$stats.Closed}} closed - + + {{ $stats.Closed }} closed + {{ end }}
@@ -128,6 +143,7 @@ {{ $repoName := .Metadata.Repo.Name }} {{ $repoUrl := printf "%s/%s" $repoOwner $repoName }} +
{{ if .Open }} @@ -139,15 +155,21 @@ {{ end }}
- #{{ .IssueId }} + + #{{ .IssueId }} +
@@ -162,31 +184,40 @@ {{ $stats := .Stats }} {{ if gt (len $items) 0 }}
- +
{{ i "git-pull-request" "w-4 h-4" }} +
- created {{ len $items }} {{if eq (len $items) 1 }}pull request{{else}}pull requests{{end}} + created {{ len $items }} + {{ if eq (len $items) 1 }} + pull request + {{ else }} + pull requests + {{ end }}
{{ if gt $stats.Open 0 }} - - {{$stats.Open}} open + + {{ $stats.Open }} open {{ end }} {{ if gt $stats.Merged 0 }} - - {{$stats.Merged}} merged + + {{ $stats.Merged }} merged {{ end }} - {{ if gt $stats.Closed 0 }} - - {{$stats.Closed}} closed - + + {{ $stats.Closed }} closed + {{ end }}
@@ -197,6 +228,7 @@ {{ $repoName := .Repo.Name }} {{ $repoUrl := printf "%s/%s" $repoOwner $repoName }} +
{{ if .State.IsOpen }} @@ -212,15 +244,21 @@ {{ end }}
- #{{ .PullId }} + + #{{ .PullId }} +
@@ -232,16 +270,20 @@ {{ define "ownRepos" }}
-
- + PINNED REPOS - - view all {{ i "chevron-right" "w-4 h-4" }} + + view all + {{ i "chevron-right" "w-4 h-4" }} {{ if and .LoggedInUser (eq .LoggedInUser.Did .Card.UserDid) }} -
@@ -269,7 +313,7 @@ {{ range .CollaboratingRepos }} {{ template "user/fragments/repoCard" (list $ . true) }} {{ else }} -

This user is not collaborating.

+

This user is not collaborating.

{{ end }}
@@ -308,8 +352,7 @@
-
+ title="{{ .Date.Format "2006-01-02" }}: {{ .Count }} commits">
{{ end }}
diff --git a/appview/pages/templates/user/repos.html b/appview/pages/templates/user/repos.html index 71b176a3..8e2f8e4e 100644 --- a/appview/pages/templates/user/repos.html +++ b/appview/pages/templates/user/repos.html @@ -1,30 +1,36 @@ -{{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }} · repos {{ end }} +{{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }} · repos{{ end }} {{ define "extrameta" }} - - - - + + + + {{ end }} {{ define "content" }} -
+
- {{ template "user/fragments/profileCard" .Card }} + {{ template "user/fragments/profileCard" .Card }}
- {{ block "ownRepos" . }}{{ end }} + {{ block "ownRepos" . }}{{ end }}
-
+
{{ end }} {{ define "ownRepos" }}

ALL REPOSITORIES

{{ range .Repos }} - {{ template "user/fragments/repoCard" (list $ . false) }} + {{ template "user/fragments/repoCard" (list $ . false) }} {{ else }} -

This user does not have any repos yet.

+

This user does not have any repos yet.

{{ end }}
{{ end }} diff --git a/appview/pages/templates/user/signup.html b/appview/pages/templates/user/signup.html index 530a3ef3..8a26fb5f 100644 --- a/appview/pages/templates/user/signup.html +++ b/appview/pages/templates/user/signup.html @@ -1,53 +1,63 @@ {{ define "user/signup" }} - - - - - - - - - - - sign up · tangled - - -
-

tangled

-

tightly-knit social coding.

-
-
- - -
- - You will receive an email with an invite code. Enter your - invite code, desired username, and password in the next - page to complete your registration. - - -
-

- Already have an ATProto account? Login to Tangled. -

+ + + + + + + + + + + sign up · tangled + + +
+

+ tangled +

+

+ tightly-knit social coding. +

+
+
+ + +
+ + You will receive an email with an invite code. Enter your invite + code, desired username, and password in the next page to complete + your registration. + + +
+

+ Already have an ATProto account? + Login to Tangled + . +

-

-
- - +

+
+ + {{ end }} - -- 2.51.2