diff --git a/package-lock.json b/package-lock.json index d73fc5df5a..b299967eba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "esbuild-loader": "4.0.2", "escape-goat": "4.0.0", "fast-glob": "3.3.2", - "htmx.org": "1.9.10", "jquery": "3.7.1", "katex": "0.16.9", "license-checker-webpack-plugin": "0.2.1", @@ -6159,11 +6158,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/htmx.org": { - "version": "1.9.10", - "resolved": "https://registry.npmjs.org/htmx.org/-/htmx.org-1.9.10.tgz", - "integrity": "sha512-UgchasltTCrTuU2DQLom3ohHrBvwr7OqpwyAVJ9VxtNBng4XKkVsqrv0Qr3srqvM9ZNI3f1MmvVQQqK7KW/bTA==" - }, "node_modules/http-proxy-agent": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", diff --git a/package.json b/package.json index 5c6de1dd62..801e85db83 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "esbuild-loader": "4.0.2", "escape-goat": "4.0.0", "fast-glob": "3.3.2", - "htmx.org": "1.9.10", "jquery": "3.7.1", "katex": "0.16.9", "license-checker-webpack-plugin": "0.2.1", diff --git a/routers/web/repo/issue_watch.go b/routers/web/repo/issue_watch.go index 1f51ceba5e..1cb5cc7162 100644 --- a/routers/web/repo/issue_watch.go +++ b/routers/web/repo/issue_watch.go @@ -8,15 +8,10 @@ import ( "strconv" issues_model "code.gitea.io/gitea/models/issues" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" ) -const ( - tplWatching base.TplName = "repo/issue/view_content/watching" -) - // IssueWatch sets issue watching func IssueWatch(ctx *context.Context) { issue := GetActionIssue(ctx) @@ -57,7 +52,5 @@ func IssueWatch(ctx *context.Context) { return } - ctx.Data["Issue"] = issue - ctx.Data["IssueWatch"] = &issues_model.IssueWatch{IsWatching: watch} - ctx.HTML(http.StatusOK, tplWatching) + ctx.Redirect(issue.Link()) } diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 73ab93caed..c5305ebcd9 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -14,7 +14,6 @@ import ( "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" @@ -27,10 +26,6 @@ import ( shared_user "code.gitea.io/gitea/routers/web/shared/user" ) -const ( - tplProfileBigAvatar base.TplName = "shared/user/profile_big_avatar" -) - // OwnerProfile render profile page for a user or a organization (aka, repo owner) func OwnerProfile(ctx *context.Context) { if strings.Contains(ctx.Req.Header.Get("Accept"), "application/rss+xml") { @@ -314,10 +309,8 @@ func Action(ctx *context.Context) { if err != nil { log.Error("Failed to apply action %q: %v", ctx.FormString("action"), err) - ctx.Error(http.StatusBadRequest, fmt.Sprintf("Action %q failed", ctx.FormString("action"))) + ctx.JSONError(fmt.Sprintf("Action %q failed", ctx.FormString("action"))) return } - - shared_user.PrepareContextForProfileBigAvatar(ctx) - ctx.HTML(http.StatusOK, tplProfileBigAvatar) + ctx.JSONOK() } diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 6c13eef023..4334e4bcbd 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -270,7 +270,19 @@