]> source.dussan.org Git - gitea.git/commit
Use fetch to send requests to create issues/comments (#25258)
authorwxiaoguang <wxiaoguang@gmail.com>
Fri, 16 Jun 2023 06:32:43 +0000 (14:32 +0800)
committerGitHub <noreply@github.com>
Fri, 16 Jun 2023 06:32:43 +0000 (06:32 +0000)
commitb71cb7acdc8840c9fc16b496c90a048051d15823
treefae5454a2c9f1a7d510255260b562519681841c0
parenta305c37e62eca42aaad16b4521520bad6bca58d2
Use fetch to send requests to create issues/comments (#25258)

Follow #23290

Network error won't make content lost. And this is a much better
approach than "loading-button".

The UI is not perfect and there are still some TODOs, they can be done
in following PRs, not a must in this PR's scope.

<details>

![image](https://github.com/go-gitea/gitea/assets/2114189/c94ba958-aa46-4747-8ddf-6584deeed25c)

</details>
14 files changed:
modules/context/base.go
modules/context/context_response.go
modules/httplib/url.go [new file with mode: 0644]
modules/httplib/url_test.go [new file with mode: 0644]
modules/test/utils.go
routers/common/redirect.go [new file with mode: 0644]
routers/init.go
routers/web/repo/issue.go
templates/repo/issue/new_form.tmpl
templates/repo/issue/view_content.tmpl
tests/integration/attachment_test.go
tests/integration/issue_test.go
web_src/js/features/common-global.js
web_src/js/features/repo-issue.js