aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix the show/hide methods for string selector (#23042)wxiaoguang2023-02-211-1/+5
| | | | | | At that moment I made a mistake (failed to detect a JS variable type correctly) Close #23040
* display attachments of review comment when comment content is blank (#23035)sillyguodong2023-02-211-1/+1
| | | | fix: #22647
* Upgrade to stylelint 15 (#22944)silverwind2023-02-218-139/+232
| | | | | | | | - Upgrade stylelint and plugin - Change ruleset to a explicit one, with all deprecated rules removed - Fix new issues detected by value validation For `overflow: overlay` see https://github.com/stylelint/stylelint/issues/6667
* Add force_merge to merge request and fix checking mergable (#23010)Jason Song2023-02-216-20/+59
| | | Fix #23000.
* Improve PR Review Box UI (#22986)wxiaoguang2023-02-219-52/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR follows: * #22950 ### Before The Review Box has many problems: * It doesn't work for small screens. * It has an anonying animation which makes the UI laggy. * It uses "custom dropdown menu" which is very difficult to fine tune. * `$().toggle('visible')` is not a correct call * jQuery just accepts any invalid `duration` argument: `$().toggle('anyting')` * The button is not a button. <details> ![image](https://user-images.githubusercontent.com/2114189/219948865-6da3f39c-6fde-4c86-9e42-da5020f3d0c3.png) </details> ### After These problems are fixed, and eliminate many `!important` games. <details> ![image](https://user-images.githubusercontent.com/2114189/219952744-8862fe1a-7ef1-49e4-bf92-2d0c1f104ee4.png) ![image](https://user-images.githubusercontent.com/2114189/219952771-be169a76-45fd-47a8-8f9c-b447d064f4ca.png) ![image](https://user-images.githubusercontent.com/2114189/219952784-3f52e9b7-64ce-4ad1-9553-64c33fb83042.png) </details> And most dropdown icons still looks good: <details> ![image](https://user-images.githubusercontent.com/2114189/219952942-52866a00-e0f9-4af7-8fb5-eb1a8cad1ff3.png) ![image](https://user-images.githubusercontent.com/2114189/219948909-b3bfb844-f84e-4b79-ab1f-382ec66dec31.png) </details> Co-authored-by: delvh <leon@kske.dev>
* Remove dashes between organization member avatars on hover (#23034)HesterG2023-02-211-0/+4
| | | | | | | | | | | | | | | | | | On the home page of an organization, there are unexpected dashes between the avatars of the members when hovering over the avatars, as shown in below: ![hover including title](https://user-images.githubusercontent.com/17645053/220271470-4f49e16f-87eb-4ffa-b38e-23feae1ff92d.png) ![hover without title](https://user-images.githubusercontent.com/17645053/220271512-e4a67685-6b72-4742-a34f-e01ed248c1de.png) This is because in `fomantic/build/semantic.css` there is a rule `text-decoration: underline;` when hovering over the `<a>` tag. Here, the `<a>` tag has width and height because of the avatar image inside, leading to the unexpected underlines. This PR overrides the `a:hover` rule so the underline does not exist anymore. Co-authored-by: delvh <leon@kske.dev>
* Fix the Manually Merged form (#23015)wxiaoguang2023-02-212-13/+11
| | | | | | | | | | | | | | | | | | | Regression bug of #19650 Close #20983 Close #21912 ### The "Manually Merged" form ![image](https://user-images.githubusercontent.com/2114189/220170503-32638994-b509-4251-8aa1-d8393dda7184.png) ### Mark a PR as Manually Merged and close it ![image](https://user-images.githubusercontent.com/2114189/220170537-25c91b2c-7a9a-44d1-9e6a-ebe3f1dfc26a.png) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove delete button for review comment (#23036)Zettat1232023-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | Fix #23031. Currently, only comments with type `CommentTypeComment` or `CommentTypeCode` can be deleted. If user create a review comment, the type of the comment will be `CommentTypeReview` so the comment cannot be deleted. https://github.com/go-gitea/gitea/blob/e7be610d5773e69abbfb98d19e23112dfad6dfcc/routers/web/repo/issue.go#L2860-L2868 And in Github, user also cannot delete a review comment. There isn't a delete button in the menu. <img src="https://user-images.githubusercontent.com/15528715/220275166-5ae2dc10-4003-4857-b14e-d7b02644345f.png" width="640px" /> So we should remove the delete button from the menu when the comment's type is `CommentTypeReview`.
* Improve frontend guidelines (#23007)wxiaoguang2023-02-212-8/+43
| | | Some were out-dated, some are added.
* Use `--message=%s` for git commit message (#23028)wxiaoguang2023-02-213-6/+5
| | | | | | | | | | | | | | | | | | | Close #23027 `git commit` message option _only_ supports 4 formats (well, only ....): * `"commit", "-m", msg` * `"commit", "-m{msg}"` (no space) * `"commit", "--message", msg` * `"commit", "--message={msg}"` The long format with `=` is the best choice, and it's documented in `man git-commit`: `-m <msg>, --message=<msg> ...` ps: I would suggest always use long format option for git command, as much as possible. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* add margin top to the top of branches (#23002)HesterG2023-02-211-1/+1
| | | | | | | | add margin top as mentioned in #22973 --------- Co-authored-by: jidi <jidi@jidideMacBook-Pro.local> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add me to maintainers (#23026)yp053272023-02-211-0/+1
| | | | | | Add me to maintainers. [My PRs list](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Ayp05327+is%3Amerged+)
* Render access log template as text instead of HTML (#23013)Lunny Xiao2023-02-211-1/+1
| | | Fix https://github.com/go-gitea/gitea/pull/22906#discussion_r1112106675
* Use `gt-relative` class instead of the ambiguous `gt-pr` class (#23008)wxiaoguang2023-02-202-2/+1
| | | | | | | | | | `.gt-relative` is also `position: relative !important;` There are `gt-pr-?` styles below (line 140) for `padding-right`, which makes `.gt-pr` ambiguous Co-authored-by: delvh <leon@kske.dev> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix intermittent panic in notify issue change content (#23019)zeripath2023-02-202-9/+12
| | | | | | | | Ensure that issue pullrequests are loaded before trying to set the self-reference. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: delvh <leon@kske.dev> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Improve pull_request_template.md (#22888)Jason Song2023-02-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update `pull_request_template.md` because: - It's a kind idea to hide the tips. However, it's easier to include them in the commit message by mistake when you cannot see them. Check `git log | grep 'Please check the following:'`. So don't hide it, expose it and help fix it. - "for backports" is much clearer than "for bug fixes". I saw someone post a PR to a release branch because they believed it was the right way for a bugfix. - "Allow edits by maintainers", or we have to ask the contributor to update the branch and they could be confused. - Remind the contributor that the words could be included in the commit message, to avoid some words like "Hello", "Sorry". If they really need them, they can separate them with a line, like: ```markdown Close #xxxx Because ... Then ... Finally ... --- Hello, this is my first time opening a pull request. Sorry for any mistakes. ``` And the merger should be careful, check and delete the extra content before merging. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Hide 2FA status from other members in organization members list (#22999)Brecht Van Lommel2023-02-201-0/+2
| | | | | This is rather private information that should not be given to all members in the same organization. Only show it to organization owners.
* handle deprecated settings (#22992)Lunny Xiao2023-02-207-42/+41
| | | Fix #22736
* Add scopes to API to create token and display them (#22989)zeripath2023-02-206-14/+68
| | | | | | | | The API to create tokens is missing the ability to set the required scopes for tokens, and to show them on the API and on the UI. This PR adds this functionality. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove unnecessary and incorrect `find('.menu').toggle()` (#22987)wxiaoguang2023-02-202-4/+0
| | | | | | | | | | Follows: * #22950 The dropdown menu works well without these codes. The reason is that the event bubbling still works for the dropdown menu, the Fomantic UI dropdown menu module will hide the menu correctly if an item is clicked.
* Improve issues.LoadProject (#22982)yp053272023-02-202-6/+2
| | | | | issues.LoadProject() is no use change `issues.loadProject(ctx)` to issues.LoadProject(ctx)
* Add 1.18.4 changelog (#22991) (#22995)Lunny Xiao2023-02-201-0/+37
| | | Frontport from #22991
* Fix pull request branch selector visible without clicking Edit (#23012)Brecht Van Lommel2023-02-211-1/+1
| | | Caused by #22950
* Bump golang.org/x/net from 0.4.0 to 0.7.0 (#22980)dependabot[bot]2023-02-202-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/net/commit/8e2b117aee74f6b86c207a808b0255de45c0a18a"><code>8e2b117</code></a> http2/hpack: avoid quadratic complexity in hpack decoding</li> <li><a href="https://github.com/golang/net/commit/547e7edf3873d6f3a9c093d3785f9e2289e00746"><code>547e7ed</code></a> http2: avoid referencing ResponseWrite.Write parameter after returning</li> <li><a href="https://github.com/golang/net/commit/39940adcaaa73e661124cb80fb8dd57ea929dbaf"><code>39940ad</code></a> html: parse comments per HTML spec</li> <li><a href="https://github.com/golang/net/commit/87ce33ecb484cbb6bcfc8e506ce0330ef72e0847"><code>87ce33e</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/net/commit/415cb6d518e71d202e2dc2f44c475cbff84eee72"><code>415cb6d</code></a> all: fix some comments</li> <li><a href="https://github.com/golang/net/commit/7e3c19ca52e202ae203b1914fc00c8e47a4d72fa"><code>7e3c19c</code></a> all: correct typos in comments</li> <li><a href="https://github.com/golang/net/commit/296f09aa3817abc1ddff7703799bf9babb7bbd16"><code>296f09a</code></a> http2: case insensitive handling for 100-continue</li> <li><a href="https://github.com/golang/net/commit/f8411da775a685be247bbedcb3ed2c998f895cd2"><code>f8411da</code></a> nettest: fix tests on dragonfly and js/wasm</li> <li><a href="https://github.com/golang/net/commit/8e0e7d8d38f2b6d21d742845570dde2902d06a1d"><code>8e0e7d8</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/net/commit/7805fdc37dc2b54b28b9d621030e14dcf1dab67c"><code>7805fdc</code></a> http2: rewrite inbound flow control tracking</li> <li>Additional commits viewable in <a href="https://github.com/golang/net/compare/v0.4.0...v0.7.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/net&package-manager=go_modules&previous-version=0.4.0&new-version=0.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: delvh <leon@kske.dev> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix panic when call api (/repos/{owner}/{repo}/pulls/{index}/files) (#22921)sillyguodong2023-02-201-2/+4
| | | | | | | | | | | | | | | Close: #22910 --- I'm confused about that why does the api (`GET /repos/{owner}/{repo}/pulls/{index}/files`) require caller to pass the parameters `limit` and `page`. In my case, the caller only needs to pass a `skip-to` to paging. This is consistent with the api `GET /{owner}/{repo}/pulls/{index}/files` So, I deleted the code related to `listOptions` --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* only trigger docs build and publish when docs changed (#22968)Lunny Xiao2023-02-201-4/+21
| | | | | | | | | | | Since drone plugin https://github.com/meltwater/drone-convert-pathschanged/ enabled, we can filter event with path in drone. Building docs will now only be triggered when documentations changed. --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Get rules by id when editing branch protection rule (#22932)Zettat1232023-02-203-4/+32
| | | | | | | | | | | | | | | | | | | | When users rename an existing branch protection rule, a new rule with the new name will be created and the old rule will still exist. ![image](https://user-images.githubusercontent.com/15528715/219276442-d3c001ad-e693-44ec-9ad2-b33f2666b49b.png) --- ![image](https://user-images.githubusercontent.com/15528715/219276478-547c3b93-b3f1-4292-a1ef-c1b7747fe1bb.png) The reason is that the `SettingsProtectedBranchPost` function only get branch protection rule by name before updating or creating a rule. When the rule name changes, the function cannot find the existing rule so it will create a new rule rather than update the existing rule. To fix the bug, the function should get rule by id first. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix hidden commit status on multiple checks (#22889)oliverpool2023-02-207-47/+92
| | | | | | | | | | | | | | Since #22632, when a commit status has multiple checks, no check is shown at all (hence no way to see the other checks). This PR fixes this by always adding a tag with the `.commit-statuses-trigger` to the DOM (the `.vm` is for vertical alignment). ![2023-02-13-120528](https://user-images.githubusercontent.com/3864879/218441846-1a79c169-2efd-46bb-9e75-d8b45d7cc8e3.png) --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add me to maintainers (#22998)Zettat1232023-02-201-0/+1
| | | | | | | | Add me to maintainers. [List of merged PRs](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3AZettat123+is%3Amerged) Co-authored-by: Jason Song <i@wolfogre.com>
* Add all units to the units permission list in org team members sidebar (#22971)yp053272023-02-201-1/+1
| | | | | | | | | | | | Add all units to the units permission list in org team members sidebar. Before: ![BQF448EIHEYKY62XGG(5101](https://user-images.githubusercontent.com/18380374/219877772-b57df8fb-2b82-4b1a-85c8-3809f8751cab.png) After: ![image](https://user-images.githubusercontent.com/18380374/219877762-f69482b8-abf9-4333-978e-6a3f52039a16.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make CI use a dummy password hasher for all tests (#22983)zeripath2023-02-2011-74/+160
| | | | | | | | | | | | | | | | During the recent hash algorithm change it became clear that the choice of password hash algorithm plays a role in the time taken for CI to run. Therefore as attempt to improve CI we should consider using a dummy hashing algorithm instead of a real hashing algorithm. This PR creates a dummy algorithm which is then set as the default hashing algorithm during tests that use the fixtures. This hopefully will cause a reduction in the time it takes for CI to run. --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use beforeCommit instead of baseCommit (#22949)Kyle D2023-02-2020-11/+110
| | | | | | | | | | | | | | | | | Replaces: https://github.com/go-gitea/gitea/pull/22947 Fixes https://github.com/go-gitea/gitea/issues/22946 Probably related to https://github.com/go-gitea/gitea/issues/19530 Basically, many of the diffs were broken because they were comparing to the base commit, where a 3-dot diff should be comparing to the [last common ancestor](https://matthew-brett.github.io/pydagogue/git_diff_dots.html). This should have an integration test so that we don’t run into this issue again. --------- Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Add comment marking the end of database migrations in `1.19.0` (#22975)Yarden Shoham2023-02-201-0/+2
| | | | | | | There will be no more migrations in `1.19.0` --------- Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Fix broken pull request files (#22962)Lunny Xiao2023-02-201-1/+1
| | | Fix #22961
* Fix avatar misalignment (#22955)Zettat1232023-02-202-1/+3
| | | | | | | | | | | | | | | | | | | | Fix #22818. | Before | After | | ---- | ---- | | <img src="https://user-images.githubusercontent.com/15528715/219617504-d86e7a90-d4ac-4a92-bd8a-100dddc693d5.png" width="200px" /> | <img src="https://user-images.githubusercontent.com/15528715/219618645-a4045f65-bda6-49ce-a676-f03a9817bb70.png" width="200px" />| | <img src="https://user-images.githubusercontent.com/15528715/219618013-844ef208-853b-44bd-a67c-36e360f0ffa7.png" width="200px" /> | <img src="https://user-images.githubusercontent.com/15528715/219618361-cb13c369-852e-47bf-ae30-e429d348823d.png" width="200px" /> | --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor the setting to make unit test easier (#22405)Lunny Xiao2023-02-2086-1462/+1692
| | | | | | | | | | | | | | | | | | | | | | Some bugs caused by less unit tests in fundamental packages. This PR refactor `setting` package so that create a unit test will be easier than before. - All `LoadFromXXX` files has been splited as two functions, one is `InitProviderFromXXX` and `LoadCommonSettings`. The first functions will only include the code to create or new a ini file. The second function will load common settings. - It also renames all functions in setting from `newXXXService` to `loadXXXSetting` or `loadXXXFrom` to make the function name less confusing. - Move `XORMLog` to `SQLLog` because it's a better name for that. Maybe we should finally move these `loadXXXSetting` into the `XXXInit` function? Any idea? --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: delvh <dev.lh@web.de>
* Migration v244.go should be v243.go (#22988)zeripath2023-02-191-0/+0
|
* Adjust manifest to prevent tagging latest on rcs (#22811)zeripath2023-02-193-2/+140
|
* Add some guidelines for refactoring (#22880)wxiaoguang2023-02-191-0/+51
| | | | | | Just some brief ideas. Feel free to complete these guidelines, feel free to edit on this PR directly.
* Rename `GetUnits` to `LoadUnits` (#22970)yp053272023-02-195-13/+9
| | | | | | | Same as https://github.com/go-gitea/gitea/pull/22967 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Provide the ability to set password hash algorithm parameters (#22942)zeripath2023-02-1927-152/+871
| | | | | | | | | | | | | | | | | | | | | | | This PR refactors and improves the password hashing code within gitea and makes it possible for server administrators to set the password hashing parameters In addition it takes the opportunity to adjust the settings for `pbkdf2` in order to make the hashing a little stronger. The majority of this work was inspired by PR #14751 and I would like to thank @boppy for their work on this. Thanks to @gusted for the suggestion to adjust the `pbkdf2` hashing parameters. Close #14751 --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix no user listed in org teams page (#22979)yp053272023-02-191-1/+1
| | | | | | | | | | | https://github.com/go-gitea/gitea/pull/22294 introduced this bug. Before: ![picture](https://user-images.githubusercontent.com/18380374/219916000-5b28db1a-22b5-481a-807b-49c14ac1cd35.png) After: ![picture](https://user-images.githubusercontent.com/18380374/219916260-6b94efbb-836a-4551-b6a8-3f9cb37d822a.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, ↵wxiaoguang2023-02-1989-281/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | remove inline style=display:none (#22950) Close #22847 This PR: * introduce Gitea's own `showElem` and related functions * remove jQuery show/hide * remove .hide class * remove inline style=display:none From now on: do not use: * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex" * ".hidden" class: it has been polluted by Fomantic UI in many cases * inline style="display: none": it's difficult to tweak * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important" only use: * this ".gt-hidden" class * showElem/hideElem/toggleElem functions in "utils/dom.js" cc: @silverwind , this is the all-in-one PR
* Scoped labels (#22585)Brecht Van Lommel2023-02-1847-242/+709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Rename "People" to "Members" in organization page and use a better icon (#22960)Yarden Shoham2023-02-185-5/+5
| | | | | | | | | | | | | | | | | `member` is how it's named in the code Closes #22931 Before | After --- | --- ![image](https://user-images.githubusercontent.com/20454870/219781155-69a8476e-0f04-4b70-bda5-ea6fa8ce676c.png) | ![image](https://user-images.githubusercontent.com/20454870/219780887-61644c27-36a2-4e1f-8f98-be3911883b49.png) --------- Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: delvh <leon@kske.dev>
* Rename `repo.GetOwner` to `repo.LoadOwner` (#22967)yp053272023-02-1833-68/+68
| | | | | | | Fixes https://github.com/go-gitea/gitea/issues/22963 --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
* Notify on container image create (#22806)KN4CK3R2023-02-181-4/+22
| | | | | | | Fixes #22791 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* webview: Fix overflowing diff body (#22959)Ferdinand Thiessen2023-02-181-0/+5
| | | | | | | | | | | | | | | If the content is quite large the diff body overflows the container and can not be read. This is fixed by setting the diff body maximum width to 100% and enable overflow scrollbars: before | after ---|--- ![Screenshot_20230217_184716](https://user-images.githubusercontent.com/1855448/219733934-75bec38c-7cfe-47bb-b001-b090c02b769e.png) | ![Screenshot_20230217_184655](https://user-images.githubusercontent.com/1855448/219733971-4db092d1-ffcb-4298-a640-f740a3ac430b.png) Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* Introduce customized HTML elements, fix incorrect AppUrl usages in templates ↵wxiaoguang2023-02-1721-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#22861) This PR follows: * #21986 * #22831 This PR also introduce customized HTML elements, which would also help problems like: * #17760 * #21429 * #21440 With customized HTML elements, there won't be any load-search-replace operations, and it can avoid page flicking (which @silverwind cares a lot). Browser support: https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements # FAQ ## Why the component has the prefix? As usual, I would strongly suggest to add prefixes for our own/private names. The dedicated prefix will avoid conflicts in the future, and it makes it easier to introduce various 3rd components, like GitHub's `relative-time` component. If there is no prefix, it's impossible to introduce another public component with the same name in the future. ## Why the `custcomp.js` is loaded before HTML body? The `index.js` is after HTML body. Customized components must be registered before the content loading. Otherwise there would be still some flicking. `custcomp.js` should have its own dependencies and should be very light, so it won't affect the page loading time too much. ## Why use `data-url` attribute but not use the `textContent`? According to the standard, the `connectedCallback` occurs on the tag-opening moment. The element's children are not ready yet. ## Why not use `{{.GuessCurrentOrigin $.ctx ...}}` to let backend decide the absolute URL? It's difficult for backend to guess the correct protocol(scheme) correctly with zero configuration. Generating the absolute URL from frontend can guarantee that the URL is 100% correct -- since the user is visiting it. # Screenshot <details> ![image](https://user-images.githubusercontent.com/2114189/218256757-a267c8ba-3108-4755-9ae5-329f1b08f615.png) </details>
* Sort issues and pulls by recently updated in user and organization home (#22925)Brecht Van Lommel2023-02-172-2/+7
| | | | | | | | | | | | | | The main purpose of these home pages should be getting an overview of what's going on or needs attention. Recently updated is a better default than newest for that purpose, to avoid missing active issues and pulls that were not created recently. The default sorting order in repository issues and pulls remains newest. Repositories in an organization are already sorted by recently updated. --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>