From b51ba4e663afaf4ae807edb1d071dee230e99479 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Fri, 22 May 2026 11:31:23 +0100 Subject: [PATCH] appview/pages: removed unused templates Signed-off-by: oppiliappan --- appview/pages/pages.go | 31 --------- appview/pages/templates/repo/commit.html | 6 -- .../pages/templates/repo/compare/compare.html | 8 --- .../pages/templates/repo/pulls/interdiff.html | 42 ------------ appview/pages/templates/repo/pulls/patch.html | 67 ------------------- 5 files changed, 154 deletions(-) delete mode 100644 appview/pages/templates/repo/pulls/interdiff.html delete mode 100644 appview/pages/templates/repo/pulls/patch.html diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 8e7976be..8ef90bbe 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -27,7 +27,6 @@ import ( "tangled.org/core/appview/pages/repoinfo" "tangled.org/core/appview/pagination" "tangled.org/core/idresolver" - "tangled.org/core/patchutil" "tangled.org/core/types" "github.com/bluesky-social/indigo/atproto/identity" @@ -1352,36 +1351,6 @@ func (p *Pages) RepoSinglePull(w io.Writer, params RepoSinglePullParams) error { return p.executeRepo("repo/pulls/pull", w, params) } -type RepoPullPatchParams struct { - LoggedInUser *oauth.MultiAccountUser - RepoInfo repoinfo.RepoInfo - Pull *models.Pull - Stack models.Stack - Diff *types.NiceDiff - Round int - Submission *models.PullSubmission - DiffOpts types.DiffOpts -} - -// this name is a mouthful -func (p *Pages) RepoPullPatchPage(w io.Writer, params RepoPullPatchParams) error { - return p.execute("repo/pulls/patch", w, params) -} - -type RepoPullInterdiffParams struct { - LoggedInUser *oauth.MultiAccountUser - RepoInfo repoinfo.RepoInfo - Pull *models.Pull - Round int - Interdiff *patchutil.InterdiffResult - DiffOpts types.DiffOpts -} - -// this name is a mouthful -func (p *Pages) RepoPullInterdiffPage(w io.Writer, params RepoPullInterdiffParams) error { - return p.execute("repo/pulls/interdiff", w, params) -} - type PullResubmitParams struct { LoggedInUser *oauth.MultiAccountUser RepoInfo repoinfo.RepoInfo diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index 8cd0be20..4bc99de6 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -111,12 +111,6 @@ {{ end }} {{ end }} -{{ define "topbarLayout" }} -
- {{ template "layouts/fragments/topbar" . }} -
-{{ end }} - {{ define "mainLayout" }}
{{ block "contentLayout" . }} diff --git a/appview/pages/templates/repo/compare/compare.html b/appview/pages/templates/repo/compare/compare.html index cba51bb2..f52f9455 100644 --- a/appview/pages/templates/repo/compare/compare.html +++ b/appview/pages/templates/repo/compare/compare.html @@ -10,12 +10,6 @@ {{ end }} {{ end }} -{{ define "topbarLayout" }} -
- {{ template "layouts/fragments/topbar" . }} -
-{{ end }} - {{ define "mainLayout" }}
{{ block "contentLayout" . }} @@ -26,8 +20,6 @@
{{ end }} - - {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .Diff .DiffOpts) }} {{end}} diff --git a/appview/pages/templates/repo/pulls/interdiff.html b/appview/pages/templates/repo/pulls/interdiff.html deleted file mode 100644 index 80ba4c00..00000000 --- a/appview/pages/templates/repo/pulls/interdiff.html +++ /dev/null @@ -1,42 +0,0 @@ -{{ define "title" }} - 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.org/%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 }} -
-
- {{ template "repo/pulls/fragments/pullHeader" . }} -
-
-{{ end }} - -{{ define "mainLayout" }} -
- {{ block "contentLayout" . }} - {{ block "content" . }}{{ end }} - {{ end }} - - {{ block "contentAfter" . }}{{ end }} -
-{{ end }} - -{{ define "contentAfter" }} - {{ template "repo/fragments/diff" (list .Interdiff .DiffOpts) }} -{{end}} diff --git a/appview/pages/templates/repo/pulls/patch.html b/appview/pages/templates/repo/pulls/patch.html deleted file mode 100644 index 20a26afe..00000000 --- a/appview/pages/templates/repo/pulls/patch.html +++ /dev/null @@ -1,67 +0,0 @@ -{{ define "title" }} - 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.org/%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" . }} -
-
-{{ end }} - -{{ define "mainLayout" }} -
- {{ block "contentLayout" . }} - {{ block "content" . }}{{ end }} - {{ end }} - - {{ block "contentAfterLayout" . }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} -
-
- {{ block "contentAfter" . }}{{ end }} -
-
- {{ end }} -
-{{ end }} - -{{ define "contentAfter" }} - {{ template "repo/fragments/diff" (list .Diff .DiffOpts) }} -{{end}} - -{{ define "contentAfterLeft" }} -
- {{ template "repo/fragments/diffOpts" .DiffOpts }} -
-
- {{ template "repo/fragments/diffChangedFiles" .Diff }} -
-{{end}} -- 2.51.2