diff --git a/appview/pages/templates/errors/404.html b/appview/pages/templates/errors/404.html index a9d4798a..1f8b2681 100644 --- a/appview/pages/templates/errors/404.html +++ b/appview/pages/templates/errors/404.html @@ -1,6 +1,8 @@ {{ 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 b932fcd8..14709f29 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 78bfee2b..17254799 100644 --- a/appview/pages/templates/errors/503.html +++ b/appview/pages/templates/errors/503.html @@ -1,8 +1,9 @@ {{ 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 0c8019cd..a042c3fe 100644 --- a/appview/pages/templates/favicon.html +++ b/appview/pages/templates/favicon.html @@ -1,30 +1,26 @@ {{ define "favicon" }} - - - - - - - - + + + + + {{ end }} diff --git a/appview/pages/templates/knots/dashboard.html b/appview/pages/templates/knots/dashboard.html index dcdb742d..29595c2d 100644 --- a/appview/pages/templates/knots/dashboard.html +++ b/appview/pages/templates/knots/dashboard.html @@ -14,16 +14,10 @@
{{ $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 }}
@@ -31,10 +25,9 @@ {{ if .Members }} -
+
- {{ block "knotMember" . }}{{ end }} + {{ block "knotMember" . }} {{ end }}
{{ end }} @@ -46,7 +39,7 @@
{{ template "user/fragments/picHandleLink" . }} - {{ . }} + {{.}}
diff --git a/appview/pages/templates/knots/fragments/addMemberModal.html b/appview/pages/templates/knots/fragments/addMemberModal.html index 74c2560a..5d4aa9e3 100644 --- a/appview/pages/templates/knots/fragments/addMemberModal.html +++ b/appview/pages/templates/knots/fragments/addMemberModal.html @@ -3,9 +3,10 @@ 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" }} @@ -13,45 +14,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 260a5c86..8cdfac26 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,17 +28,11 @@
{{ $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 }} @@ -47,9 +41,11 @@ {{ end }} + diff --git a/appview/pages/templates/knots/fragments/knotListingFull.html b/appview/pages/templates/knots/fragments/knotListingFull.html index af114f29..748402e0 100644 --- a/appview/pages/templates/knots/fragments/knotListingFull.html +++ b/appview/pages/templates/knots/fragments/knotListingFull.html @@ -1,22 +1,18 @@ {{ 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 3fddd73a..385847c5 100644 --- a/appview/pages/templates/knots/fragments/secret.html +++ b/appview/pages/templates/knots/fragments/secret.html @@ -3,12 +3,8 @@ 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 6e140d1e..8d9019ae 100644 --- a/appview/pages/templates/knots/index.html +++ b/appview/pages/templates/knots/index.html @@ -1,30 +1,26 @@ {{ define "title" }}knots{{ end }} {{ define "content" }} -
-

Knots

-
+
+

Knots

+
-
-
- {{ block "about" . }}{{ end }} - {{ template "knots/fragments/knotListingFull" . }} - {{ block "register" . }}{{ end }} -
-
+
+
+ {{ 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.

@@ -33,17 +29,14 @@ {{ 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 }} diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index 8c31c8d9..c3a67f8b 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -1,116 +1,83 @@ -{{ define "title" }} - commit {{ .Diff.Commit.This }} · - {{ .RepoInfo.FullName }} -{{ end }} +{{ define "title" }} commit {{ .Diff.Commit.This }} · {{ .RepoInfo.FullName }} {{ end }} {{ define "extrameta" }} - {{ $title := printf "commit %s · %s" .Diff.Commit.This .RepoInfo.FullName }} - {{ $url := printf "https://tangled.sh/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} + {{ $title := printf "commit %s · %s" .Diff.Commit.This .RepoInfo.FullName }} + {{ $url := printf "https://tangled.sh/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} - {{ 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" }} - {{ $repo := .RepoInfo.FullName }} - {{ $commit := .Diff.Commit }} +{{ define "repoContent" }} +{{ $repo := .RepoInfo.FullName }} +{{ $commit := .Diff.Commit }} -
-
- {{ $messageParts := splitN $commit.Message "\n\n" 2 }} -
-

{{ index $messageParts 0 }}

- {{ if gt (len $messageParts) 1 }} -

- {{ nl2br (index $messageParts 1) }} -

- {{ end }} -
+
+
+ {{ $messageParts := splitN $commit.Message "\n\n" 2 }} +
+

{{ index $messageParts 0 }}

+ {{ if gt (len $messageParts) 1 }} +

{{ nl2br (index $messageParts 1) }}

+ {{ end }}
+
-
+

- {{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }} - - {{ if $didOrHandle }} - - {{ $didOrHandle }} - - {{ else }} - - {{ $commit.Author.Name }} - - {{ end }} - - {{ template "repo/fragments/time" $commit.Author.When }} - + {{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }} + + {{ if $didOrHandle }} + {{ $didOrHandle }} + {{ else }} + {{ $commit.Author.Name }} + {{ end }} + + {{ template "repo/fragments/time" $commit.Author.When }} +

- - {{ slice $commit.This 0 8 }} - - {{ if $commit.Parent }} + {{ slice $commit.This 0 8 }} + {{ if $commit.Parent }} {{ i "arrow-left" "w-3 h-3 mx-1" }} - - {{ slice $commit.Parent 0 8 }} - - {{ end }} + {{ slice $commit.Parent 0 8 }} + {{ end }}

{{ if .VerifiedCommit.IsVerified $commit.This }} -
-
-
- {{ i "shield-check" "w-4 h-4" }} - verified -
+
+
+
+ {{ i "shield-check" "w-4 h-4" }} + verified +
- -
-{{ end }} +
+ +
+{{end}} {{ define "topbarLayout" }}
@@ -125,14 +92,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }}{{ end }} -
-
- {{ block "contentAfter" . }}{{ end }} -
+
+
+ {{ block "contentAfterLeft" . }} {{ end }}
+
+ {{ block "contentAfter" . }}{{ end }} +
+
{{ end }}
{{ end }} @@ -145,7 +112,7 @@ {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} -{{ end }} +{{end}} {{ define "contentAfterLeft" }}
@@ -154,4 +121,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 32fba21d..384e0f52 100644 --- a/appview/pages/templates/repo/compare/compare.html +++ b/appview/pages/templates/repo/compare/compare.html @@ -1,6 +1,5 @@ {{ define "title" }} - comparing {{ .Base }} and {{ .Head }} on - {{ .RepoInfo.FullName }} + comparing {{ .Base }} and {{ .Head }} on {{ .RepoInfo.FullName }} {{ end }} {{ define "repoContent" }} @@ -24,14 +23,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }}{{ end }} -
-
- {{ block "contentAfter" . }}{{ end }} -
+
+
+ {{ block "contentAfterLeft" . }} {{ end }}
+
+ {{ block "contentAfter" . }}{{ end }} +
+
{{ end }}
{{ end }} @@ -44,7 +43,7 @@ {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} -{{ end }} +{{end}} {{ define "contentAfterLeft" }}
@@ -53,4 +52,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 ab9947ea..8270be63 100644 --- a/appview/pages/templates/repo/compare/new.html +++ b/appview/pages/templates/repo/compare/new.html @@ -1,6 +1,5 @@ {{ define "title" }} - compare refs on - {{ .RepoInfo.FullName }} + compare refs on {{ .RepoInfo.FullName }} {{ end }} {{ define "repoContent" }} @@ -10,27 +9,21 @@ {{ 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 72e72973..7190f132 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,72 +10,41 @@ {{ 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" }} - -

- 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! -

+

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!

{{ 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 9b687406..cb1b81bb 100644 --- a/appview/pages/templates/repo/fork.html +++ b/appview/pages/templates/repo/fork.html @@ -1,48 +1,38 @@ {{ define "title" }}fork · {{ .RepoInfo.FullName }}{{ end }} {{ define "content" }} -
-

- Fork - {{ .RepoInfo.FullName }} -

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

No knots available.

- {{ end }} +
+

Fork {{ .RepoInfo.FullName }}

+
+
+ +
+ Select a knot to fork into +
+
+ {{ range .Knots }} +
+ + {{ . }}
+ {{ 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 4f854081..b4d98b7c 100644 --- a/appview/pages/templates/repo/fragments/artifact.html +++ b/appview/pages/templates/repo/fragments/artifact.html @@ -1,34 +1,20 @@ {{ 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) }}
+

+ Note that for self-hosted knots, clone URLs may be different based + on your setup. +

+
{{ end }} diff --git a/appview/pages/templates/repo/fragments/compareAllowPull.html b/appview/pages/templates/repo/fragments/compareAllowPull.html index 00f99149..870a3a9e 100644 --- a/appview/pages/templates/repo/fragments/compareAllowPull.html +++ b/appview/pages/templates/repo/fragments/compareAllowPull.html @@ -1,26 +1,28 @@ {{ 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 f37c379e..32c26dbd 100644 --- a/appview/pages/templates/repo/fragments/compareForm.html +++ b/appview/pages/templates/repo/fragments/compareForm.html @@ -1,82 +1,73 @@ {{ 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 a966d4fe..34da43cf 100644 --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -10,147 +10,98 @@ {{ $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 }} - - {{ template "repo/fragments/diffStatPill" .Stats }} -
+
+
+
+
+ +
+
+
+ {{ $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 }} -
- {{ if .IsDelete }} - - {{ .Name.Old }} - - {{ else if (or .IsCopy .IsRename) }} - - {{ .Name.Old }} - - {{ i "arrow-right" "w-4 h-4" }} - - {{ .Name.New }} - - {{ else }} - - {{ .Name.New }} - - {{ end }} -
+ {{ template "repo/fragments/diffStatPill" .Stats }}
- {{ $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 .IsDelete }} + + {{ .Name.Old }} + + {{ else if (or .IsCopy .IsRename) }} + + {{ .Name.Old }} + + {{ i "arrow-right" "w-4 h-4" }} + + {{ .Name.New }} + + {{ else }} + + {{ .Name.New }} - {{ 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 .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" . -}} + {{ $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 }} - {{- end -}} + + {{ if lt $idx $last }} + {{ $next := index $diff (add $idx 1) }} + {{ i "arrow-down" "w-4 h-4" }} + {{ 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 46bc78c1..34c43029 100644 --- a/appview/pages/templates/repo/fragments/diffChangedFiles.html +++ b/appview/pages/templates/repo/fragments/diffChangedFiles.html @@ -1,13 +1,10 @@ {{ 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 9ecdcaf3..d6d0db0b 100644 --- a/appview/pages/templates/repo/fragments/diffOpts.html +++ b/appview/pages/templates/repo/fragments/diffOpts.html @@ -1,14 +1,12 @@ {{ 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 }} @@ -16,20 +14,14 @@ {{ $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 76bb4d6d..4ebbf745 100644 --- a/appview/pages/templates/repo/fragments/diffStatPill.html +++ b/appview/pages/templates/repo/fragments/diffStatPill.html @@ -1,24 +1,13 @@ {{ 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 8f39037a..85d6b8c1 100644 --- a/appview/pages/templates/repo/fragments/editRepoDescription.html +++ b/appview/pages/templates/repo/fragments/editRepoDescription.html @@ -1,24 +1,11 @@ {{ define "repo/fragments/editRepoDescription" }} -
- - - -
+ {{ end }} diff --git a/appview/pages/templates/repo/fragments/fileTree.html b/appview/pages/templates/repo/fragments/fileTree.html index ae176860..3453c208 100644 --- a/appview/pages/templates/repo/fragments/fileTree.html +++ b/appview/pages/templates/repo/fragments/fileTree.html @@ -4,9 +4,7 @@ {{ i "folder" "flex-shrink-0 size-4 fill-current" }} - - {{ .Name }} - + {{ .Name }}
@@ -18,11 +16,7 @@ {{ else if .Name }}
{{ i "file" "flex-shrink-0 size-4" }} - - {{ .Name }} - + {{ .Name }}
{{ else }} {{ range $child := .Children }} @@ -30,3 +24,4 @@ {{ end }} {{ end }} {{ end }} + diff --git a/appview/pages/templates/repo/fragments/interdiff.html b/appview/pages/templates/repo/fragments/interdiff.html index 26969beb..d66d73c9 100644 --- a/appview/pages/templates/repo/fragments/interdiff.html +++ b/appview/pages/templates/repo/fragments/interdiff.html @@ -1,134 +1,92 @@ {{ 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 }} - {{ $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 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 20674af4..26d3d995 100644 --- a/appview/pages/templates/repo/fragments/interdiffFiles.html +++ b/appview/pages/templates/repo/fragments/interdiffFiles.html @@ -1,12 +1,11 @@ {{ define "repo/fragments/interdiffFiles" }} - {{ $fileTree := fileTree .AffectedFiles }} -
-
-
- files -
- {{ template "repo/fragments/fileTree" $fileTree }} +{{ $fileTree := fileTree .AffectedFiles }} +
+
+
+ files
-
+ {{ 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 162ebf82..2fb0dd36 100644 --- a/appview/pages/templates/repo/fragments/meta.html +++ b/appview/pages/templates/repo/fragments/meta.html @@ -1,20 +1,26 @@ {{ define "repo/fragments/meta" }} - - - - - - + + + + + + {{ end }} diff --git a/appview/pages/templates/repo/fragments/og.html b/appview/pages/templates/repo/fragments/og.html index c549a825..88131589 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 70c3bfb7..c9d032fd 100644 --- a/appview/pages/templates/repo/fragments/reaction.html +++ b/appview/pages/templates/repo/fragments/reaction.html @@ -1,27 +1,34 @@ {{ 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 0043a408..1464d3fa 100644 --- a/appview/pages/templates/repo/fragments/reactionsPopUp.html +++ b/appview/pages/templates/repo/fragments/reactionsPopUp.html @@ -1,24 +1,30 @@ {{ 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 4203c43d..3d4685a1 100644 --- a/appview/pages/templates/repo/fragments/repoDescription.html +++ b/appview/pages/templates/repo/fragments/repoDescription.html @@ -1,21 +1,15 @@ {{ 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 76db9fce..7ca59a95 100644 --- a/appview/pages/templates/repo/fragments/repoStar.html +++ b/appview/pages/templates/repo/fragments/repoStar.html @@ -1,25 +1,26 @@ {{ 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 32e119ff..1fe3c9a4 100644 --- a/appview/pages/templates/repo/fragments/splitDiff.html +++ b/appview/pages/templates/repo/fragments/splitDiff.html @@ -1,116 +1,61 @@ {{ 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 9d83e9cc..1e2521a3 100644 --- a/appview/pages/templates/repo/fragments/time.html +++ b/appview/pages/templates/repo/fragments/time.html @@ -1,27 +1,19 @@ {{ 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 }} + +{{ end }} \ No newline at end of file diff --git a/appview/pages/templates/repo/fragments/unifiedDiff.html b/appview/pages/templates/repo/fragments/unifiedDiff.html index 66ea2653..e036410d 100644 --- a/appview/pages/templates/repo/fragments/unifiedDiff.html +++ b/appview/pages/templates/repo/fragments/unifiedDiff.html @@ -1,81 +1,47 @@ {{ 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 9c6ff146..f7c5bdcc 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -1,137 +1,133 @@ {{ 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 }} @@ -156,11 +152,7 @@
@@ -169,176 +161,149 @@ {{ 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 }} -
- {{ if gt (len $messageParts) 1 }} - + {{ 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 }} - - - - - {{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }} - - {{ if $didOrHandle }} - {{ template "user/fragments/picHandleLink" $didOrHandle }} - {{ else }} - {{ .Author.Name }} - {{ end }} + {{ end }} + + + {{ slice .Hash.String 0 8 }} + {{ if $verified }} + {{ i "shield-check" "w-3 h-3" }} + {{ end }} - -
- {{ template "repo/fragments/time" .Committer.When }} - - - - {{ $tagsForCommit := index $.TagMap .Hash.String }} - {{ if gt (len $tagsForCommit) 0 }} -
- {{ end }} - {{ range $tagsForCommit }} - - {{ . }} - - {{ end }} + + + + {{ $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 }} -
-
- {{ 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 }} {{ 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 - - {{ end }} -
- {{ if ne $.Ref .Reference.Name }} - - {{ i "git-compare" "w-3 h-3" }} compare - +
+
+ + {{ .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 }} +
{{ end }}
@@ -347,50 +312,34 @@ {{ 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 }}
@@ -398,25 +347,22 @@ {{ 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 735cf203..5b62a8ac 100644 --- a/appview/pages/templates/repo/issues/fragments/editIssueComment.html +++ b/appview/pages/templates/repo/issues/fragments/editIssueComment.html @@ -1,56 +1,51 @@ {{ 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 74ed4cbe..27376710 100644 --- a/appview/pages/templates/repo/issues/fragments/issueComment.html +++ b/appview/pages/templates/repo/issues/fragments/issueComment.html @@ -1,61 +1,58 @@ {{ define "repo/issues/fragments/issueComment" }} {{ with .Comment }} -
-
- {{ template "user/fragments/picHandleLink" .OwnerDid }} - - - - {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} - {{ if $isIssueAuthor }} - - author - {{ end }} - +
+
+ {{ template "user/fragments/picHandleLink" .OwnerDid }} + + {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} + {{ if $isIssueAuthor }} - + - {{ 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) }} - - + {{ if .Deleted }} + deleted {{ template "repo/fragments/time" .Deleted }} + {{ else if .Edited }} + edited {{ template "repo/fragments/time" .Edited }} + {{ else }} + {{ template "repo/fragments/time" .Created }} {{ end }} + -
- {{ if not .Deleted }} -
- {{ .Body | markdown }} -
+ {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} + {{ if and $isCommentOwner (not .Deleted) }} + + {{ 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 e5336200..9dc9a65a 100644 --- a/appview/pages/templates/repo/issues/issue.html +++ b/appview/pages/templates/repo/issues/issue.html @@ -1,143 +1,138 @@ -{{ 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 }} - - -
-
-
- {{ 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 }} -
+ #{{ .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 }} + +
-
- {{ 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 }} -
+
+ {{ range $index, $comment := .Comments }} +
+ {{ if gt $index 0 }} +
+ {{ end }} + {{ template "repo/issues/fragments/issueComment" (dict "RepoInfo" $.RepoInfo "LoggedInUser" $.LoggedInUser "Issue" $.Issue "Comment" .)}} +
{{ 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 591b209f..7f01a1e3 100644 --- a/appview/pages/templates/repo/issues/issues.html +++ b/appview/pages/templates/repo/issues/issues.html @@ -1,135 +1,124 @@ {{ 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 }} - - -

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

+ {{ 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 9133799f..b3474856 100644 --- a/appview/pages/templates/repo/issues/new.html +++ b/appview/pages/templates/repo/issues/new.html @@ -1,35 +1,37 @@ {{ 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 2423bc18..ae9f9d76 100644 --- a/appview/pages/templates/repo/log.html +++ b/appview/pages/templates/repo/log.html @@ -1,260 +1,187 @@ {{ 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 +

-
+
+ {{ 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 21f16f5a..09724f5e 100644 --- a/appview/pages/templates/repo/new.html +++ b/appview/pages/templates/repo/new.html @@ -1,81 +1,74 @@ {{ 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 }} -
- - {{ . }} -
- {{ else }} -

No knots available.

- {{ end }} +
+ Select a knot +
+
+ {{ range .Knots }} +
+ + {{ . }}
+ {{ 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 b74928a8..3e1b56df 100644 --- a/appview/pages/templates/repo/pipelines/fragments/logBlock.html +++ b/appview/pages/templates/repo/pipelines/fragments/logBlock.html @@ -1,24 +1,15 @@ {{ define "repo/pipelines/fragments/logBlock" }} -
-
- -
- {{ i "chevron-right" "w-4 h-4" }} - {{ .Name }} -
- -
-
-
{{ .Command }}
-
+
+
+ +
+ {{ i "chevron-right" "w-4 h-4" }} {{ .Name }}
-
-
+ + +
{{ .Command }}
+
+
{{ end }} diff --git a/appview/pages/templates/repo/pipelines/fragments/logLine.html b/appview/pages/templates/repo/pipelines/fragments/logLine.html index b83642d1..c1f3e1c6 100644 --- a/appview/pages/templates/repo/pipelines/fragments/logLine.html +++ b/appview/pages/templates/repo/pipelines/fragments/logLine.html @@ -1,5 +1,4 @@ {{ 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 dc9692d8..6dea6bca 100644 --- a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html +++ b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html @@ -37,46 +37,33 @@ {{ $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 73b64af1..1b2c9a94 100644 --- a/appview/pages/templates/repo/pipelines/fragments/tooltip.html +++ b/appview/pages/templates/repo/pipelines/fragments/tooltip.html @@ -2,38 +2,33 @@ {{ $repoinfo := .RepoInfo }} {{ $pipeline := .Pipeline }} {{ $id := $pipeline.Id }} -
+
{{ range $name, $all := $pipeline.Statuses }} - - diff --git a/appview/pages/templates/repo/pipelines/pipelines.html b/appview/pages/templates/repo/pipelines/pipelines.html index 90639b56..457c1897 100644 --- a/appview/pages/templates/repo/pipelines/pipelines.html +++ b/appview/pages/templates/repo/pipelines/pipelines.html @@ -1,30 +1,31 @@ {{ 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 }} @@ -32,81 +33,70 @@ {{ $root := index . 0 }} {{ $p := index . 1 }} {{ with $p }} -
-
- {{ .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 }} -
{{ end }} {{ end }} diff --git a/appview/pages/templates/repo/pipelines/workflow.html b/appview/pages/templates/repo/pipelines/workflow.html index bb94aed2..0ec37983 100644 --- a/appview/pages/templates/repo/pipelines/workflow.html +++ b/appview/pages/templates/repo/pipelines/workflow.html @@ -1,23 +1,20 @@ -{{ 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" }} @@ -28,47 +25,39 @@ {{ 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 5f3391d2..e98b3d83 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullActions.html +++ b/appview/pages/templates/repo/pulls/fragments/pullActions.html @@ -23,83 +23,84 @@ {{ $isSameRepoBranch := .Pull.IsBranchBased }} {{ $isUpToDate := .ResubmitCheck.No }}
-
- - {{ if and $isPushAllowed $isOpen $isLastRound }} - {{ $disabled := "" }} - {{ if $isConflicted }} - {{ $disabled = "disabled" }} - {{ end }} - - {{ end }} - - {{ if and $isPullAuthor $isOpen $isLastRound }} - {{ $disabled := "" }} - {{ if $isUpToDate }} - {{ $disabled = "disabled" }} + {{ if and $isPushAllowed $isOpen $isLastRound }} + {{ $disabled := "" }} + {{ if $isConflicted }} + {{ $disabled = "disabled" }} + {{ end }} + {{ 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 dc127e67..bad7b045 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html @@ -1,48 +1,45 @@ {{ 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 }} - - - - {{ 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 }} + +
-
-
- - -
+
+ + +
-

- 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 016107a3..3dd79030 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 450ea2f6..cc426f5f 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html @@ -1,23 +1,25 @@ {{ 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 53a8d24f..22968aa5 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullHeader.html +++ b/appview/pages/templates/repo/pulls/fragments/pullHeader.html @@ -1,92 +1,83 @@ {{ 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 }} - - + + + 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 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 c90b508a..986dd05a 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullNewComment.html +++ b/appview/pages/templates/repo/pulls/fragments/pullNewComment.html @@ -1,37 +1,40 @@ {{ 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 f1176e02..9f330a11 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html +++ b/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html @@ -1,23 +1,21 @@ {{ 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 9a288d56..e0ee0685 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullResubmit.html +++ b/appview/pages/templates/repo/pulls/fragments/pullResubmit.html @@ -1,61 +1,65 @@ {{ define "repo/pulls/fragments/pullResubmit" }}
-
- {{ i "pencil" "w-4 h-4" }} - resubmit your patch -
+ 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"> -
- 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. -
+
+ {{ 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. +
+ +
+ - - - + + + + -
-
-
+
+
+
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullStack.html b/appview/pages/templates/repo/pulls/fragments/pullStack.html index 472d1960..1c856236 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullStack.html +++ b/appview/pages/templates/repo/pulls/fragments/pullStack.html @@ -1,7 +1,6 @@ {{ define "repo/pulls/fragments/pullStack" }}
- + {{ i "chevrons-up-down" "w-4 h-4" }} @@ -10,19 +9,15 @@ {{ 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" }} @@ -31,13 +26,10 @@ {{ 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 }} @@ -45,30 +37,21 @@ {{ 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 d78023c7..f6dc6db8 100644 --- a/appview/pages/templates/repo/pulls/fragments/summarizedPullHeader.html +++ b/appview/pages/templates/repo/pulls/fragments/summarizedPullHeader.html @@ -19,20 +19,16 @@ {{ $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 }} @@ -41,3 +37,4 @@
{{ end }} {{ end }} + diff --git a/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html b/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html index 50d69ccc..c87eb0c5 100644 --- a/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html +++ b/appview/pages/templates/repo/pulls/fragments/summarizedPullState.html @@ -17,3 +17,4 @@ {{ i $icon $style }} {{ end }} + diff --git a/appview/pages/templates/repo/pulls/interdiff.html b/appview/pages/templates/repo/pulls/interdiff.html index 6ad47344..81da1b22 100644 --- a/appview/pages/templates/repo/pulls/interdiff.html +++ b/appview/pages/templates/repo/pulls/interdiff.html @@ -1,35 +1,31 @@ {{ 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) }} +{{ 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) }} {{ 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" }} @@ -45,14 +41,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }}{{ end }} -
-
- {{ block "contentAfter" . }}{{ end }} -
+
+
+ {{ block "contentAfterLeft" . }} {{ end }}
+
+ {{ block "contentAfter" . }}{{ end }} +
+
{{ end }}
{{ end }} @@ -63,9 +59,10 @@ {{ end }} + {{ define "contentAfter" }} {{ template "repo/fragments/interdiff" (list .RepoInfo.FullName .Interdiff .DiffOpts) }} -{{ end }} +{{end}} {{ define "contentAfterLeft" }}
@@ -74,4 +71,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 084da8f2..9b7043ee 100644 --- a/appview/pages/templates/repo/pulls/new.html +++ b/appview/pages/templates/repo/pulls/new.html @@ -1,145 +1,155 @@ {{ 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 7bbf04a2..3769c3af 100644 --- a/appview/pages/templates/repo/pulls/patch.html +++ b/appview/pages/templates/repo/pulls/patch.html @@ -1,42 +1,37 @@ {{ 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) }} +{{ 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 }} + {{ 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" }} @@ -52,14 +47,14 @@ {{ end }} {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }}{{ end }} -
-
- {{ block "contentAfter" . }}{{ end }} -
+
+
+ {{ block "contentAfterLeft" . }} {{ end }}
+
+ {{ block "contentAfter" . }}{{ end }} +
+
{{ end }}
{{ end }} @@ -72,7 +67,7 @@ {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} -{{ end }} +{{end}} {{ define "contentAfterLeft" }}
@@ -81,4 +76,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 eb5248b3..d7bac1fe 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,159 +37,123 @@ {{ $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 }} - - - - {{ 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 }} -
+ {{ $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 }} +
{{ end }}
{{ range $cidx, $c := .Comments }} -
+
{{ if gt $cidx 0 }} -
+
{{ end }} -
+
{{ $c.Body | markdown }} @@ -197,68 +161,60 @@
{{ 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" }} @@ -268,15 +224,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 }}
@@ -284,27 +240,23 @@
{{ 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 }} @@ -315,31 +267,28 @@ {{ 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 5aade8b0..98babf57 100644 --- a/appview/pages/templates/repo/pulls/pulls.html +++ b/appview/pages/templates/repo/pulls/pulls.html @@ -1,166 +1,147 @@ {{ 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" }} -
- -
+
{{ end }} {{ define "repoAfter" }} -
- {{ 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 +
+ {{ range .Pulls }} +
+
+ -
- {{ block "pullList" (list $otherPulls $) }}{{ end }} -
- {{ 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 }} +
{{ 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 eec0ef21..010c5c61 100644 --- a/appview/pages/templates/repo/settings/access.html +++ b/appview/pages/templates/repo/settings/access.html @@ -1,7 +1,4 @@ -{{ define "title" }} - {{ .Tab }} settings · - {{ .RepoInfo.FullName }} -{{ end }} +{{ define "title" }}{{ .Tab }} settings · {{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }}
@@ -19,8 +16,7 @@

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" . }} @@ -38,7 +34,7 @@ {{ .Handle }} + class="rounded-full h-10 w-10 border border-gray-300 dark:border-gray-600 flex-shrink-0"/>
@@ -58,8 +54,7 @@ popovertarget="add-collaborator-modal" popovertargetaction="toggle">
-
+
{{ i "user-plus" "size-4" }}
@@ -77,40 +72,39 @@ {{ 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 92a1ce8d..e5aab5ef 100644 --- a/appview/pages/templates/repo/settings/fragments/secretListing.html +++ b/appview/pages/templates/repo/settings/fragments/secretListing.html @@ -1,24 +1,16 @@ {{ 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 0f77deb6..90bbf957 100644 --- a/appview/pages/templates/repo/settings/fragments/sidebar.html +++ b/appview/pages/templates/repo/settings/fragments/sidebar.html @@ -1,24 +1,16 @@ {{ 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 2299bb23..65a1a6a9 100644 --- a/appview/pages/templates/repo/settings/general.html +++ b/appview/pages/templates/repo/settings/general.html @@ -1,7 +1,4 @@ -{{ define "title" }} - {{ .Tab }} settings · - {{ .RepoInfo.FullName }} -{{ end }} +{{ define "title" }}{{ .Tab }} settings · {{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }}
@@ -25,20 +22,13 @@ unless you specify a different branch.

-
- + {{ range .Branches }} - {{ end }} @@ -53,31 +43,26 @@ {{ 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 1582d589..afcfa2dc 100644 --- a/appview/pages/templates/repo/settings/pipelines.html +++ b/appview/pages/templates/repo/settings/pipelines.html @@ -1,7 +1,4 @@ -{{ define "title" }} - {{ .Tab }} settings · - {{ .RepoInfo.FullName }} -{{ end }} +{{ define "title" }}{{ .Tab }} settings · {{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }}
@@ -25,51 +22,37 @@

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 }} - @@ -83,17 +66,16 @@

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 }} @@ -118,47 +100,46 @@ 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 8636e02e..098a1358 100644 --- a/appview/pages/templates/repo/tree.html +++ b/appview/pages/templates/repo/tree.html @@ -1,122 +1,90 @@ -{{ 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 }} -
-
-
- - - -
- {{ with .LastCommit }} - - {{ template "repo/fragments/time" .When }} - - {{ 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 }} +
+
- {{ end }} -
-
-{{ end }} + + +
+ {{ with .LastCommit }} + {{ template "repo/fragments/time" .When }} + {{ end }} +
+
+ {{ end }} + +
+
+{{end}} diff --git a/appview/pages/templates/settings.html b/appview/pages/templates/settings.html index 9a351058..8a1979ba 100644 --- a/appview/pages/templates/settings.html +++ b/appview/pages/templates/settings.html @@ -5,209 +5,180 @@

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 }} +
+
-
+ + 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 - - {{ end }} - {{ if .Primary }} - - primary - - {{ end }} -
-
-

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

-
-
- {{ if not .Verified }} - +

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 and (not .Primary) .Verified }} - - set as primary - - {{ end }} - {{ if not .Primary }} -
- - -
+ {{ if .Primary }} + primary {{ end }}
- {{ end }} +

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

+
+
+ {{ if not .Verified }} + + {{ end }} + {{ if and (not .Primary) .Verified }} + + set as primary + + {{ end }} + {{ if not .Primary }} +
+ + +
+ {{ 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 7bd2091c..0497bda7 100644 --- a/appview/pages/templates/spindles/dashboard.html +++ b/appview/pages/templates/spindles/dashboard.html @@ -1,48 +1,42 @@ -{{ 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 }} - {{ end }} - {{ else }} - - {{ i "shield-off" "w-4 h-4" }} unverified - - {{ if $isOwner }} - {{ block "retryButton" .Spindle }}{{ end }} - {{ end }} +
+
+

{{ .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 "deleteButton" .Spindle }}{{ end }} + {{ block "retryButton" .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 }}
@@ -51,7 +45,7 @@ {{ template "user/fragments/picHandleLink" . }}
{{ if ne $.LoggedInUser.Did . }} - {{ block "removeMemberButton" (list $ . ) }}{{ end }} + {{ block "removeMemberButton" (list $ . ) }} {{ end }} {{ end }}
@@ -80,38 +74,44 @@ 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 3da58f30..47f4d8e9 100644 --- a/appview/pages/templates/spindles/fragments/addMemberModal.html +++ b/appview/pages/templates/spindles/fragments/addMemberModal.html @@ -3,9 +3,10 @@ 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" }} @@ -13,45 +14,44 @@ 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 45929b0f..56ae1e03 100644 --- a/appview/pages/templates/spindles/fragments/spindleListing.html +++ b/appview/pages/templates/spindles/fragments/spindleListing.html @@ -1,31 +1,27 @@ {{ 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 }} @@ -33,19 +29,13 @@
{{ $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 }} @@ -55,23 +45,26 @@ 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 2fbecea6..d26c088c 100644 --- a/appview/pages/templates/spindles/index.html +++ b/appview/pages/templates/spindles/index.html @@ -1,26 +1,24 @@ {{ define "title" }}spindles{{ end }} {{ define "content" }} -
-

Spindles

-
+
+

Spindles

+
-
-
- {{ block "about" . }}{{ end }} - {{ block "list" . }}{{ end }} - {{ block "register" . }}{{ end }} -
-
+
+
+ {{ 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.

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

- your spindles -

-
+

your spindles

+
{{ range $spindle := .Spindles }} {{ template "spindles/fragments/spindleListing" . }} {{ else }} -
+
no spindles registered yet
{{ end }} @@ -49,17 +43,14 @@ {{ 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 fccd8003..e7ab5879 100644 --- a/appview/pages/templates/strings/dashboard.html +++ b/appview/pages/templates/strings/dashboard.html @@ -1,25 +1,22 @@ -{{ 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" }} @@ -28,9 +25,7 @@ {{ range .Strings }} {{ template "singleString" (list $ .) }} {{ else }} -

- This user does not have any strings yet. -

+

This user does not have any strings yet.

{{ end }}
{{ end }} @@ -40,23 +35,17 @@ {{ $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 837b48c1..2badb23e 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 07fe895d..98d1d400 100644 --- a/appview/pages/templates/user/fragments/bluesky.html +++ b/appview/pages/templates/user/fragments/bluesky.html @@ -1,14 +1,6 @@ {{ 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 a9a82c2a..042acd94 100644 --- a/appview/pages/templates/user/fragments/editBio.html +++ b/appview/pages/templates/user/fragments/editBio.html @@ -11,14 +11,12 @@ {{ $description = .Profile.Description }} {{ end }} - + placeholder="write a bio">{{ $description }}
@@ -29,11 +27,7 @@ {{ $location = .Profile.Location }} {{ end }} {{ i "map-pin" "size-4" }} - +
@@ -44,15 +38,8 @@ {{ if and .Profile .Profile.IncludeBluesky }} {{ $includeBsky = true }} {{ end }} - - + +
{{ $profile := .Profile }} @@ -64,15 +51,9 @@ {{ end }} {{ end }} -
{{ i "link" "size-4" }} - +
{{ end }}
@@ -80,35 +61,27 @@
{{ 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 }} + {{ $stat := "" }} + {{ if and $profile $profile.Stats }} + {{ if lt $idx (len $profile.Stats) }} + {{ $s := index $profile.Stats $idx }} + {{ $stat = $s.Kind }} + {{ end }} {{ end }} - {{ end }} - {{ block "stat" (list $idx $stat) }}{{ end }} + {{ block "stat" (list $idx $stat) }} {{ end }} {{ end }}
- - - @@ -119,25 +92,20 @@ {{ 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 3a16c5b4..15c1a5bb 100644 --- a/appview/pages/templates/user/fragments/editPins.html +++ b/appview/pages/templates/user/fragments/editPins.html @@ -1,53 +1,33 @@ {{ define "user/fragments/editPins" }} {{ $profile := .Profile }} -
-
-

SELECT PINNED REPOS

-
-
-
- {{ range $idx, $r := .AllRepos }} -
- -