summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Show hint to link package to repo when viewing empty repo package list (#20504)Norwin2022-07-271-0/+4
| | | | | | | * show hint to link package to repo on empty repo package listing * reword
* Fix org members bug (#20489)Vladimir Yakovlev2022-07-261-1/+1
| | | | | | | * Fix bug in public only org members list bug was introduced in d6779c7ad3 * Expanded org unit test
* Add labels to two buttons that were missing them (#20419)techknowlogick2022-07-262-2/+2
|
* Display project in issue list (#20434)aceArt-GmbH2022-07-261-0/+5
| | | Co-authored-by: lukas <lukas.walter@aceart.de>
* Make code review ceckboxes clickable (#20481)Vladimir Yakovlev2022-07-261-1/+1
|
* Use body text color in repository files table links (#20386)Lucas Azevedo2022-07-221-6/+6
| | | | | | | | Use body text color in for links in the repository files table Issue/PR links (`.ref-issue`) will not be affected, as seen in other git services. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Dismiss prior pull reviews if done via web in review dismiss (#20197)65432022-07-191-0/+4
|
* Fix modified due date message (#20388)Lucas Azevedo2022-07-191-1/+2
|
* Fix public org members displayed too many informations (#20403)Lunny Xiao2022-07-191-20/+22
|
* Allow access to the Public Organization Member lists with minimal ↵a10121127962022-07-151-5/+3
| | | | | | | | | | | permissions (#20330) Examining Organization membership should not necessarily require sign-in if the organization is public and the members are public. Therefore we should adjust `/org/{org}/members` to not require login. Fix #7501 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix eslint parsing errors, remove eslint-plugin-html (#20323)silverwind2022-07-152-2/+0
| | | | | | | | | | | Introduce a separate .eslintrc in the Vue components folder to selectively enable vue-eslint-parser there, so that the rest of the files can use eslint's core parser which can deal with hashbangs. The fact that the eslint-disable comments worked in HTML was a unintended side-effect of the files being parsed via vue-eslint-parser, so I had to disable the parsing of these files in .eslintrc.yaml to make it work, and finally decided to remove eslint-plugin-html as it causes more issues than it solves.
* Include login_name in adminCreateUser response (#20283)Baekjun Kim2022-07-151-0/+6
| | | | `login_name` (Authentication Sign-in Name) is not included in the response of `adminUserCreate` API. This PR is to return user-specified `login_name` if there is one.
* Add allow_rebase_update, default_delete_branch_after_merge to repository api ↵Bian Jiaping2022-07-151-0/+8
| | | | | | | response (#20079) `PATCH /repos/{owner}/{repo}` API allows users to update `allow_rebase_update`, `default_delete_branch_after_merge`, but `GET /repos/{owner}/{repo}` API does not return these two options, and API users has no other ways to find the state of these two options. This PR add `allow_rebase_update`, `default_delete_branch_after_merge` to repository query api response.
* Add option to purge users (#18064)zeripath2022-07-141-3/+14
| | | | | | | Add the ability to purge users when deleting them. Close #15588 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix icon margin in user/settings/repos (#20281)Baoshuo Ren2022-07-141-5/+5
|
* Fix checks in PR for empty commits #19603 (#20290)Ing. Jaroslav Šafka2022-07-131-4/+12
| | | | | | * Fixes issue #19603 (Not able to merge commit in PR when branches content is same, but different commit id) * fill HeadCommitID in PullRequest * compare real commits ID as check for merging * based on @zeripath patch in #19738
* Fix various typos (#20338)luzpaz2022-07-121-1/+1
| | | | | | | * Fix various typos Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon` Co-authored-by: zeripath <art27@cantab.net>
* Remove blue text on migrate page (#20273)silverwind2022-07-121-1/+1
| | | | | | | * Remove blue text on migrate page * remove Safe Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add spectral linter for Swagger (#20321)silverwind2022-07-111-97/+1
| | | | | | | | | | [spectral](https://github.com/stoplightio/spectral) lints openapi/swagger files for mistakes of which it has identified a few and which I've fixed. I had to put it into `lint-frontend` because it depends on node_modules so can not run on Drone during the backend target. I plan to refactor these targets later to `lint-js` and `lint-go` so that they are categorized based on the tool dependencies.
* Use dedicated draft PR icon when possible (#20303)Gusted2022-07-092-2/+10
| | | | | | | | | | * Use dedicated draft PR icon when possible - Currently the generic pull-request icon is used for draft PR's. This patch changes that by using the dedicated icon for this. - Resolves #20296 * Use draft title
* Implement sync push mirror on commit (#19411)Chongyi Zheng2022-07-081-0/+6
| | | | | | | | | Support synchronizing with the push mirrors whenever new commits are pushed or synced from pull mirror. Related Issues: #18220 Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add tooltip to repo icons in explore page (#20241)Baoshuo Ren2022-07-071-2/+2
| | | | | * Add label to repo icons in explore page Co-authored-by: silverwind <me@silverwind.io>
* Fix toolip on mobile notification bell (#20270)zeripath2022-07-061-1/+1
| | | | | | | | Unfortunately there is a bug in #20108 where the translation call was not updated to use `.locale` from `.i18n`. This PR updates the template to use `.locale`. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refix notification bell placement (#20251)zeripath2022-07-061-1/+1
| | | | | | | | | | | | | | | The use of `m-4 text black` for the notification bell results in this icon being shifted upwards. Instead we should use the `item` class but adjust `not-mobile` and `mobile-only` to make their `display: none` settings `!important`. (As an aside: This is probably one of the only times we should use `!important` in our less files and the rest should be avoided or removed.) Ref #20069 Revert #20236 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Adjust class for mobile has the problem of double small bells (#20236)Tyrone Yeh2022-07-051-1/+1
| | | | | | | | | * Adjust class for mobile has the problem of double small bells * Update templates/base/head_navbar.tmpl Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com>
* Adjust template for #20069 smallbell (#20108)Tyrone Yeh2022-07-041-4/+15
| | | | | | | | | | | | | | | | | | | * Adjust template for #20069 smallbell * Adjust notification Unread Count variable to global and count bell position with mobile * Adjust bell icon style * Adjust smallbell to middle * Avoid using inline styles * move notificationUnreadCount to a general code block, reduce changed lines * Solved conflicts Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Refactor `i18n` to `locale` (#20153)Gusted2022-06-27278-3657/+3657
| | | | | | | | | | | * Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
* Hide notify mail setting ui if not enabled (#20138)Lunny Xiao2022-06-281-0/+2
|
* Make better use of i18n (#20096)Gusted2022-06-2633-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prototyping * Start work on creating offsets * Modify tests * Start prototyping with actual MPH * Twiddle around * Twiddle around comments * Convert templates * Fix external languages * Fix latest translation * Fix some test * Tidy up code * Use simple map * go mod tidy * Move back to data structure - Uses less memory by creating for each language a map. * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Add some comments * Fix tests * Try to fix tests * Use en-US as defacto fallback * Use correct slices * refactor (#4) * Remove TryTr, add log for missing translation key * Refactor i18n - Separate dev and production locale stores. - Allow for live-reloading in dev mode. Co-authored-by: zeripath <art27@cantab.net> * Fix live-reloading & check for errors * Make linter happy * live-reload with periodic check (#5) * Fix tests Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Disable status checks in template if none found (#20088)John Olheiser2022-06-241-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Replace pubkey with privkey in keys_ssh.tmpl (#20112)Robert Lützner2022-06-241-1/+1
| | | | | | | | | | If a user wants to verify an SSH public key from their account they have to sign the randomly generated token with their private key. Prior to this change the example command prompted to sign the token with their public key instead. Signed-off-by: Robert Lützner <robert.luetzner@pm.me>
* Use correct variable for issue count (#20085)Lunny Xiao2022-06-221-2/+2
|
* fix delete pull head ref for DeleteIssue (#20032)a10121127962022-06-191-2/+10
| | | | | | | | | | | | | * fix delete pull head ref for DeleteIssue fix #19655 Signed-off-by: a1012112796 <1012112796@qq.com> * add different help message for delete pull request Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: 6543 <6543@obermui.de>
* User keypairs and HTTP signatures for ActivityPub federation using go-ap ↵Anthony Wang2022-06-191-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#19133) * go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master * activitypub: implement /api/v1/activitypub/user/{username} (#14186) Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: add the public key to Person (#14186) Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: go-fed conformant Clock instance Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: signing http client Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: implement the ReqSignature middleware Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: hack_16834 Signed-off-by: Loïc Dachary <loic@dachary.org> * Fix CI checks-backend errors with go mod tidy Signed-off-by: Anthony Wang <ta180m@pm.me> * Change 2021 to 2022, properly format package imports Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt and make generate-swagger Signed-off-by: Anthony Wang <ta180m@pm.me> * Use Gitea JSON library, add assert for pkp Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt again, fix err var redeclaration Signed-off-by: Anthony Wang <ta180m@pm.me> * Remove LogSQL from ActivityPub person test Signed-off-by: Anthony Wang <ta180m@pm.me> * Assert if json.Unmarshal succeeds Signed-off-by: Anthony Wang <ta180m@pm.me> * Cleanup, handle invalid usernames for ActivityPub person GET request Signed-off-by: Anthony Wang <ta180m@pm.me> * Rename hack_16834 to user_settings Signed-off-by: Anthony Wang <ta180m@pm.me> * Use the httplib module instead of http for GET requests * Clean up whitespace with make fmt * Use time.RFC1123 and make the http.Client proxy-aware * Check if digest algo is supported in setting module * Clean up some variable declarations * Remove unneeded copy * Use system timezone instead of setting.DefaultUILocation * Use named constant for httpsigExpirationTime * Make pubKey IRI #main-key instead of /#main-key * Move /#main-key to #main-key in tests * Implemented Webfinger endpoint. * Add visible check. * Add user profile as alias. * Add actor IRI and remote interaction URL to WebFinger response * fmt * Fix lint errors * Use go-ap instead of go-fed * Run go mod tidy to fix missing modules in go.mod and go.sum * make fmt * Convert remaining code to go-ap * Clean up go.sum * Fix JSON unmarshall error * Fix CI errors by adding @context to Person() and making sure types match * Correctly decode JSON in api_activitypub_person_test.go * Force CI rerun * Fix TestActivityPubPersonInbox segfault * Fix lint error * Use @mariusor's suggestions for idiomatic go-ap usage * Correctly add inbox/outbox IRIs to person * Code cleanup * Remove another LogSQL from ActivityPub person test * Move httpsig algos slice to an init() function * Add actor IRI and remote interaction URL to WebFinger response * Update TestWebFinger to check for ActivityPub IRI in aliases * make fmt * Force CI rerun * WebFinger: Add CORS header and fix Href -> Template for remote interactions The CORS header is needed due to https://datatracker.ietf.org/doc/html/rfc7033#section-5 and fixes some Peertube <-> Gitea federation issues * make lint-backend * Make sure Person endpoint has Content-Type application/activity+json and includes PreferredUsername, URL, and Icon Setting the correct Content-Type is essential for federating with Mastodon * Use UTC instead of GMT * Rename pkey to pubKey * Make sure HTTP request Date in GMT * make fmt * dont drop err * Make sure API responses always refer to username in original case Copied from what I wrote on #19133 discussion: Handling username case is a very tricky issue and I've already encountered a Mastodon <-> Gitea federation bug due to Gitea considering Ta180m and ta180m to be the same user while Mastodon thinks they are two different users. I think the best way forward is for Gitea to only use the original case version of the username for federation so other AP software don't get confused. * Move httpsig algs constant slice to modules/setting/federation.go * Add new federation settings to app.example.ini and config-cheat-sheet * Return if marshalling error * Make sure Person IRIs are generated correctly This commit ensures that if the setting.AppURL is something like "http://127.0.0.1:42567" (like in the integration tests), a trailing slash will be added after that URL. * If httpsig verification fails, fix Host header and try again This fixes a very rare bug when Gitea and another AP server (confirmed to happen with Mastodon) are running on the same machine, Gitea fails to verify incoming HTTP signatures. This is because the other AP server creates the sig with the public Gitea domain as the Host. However, when Gitea receives the request, the Host header is instead localhost, so the signature verification fails. Manually changing the host header to the correct value and trying the veification again fixes the bug. * Revert "If httpsig verification fails, fix Host header and try again" This reverts commit f53e46c721a037c55facb9200106a6b491bf834c. The bug was actually caused by nginx messing up the Host header when reverse-proxying since I didn't have the line `proxy_set_header Host $host;` in my nginx config for Gitea. * Go back to using ap.IRI to generate inbox and outbox IRIs * use const for key values * Update routers/web/webfinger.go * Use ctx.JSON in Person response to make code cleaner * Revert "Use ctx.JSON in Person response to make code cleaner" This doesn't work because the ctx.JSON() function already sends the response out and it's too late to edit the headers. This reverts commit 95aad988975be3393c76094864ed6ba962157e0c. * Use activitypub.ActivityStreamsContentType for Person response Content Type * Limit maximum ActivityPub request and response sizes to a configurable setting * Move setting key constants to models/user/setting_keys.go * Fix failing ActivityPubPerson integration test by checking the correct field for username * Add a warning about changing settings that can break federation * Add better comments * Don't multiply Federation.MaxSize by 1<<20 twice * Add more better comments * Fix failing ActivityPubMissingPerson test We now use ctx.ContextUser so the message printed out when a user does not exist is slightly different * make generate-swagger For some reason I didn't realize that /templates/swagger/v1_json.tmpl was machine-generated by make generate-swagger... I've been editing it by hand for three months! 🤦 * Move getting the RFC 2616 time to a separate function * More code cleanup * Update go-ap to fix empty liked collection and removed unneeded HTTP headers * go mod tidy * Add ed25519 to httpsig algorithms * Use go-ap/jsonld to add @context and marshal JSON * Change Gitea user agent from the default to Gitea/Version * Use ctx.ServerError and remove all remote interaction code from webfinger.go
* Delete duplicated update btn on pull request view page (#19993)Lunny Xiao2022-06-171-39/+1
| | | Fix #19987
* fix permission check for delete tag (#19985)a10121127962022-06-161-0/+12
| | | | | | | fix #19970 by the way, fix some error response about protected tags. Signed-off-by: a1012112796 <1012112796@qq.com>
* fix `go to file` link for mirror repository (#19983)a10121127962022-06-161-1/+1
| | | | | | the `BaseRepo` not always exit, should use `Repository`. Signed-off-by: a1012112796 <1012112796@qq.com>
* Remove tab/TabName usage where it's not needed (#19973)Lauris BH2022-06-155-24/+21
| | | `tab` query argument and `TabName` in context is used only in profile so remove it from all other places where it's not used anymore.
* Replace unstyled meter with progress (#19968)silverwind2022-06-151-2/+2
| | | | | | Replace the only `<meter>` element in use with a `<progress>` which is styled properly. Also slightly adjust colors on it for better contrast. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix aria for logo (#19955)wxiaoguang2022-06-131-2/+2
| | | Co-authored-by: 6543 <6543@obermui.de>
* Fix mirror template bug (#19959)Lunny Xiao2022-06-131-3/+4
| | | | | | * Fix mirror template bug Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* fix: some typos (#19956)yutotnh2022-06-131-1/+1
|
* Prettify number of issues (#17760)Gusted2022-06-125-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prettify number of issues - Use the PrettyNumber function to add commas in large amount of issues. * Use client-side formatting * prettify on both server and client * remove unused i18n entries * handle more cases, support other int types in PrettyNumber * specify locale to avoid issues with node default locale * remove superfluos argument * introduce template helper, octicon tweaks, js refactor * Update modules/templates/helper.go * Apply some suggestions. * Add comment * Update templates/user/dashboard/issues.tmpl Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Improve file header on mobile (#19945)Gusted2022-06-121-1/+1
| | | | | - File headers can become quite width, so ensure the file size is not being wrapped into itself(width + padding-right) and allow the overflow to be scrolled(overflow-x).
* Auto merge pull requests when all checks succeeded via WebUI (#19648)65432022-06-113-99/+122
| | | | | | | | Add WebUI part of Auto merge feature close #19621 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Fix some mirror bugs (#18649)Lunny Xiao2022-06-112-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix some mirror bugs * Remove unnecessary code * Fix lint * rename stdard url * Allow more charactors in git ssh protocol url * improve the detection * support ipv6 for git url parse * Fix bug * Fix template * Fix bug * fix template * Fix tmpl * Fix tmpl * Fix parse ssh with interface * Rename functions name Co-authored-by: zeripath <art27@cantab.net>
* Make user profile image show full image on mobile (#19840)Eekle2022-06-101-2/+4
| | | | * Make user profile image show full image on mobile
* Custom regexp external issues (#17624)Sandro Santilli2022-06-101-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement custom regular expression for external issue tracking. Signed-off-by: Alexander Beyn <malex@fatelectrons.org> * Fix syntax/style * Update repo.go * Set metas['regexp'] * gofmt * fix some tests * fix more tests * refactor frontend * use LRU cache for regexp * Update modules/markup/html_internal_test.go Co-authored-by: Alexander Beyn <malex@fatelectrons.org> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Feature: Find files in repo (#15028)Roger Luo2022-06-092-0/+26
| | | | | | | | | | | | | | | | * Create finding files page ui in repo page * Get tree entries for find repo files. * Move find files JS to individual file. * gen swagger. * Add enry.IsVendor to exclude entries Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove out-dated comments (#19921)wxiaoguang2022-06-081-6/+0
|