summaryrefslogtreecommitdiffstats
path: root/templates/repo
Commit message (Collapse)AuthorAgeFilesLines
* Remove fomantic image module (#21145)silverwind2022-09-123-7/+7
| | | | | | | | | Remove this small, but unnecessary [module](https://fomantic-ui.com/elements/image.html) and use `img` selector over previous `.image`. Did a few tests, could not notice any visual regression. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Show .editorconfig errors in frontend (#21088)JakobDev2022-09-121-0/+7
| | | | If the user views the .editorconfig of the Repo, an the the .editorconfig contains error, those errors are now shown above the file.
* Improve commit status icons (#21124)silverwind2022-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | - Show popover on hover/focus (tippy default) instead of click - If there is only one status, add href to trigger element - Increase tippy [interactiveBorder](https://atomiks.github.io/tippyjs/v6/all-props/#interactiveborder), making it easier to keep interactive tooltips open with sloppy mouse movement - Fix a overflow issue in the commit list Commit list before: <img width="459" alt="Screen Shot 2022-09-09 at 19 00 01" src="https://user-images.githubusercontent.com/115237/189405517-68de5a69-e312-4ea2-ab81-87629db6064b.png"> Commit List after: <img width="475" alt="Screen Shot 2022-09-09 at 19 01 43" src="https://user-images.githubusercontent.com/115237/189405574-13e84885-9073-4f86-9eeb-d008c1639647.png"> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make the vscode clone link respect transport protocol (#20557)Norwin2022-09-092-1/+6
|
* Fix various typos (#21103)luzpaz2022-09-072-2/+2
| | | | | | | Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor,./web_src/fomantic -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon` Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix sub folder in repository missing add file dropdown (#21069)Tyrone Yeh2022-09-061-25/+26
| | | In repository sub folder missing add file dropdown menu, Probably broken since #20602
* Move go-licenses to generate and separate generate into a frontend and ↵zeripath2022-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | backend component (#21061) The `go-licenses` make task introduced in #21034 is being run on make vendor and occasionally causes an empty go-licenses file if the vendors need to change. This should be moved to the generate task as it is a generated file. Now because of this change we also need to split generation into two separate steps: 1. `generate-backend` 2. `generate-frontend` In the future it would probably be useful to make `generate-swagger` part of `generate-frontend` but it's not tolerated with our .drone.yml Ref #21034 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de>
* Webhook for Wiki changes (#20219)Aaron F2022-09-042-1/+12
| | | | | | | | | | | | | | | | | | | Add support for triggering webhook notifications on wiki changes. This PR contains frontend and backend for webhook notifications on wiki actions (create a new page, rename a page, edit a page and delete a page). The frontend got a new checkbox under the Custom Event -> Repository Events section. There is only one checkbox for create/edit/rename/delete actions, because it makes no sense to separate it and others like releases or packages follow the same schema. ![image](https://user-images.githubusercontent.com/121972/177018803-26851196-831f-4fde-9a4c-9e639b0e0d6b.png) The actions itself are separated, so that different notifications will be executed (with the "action" field). All the webhook receivers implement the new interface method (Wiki) and the corresponding tests. When implementing this, I encounter a little bug on editing a wiki page. Creating and editing a wiki page is technically the same action and will be handled by the ```updateWikiPage``` function. But the function need to know if it is a new wiki page or just a change. This distinction is done by the ```action``` parameter, but this will not be sent by the frontend (on form submit). This PR will fix this by adding the ```action``` parameter with the values ```_new``` or ```_edit```, which will be used by the ```updateWikiPage``` function. I've done integration tests with matrix and gitea (http). ![image](https://user-images.githubusercontent.com/121972/177018795-eb5cdc01-9ba3-483e-a6b7-ed0e313a71fb.png) Fix #16457 Signed-off-by: Aaron Fischer <mail@aaron-fischer.net>
* Do not add links to Posters or Assignees with ID < 0 (#20577)zeripath2022-09-033-125/+66
| | | | | | | There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0. Fix #20559 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Show language name on hover (#20923)JakobDev2022-09-021-1/+1
| | | | Each repo has a bar which shows the used programming languages. If you want to know, what language is behind a color, you need to click the bar. With this PR, you just need to hover over the color the view the name.
* Fix the quick-submit for pending review comment (#20992)wxiaoguang2022-09-021-0/+2
| | | | | | If there is only one "Add comment" button (when there are pending review comments), the quick-submit should submit the form with is_review=true even if the "Add comment" button is not really clicked. Close #20990
* Support Issue forms and PR forms (#20987)Jason Song2022-09-0210-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: extend issue template for yaml * feat: support yaml template * feat: render form to markdown * feat: support yaml template for pr * chore: rename to Fields * feat: template unmarshal * feat: split template * feat: render to markdown * feat: use full name as template file name * chore: remove useless file * feat: use dropdown of fomantic ui * feat: update input style * docs: more comments * fix: render text without render * chore: fix lint error * fix: support use description as about in markdown * fix: add field class in form * chore: generate swagger * feat: validate template * feat: support is_nummber and regex * test: fix broken unit tests * fix: ignore empty body of md template * fix: make multiple easymde editors work in one page * feat: better UI * fix: js error in pr form * chore: generate swagger * feat: support regex validation * chore: generate swagger * fix: refresh each markdown editor * chore: give up required validation * fix: correct issue template candidates * fix: correct checkboxes style * chore: ignore .hugo_build.lock in docs * docs: separate out a new doc for merge templates * docs: introduce syntax of yaml template * feat: show a alert for invalid templates * test: add case for a valid template * fix: correct attributes of required checkbox * fix: add class not-under-easymde for dropzone * fix: use more back-quotes * chore: remove translation in zh-CN * fix EasyMDE statusbar margin * fix: remove repeated blocks * fix: reuse regex for quotes Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make sure fmt catches all templates (#20979)silverwind2022-08-3138-192/+192
| | | | | | | | * Make sure fmt catches all templates Make's `wildcard` is not recursive so it missed many template files, fix that by using `find`. * Update Makefile
* Change review buttons to icons to make space for text (#20934)silverwind2022-08-264-9/+8
| | | | | The layout on the review code view was broken depending on length of the text. Change all three buttons to icons with tooltip to make more space for these long texts. Fixes: #20922
* Fix download archiver of a commit (#20962)Lunny Xiao2022-08-261-3/+3
|
* Add whitespace removal inside template curly brackes (#20853)silverwind2022-08-2514-55/+55
|
* Pad GPG Key ID with preceding zeroes (#20878)zeripath2022-08-211-4/+4
|
* Don't open new page for ext wiki on same repository (#20725)Gusted2022-08-201-1/+1
| | | | | - When the external wiki has been set to a file on the repository, don't open the page on a tab. - Resolves #20657
* Fix the commit diff route (#20796)MaeIsBad2022-08-152-6/+6
| | | | | | | | Gitea used to return 500 on the /:user/:repo/:commit route due to locale being undefined in the escape_title template. Co-authored-by: bad <badatnames@tutanota.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* Fix push mirror address backend get error Address cause setting page display ↵xpy2022-08-142-4/+4
| | | | | | error (#20593) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Switch Unicode Escaping to a VSCode-like system (#19990)zeripath2022-08-138-35/+57
| | | | | | | | | | | | | | | This PR rewrites the invisible unicode detection algorithm to more closely match that of the Monaco editor on the system. It provides a technique for detecting ambiguous characters and relaxes the detection of combining marks. Control characters are in addition detected as invisible in this implementation whereas they are not on monaco but this is related to font issues. Close #19913 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix disabled open in vscode menu when disabling download source from UI (#20713)Lunny Xiao2022-08-121-7/+7
|
* Use separate class for tippy targets (#20742)silverwind2022-08-102-2/+2
| | | | | | Previous solution that re-purposed the 'hide' class by making it `!important` had various unintended side-effects where jQuery .show() was not able to outweight it. Use a separate class to prevent these interactions.
* Change commit status icons to SVG (#20736)silverwind2022-08-092-9/+9
| | | | | | | | | | | | | | | | | | | | | * Fix commit status popover and switch to svg icons * margin tweak * fix integration, use warning sign for error to match previous * remove fix from here, will be a new pr * use top/bottom positioning * vertically center * use no-entry over alert oction * add exclamation icon * fix test selector * more test fixes
* Replace fomantic popup module with tippy.js (#20428)silverwind2022-08-097-22/+12
| | | | | | | | - replace fomantic popup module with tippy.js - fix chaining and add comment - add 100ms delay to tooltips - stopwatch improvments, raise default maxWidth - update web_src/js/features/common-global.js - use type=submit instead of js
* Restore history button and hide add button when unable to add (#20718)silverwind2022-08-091-27/+29
| | | | | | | | | | Fix two regressions from #20602: - Restore the 'History' button that was previously unable to render because it's show condition was never hit - Hide the 'Add File' button when there would be no items in the dropdown. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add issue filter for Author (#20578)parnic2022-08-084-36/+69
| | | This adds a new filter option on the issues and pulls pages to filter by the author/poster/creator of the issue or PR
* Fix disable download button (#20701)Lunny Xiao2022-08-082-2/+2
|
* Rework repo buttons (#20602)silverwind2022-08-087-70/+66
| | | | | | | | | | | | | | | | | * Rework repo buttons - Replace "New PR" and "Go to File" button with Icon Button - Move all "Add File" actions into a dropdown button - Remove most custom styling of clone buttons - Margin and wiki tweaks Buttons are now all equal height, mobile layout wraps gracefully. Fixes: https://github.com/go-gitea/gitea/issues/13671 Replaces: https://github.com/go-gitea/gitea/pull/20375 Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add default commit messages to PR for squash merge (#20618)Tyrone Yeh2022-08-031-1/+1
| | | | | | Keep the same behavior as 1.16 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Add default value for clone URLs (#20600)silverwind2022-08-022-3/+3
| | | | | | | | Default clone URLs to HTTP(S) in DOM rendering. JS will immediately replace this if the user preference is SSH. Fixes: https://github.com/go-gitea/gitea/issues/20558 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Clean up and fix clone button script (#20415)silverwind2022-07-316-26/+30
| | | | | | | The button 'primary' class needs to be set in a synchronous script to prevent flicker of the button which was regressed recently, fixed that. Additionally, reduced the two script tags to just one, the previous scripts were actually initializing the buttons thrice on the empty repo page, now it only initializes once. Finally, removed duplicate code and re-used the inline function in the update code as well. I had to split out the script into a separate template as on the empty repo page, the script needs access to the clone URL span in the example text, which is rendered below the clone buttons, so buttons and script could not be combined.
* Add disable download source configuration (#20548)Lunny Xiao2022-07-313-11/+19
| | | | | Add configuration to enable/disable download source from UI. Co-authored-by: zeripath <art27@cantab.net>
* Fix default merge style (#20564)wxiaoguang2022-07-311-0/+1
|
* Add a checkbox to select all issues/PRs (#20177)Tyrone Yeh2022-07-281-0/+6
|
* Add labels to two buttons that were missing them (#20419)techknowlogick2022-07-261-1/+1
|
* 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>
* Fix modified due date message (#20388)Lucas Azevedo2022-07-191-1/+2
|
* Fix eslint parsing errors, remove eslint-plugin-html (#20323)silverwind2022-07-151-1/+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.
* 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>
* Use dedicated draft PR icon when possible (#20303)Gusted2022-07-091-1/+5
| | | | | | | | | | * 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>
* Refactor `i18n` to `locale` (#20153)Gusted2022-06-27130-1873/+1873
| | | | | | | | | | | * 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
* Make better use of i18n (#20096)Gusted2022-06-2621-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* Delete duplicated update btn on pull request view page (#19993)Lunny Xiao2022-06-171-39/+1
| | | Fix #19987