aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Use disable_form_autofill on Codebase and Gitbucket (#17936)qwerty2872021-12-082-1/+2
| | | | | Removes the old fake input on the Codebase migration screen, and adds the disable_form_autofill
* Refactor install page (db type) (#17919)wxiaoguang2021-12-072-11/+11
| | | | | | | | | | | | * Refactor install page (db type) * set correct default DB HOST for different DB TYPE * remove legacy TiDB from documents * unify the usage of DB TYPE, in code we only use "mysql". "MySQL" is only shown to users for friendly name. * Gitea can use TiDB via MySQL protocol Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Display issue/comment role even if repo archived (#17907)Lunny Xiao2021-12-052-29/+31
|
* Render issue references in file table (#17897)silverwind2021-12-041-1/+2
| | | Fixes #17887
* Add hints for special Wiki pages (#17283)n2021-12-031-0/+3
| | | * Add UI hints to create a Wiki sidebar and footer
* Removed SizeFmt. (#17890)KN4CK3R2021-12-034-5/+5
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add migrate from Codebase (#16768)KN4CK3R2021-12-021-0/+117
| | | | | | | | | | This PR adds [Codebase](https://www.codebasehq.com/) as migration source. Supported: - Milestones - Issues - Pull Requests - Comments - Labels
* Improve install code to avoid low-level mistakes. (#17779)wxiaoguang2021-12-012-0/+26
| | | | | | | | | | | | | | * Improve install code to avoid low-level mistakes. If a user tries to do a re-install in a Gitea database, they gets a warning and double check. When Gitea runs, it never create empty app.ini automatically. Also some small (related) refactoring: * Refactor db.InitEngine related logic make it more clean (especially for the install code) * Move some i18n strings out from setting.go to make the setting.go can be easily maintained. * Show errors in CLI code if an incorrect app.ini is used. * APP_DATA_PATH is created when installing, and checked when starting (no empty directory is created any more).
* Rework commit page header (#17849)silverwind2021-12-011-72/+81
| | | | | | | | | | | - Remove blue background and use regular header styling - Use flexbox on author and signature segments - Add shield-type icons besides gpg key, replacing icon font icons - Ensure author and signature line are same height - Remove erronous green background on arc-green signature line - Turn signing colors into CSS variables - Consolidate the two warning states into one Co-authored-by: zeripath <art27@cantab.net>
* Make Requests Processes and create process hierarchy. Associate ↵zeripath2021-11-303-27/+31
| | | | | | | | | OpenRepository with context. (#17125) This PR registers requests with the process manager and manages hierarchy within the processes. Git repos are then associated with a context, (usually the request's context) - with sub commands using this context as their base context. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove whitespace inside rendered code `<td>` (#17859)silverwind2021-11-301-6/+2
| | | | | | This extra whitespace caused isses in Firefox where it would copy a extra space character at the start and the end. Additionally, in Chrome, the text selection indicated a spaced on the end of the selection where there was none. Both issues are fixed with the removal of whitespace.
* Switch archive URL code back to href attributes (#17796)fnetX (aka fralix)2021-11-293-13/+13
| | | | | | * Add fallback href link * Switch async archive generation to use href links * Edit all templates to use href instead of data-url for archives * Add consistent rel="nofollow" as per wxiaoguang
* Disable ref selection dropdown if you don't have permissions to use it (#17837)qwerty2872021-11-281-2/+2
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add archived label for code search results in archived repo's (#17817)Jimmy Praet2021-11-261-1/+7
| | | | | | | * Add archived label for code search results in archived repo's * Remove trailing whitespace Co-authored-by: Lauris BH <lauris@nix.lv>
* org settings -> webhook/labels/deletion should also active the menu (#17809)Lunny Xiao2021-11-251-1/+1
|
* Fixed org styles. (#17807)KN4CK3R2021-11-252-95/+97
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Create menus for organization pages (#17802)Lunny Xiao2021-11-253-24/+32
| | | | | | | * Create menus for organization pages * Fix frontend lint * Fix frontend lint
* Improve ellipsis buttons (#17773)silverwind2021-11-223-3/+3
| | | | | | | | | | | | * Improve ellipsis buttons - Remove icon font usage - Add aria-expanded attribute * rename function to match Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add copy Commit ID button in commits list (#17759)velengel2021-11-221-1/+2
| | | | | | | | | | | | | | | | | | | * fix: implement commit id copy to clipboard * fix: remove abundant attributes / consider edge-case * fix: locale_en fixed * fix: use ui button * tune copy button * fix: button size * Fix merge Co-authored-by: Ysmr-Ry <ryo.yossy@live.jp> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* More pleasantly handle broken or missing git repositories (#17747)zeripath2021-11-222-3/+15
| | | | | | | | | | | | | | | | | | | | | | * More pleasantly handle broken or missing git repositories In #17742 it was noted that there a completely invalid git repository underlying a repo on gitea.com. This happened due to a problem during a migration however, it is not beyond the realms of possibility that a corruption could occur to another user. This PR adds a check to RepoAssignment that will detect if a repository loading has failed due to an absent git repository. It will then show a page suggesting the user contacts the administrator or deletes the repository. Fix #17742 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update options/locale/locale_en-US.ini Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove unnecessary attributes of User struct (#17745)Lunny Xiao2021-11-223-3/+3
| | | | | | | | | | | | | | | * Remove unnecessary functions of User struct * Move more database methods out of user struct * Move more database methods out of user struct * Fix template failure * Fix bug * Remove finished FIXME * remove unnecessary code
* Support pagination of organizations on user settings pages (#16083)Lunny Xiao2021-11-221-0/+1
| | | | | | * Add pagination for user setting orgs * Use FindOrgs instead of GetOrgsByUserID * Remove unnecessary functions and fix test * remove unnecessary code
* Improvements to content history (#17746)Jimmy Praet2021-11-221-0/+4
| | | | | | | | | | | * Improvements to content history * initialize content history when making an edit to an old item created before the introduction of content history * show edit history for code comments on pull request files tab * Fix a flaw in keepLimitedContentHistory Fix a flaw in keepLimitedContentHistory, the first and the last should never be deleted * Remove obsolete eager initialization of content history
* Add new JS linter rules (#17699)silverwind2021-11-222-2/+2
| | | | | | | | | | | | | | | | | | | | * Add new JS linter rules Adds a few useful rules from eslint-plugin-github. Notable changes: - Forbid dataset usage, its camel-casing behaviour makes it hard to grep for attributes. - Forbid .then() and .catch(), we should generally prefer await for new code. For rare cases where they are useful, a eslint-disable-line directive can be set. - Add docs js to linting * also enable github/array-foreach * small tweak Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Allow Loading of Diffs that are too large (#17739)zeripath2021-11-221-0/+1
| | | | | | | | | | | * Allow Loading of Diffs that are too large This PR allows the loading of diffs that are suppressed because the file is too large. It does not handle diffs of files which have lines which are too long. Fix #17738 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix correct usage of teams (#17732)Gusted2021-11-201-2/+2
| | | | | | | - `.Teams` isn't a field on the User type, thus using the seperate loaded teams. - Add a space between `PathEscape` and argument. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Added comment for changing issue ref (#17672)Gusted2021-11-191-0/+17
| | | | | * Added comment for changing issue ref - Add a comment when someone changes the ref(erence?) of a issue.
* perf: sent `data-path` once for each file (#17657)Gusted2021-11-193-6/+6
| | | | | | | | | | | | | | - Don't sent it with each line, instead send it at the top-element for each file. - Related: https://github.com/go-gitea/gitea/pull/17618#issuecomment-968192761 2.5K Additions: No-Patch: Unified: 2.14 MB (2.14 MB size) Split: 2.59 MB (2.59 MB size) Patch: Unified: 2.10 MB (2.10 MB size) (-1.8%) Split: 2.55 MB (2.55 MB size) (-1.5%)
* Refactor repo-legacy.js, remove messy global variables. Fix errors. (#17646)wxiaoguang2021-11-191-1/+1
| | | | | Refactor repo-legacy.js, remove messy global variables. Fix errors. Fix an error in Sortable Fix a incorrect call assignMenuAttributes from the template
* Add pagination to fork list (#17639)Gusted2021-11-181-0/+2
| | | | | - Resolves #14574 - Adds the necessary code to have pagination working in the forks list of a repo. The code is mostly in par with the stars/watcher implementation.
* Cleanup and use global style on popups (#17674)silverwind2021-11-1836-115/+115
| | | | | | | | | | | | | * Cleanup and use global style on popups - Fix typo 'poping' to 'popping' - Remove most inline 'data-variation' attributes - Initialize all popups with 'inverted tiny' variation * misc tweaks * rename to .tooltip, use jQuery Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fixed commit count. (#17698)KN4CK3R2021-11-173-10/+11
| | | | Added "Tag" label. Unified branch, tag and commit name.
* Allow admins to change user avatars (#17661)qwerty2872021-11-161-0/+38
| | | | | | | Adds the avatar change panel to the edit user page (bottom) and allows admins to change it this way Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Multiple Escaping Improvements (#17551)zeripath2021-11-1684-364/+355
| | | | | | | | | | | | | | There are multiple places where Gitea does not properly escape URLs that it is building and there are multiple places where it builds urls when there is already a simpler function available to use this. This is an extensive PR attempting to fix these issues. 1. The first commit in this PR looks through all href, src and links in the Gitea codebase and has attempted to catch all the places where there is potentially incomplete escaping. 2. Whilst doing this we will prefer to use functions that create URLs over recreating them by hand. 3. All uses of strings should be directly escaped - even if they are not currently expected to contain escaping characters. The main benefit to doing this will be that we can consider relaxing the constraints on user names and reponames in future. 4. The next commit looks at escaping in the wiki and re-considers the urls that are used there. Using the improved escaping here wiki files containing '/'. (This implementation will currently still place all of the wiki files the root directory of the repo but this would not be difficult to change.) 5. The title generation in feeds is now properly escaped. 6. EscapePound is no longer needed - urls should be PathEscaped / QueryEscaped as necessary but then re-escaped with Escape when creating html with locales Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add copy button to markdown code blocks (#17638)silverwind2021-11-163-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add copy button to markdown code blocks Done mostly in JS because I think it's better not to try getting buttons past the markup sanitizer. * add svg module tests * fix sanitizer regexp * remove outdated comment * vertically center button in issue comments as well * add comment to css * fix undefined on view file line copy * combine animation less files * Update modules/markup/markdown/markdown.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * add test for different sizes * add cloneNode and add tests for it * use deep clone * remove useless optional chaining * remove the svg node cache * unify clipboard copy string and i18n * remove unused var * remove unused localization * minor css tweaks to the button * comment tweak * remove useless attribute Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Migrating wiki don't require token, so we should move it out of the require ↵Lunny Xiao2021-11-165-61/+78
| | | | | | | form (#17645) * Migrating wiki don't require token, so we should move it out of the require form * Fix lint
* Add download button for file viewer (#17640)Gusted2021-11-151-0/+1
| | | | | | | | - Resolves #17286 - Use the `download` attribute such that the browser will natively initate a download dialog for the given URL. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add icon to vscode clone link (#17641)silverwind2021-11-141-6/+4
|
* Add migration from GitBucket (#16767)KN4CK3R2021-11-141-0/+129
| | | | | | | | | | | | | This PR adds [GitBucket](https://gitbucket.github.io/) as migration source. Supported: - Milestones - Issues - Pull Requests - Comments - Reviews - Labels There is no public usable instance so no integration tests added.
* perf: only generate data-comment-url once (#17618)Gusted2021-11-143-6/+6
|
* Correctly handle failed migrations (#17575)zeripath2021-11-131-1/+5
| | | | | | | | | | | | | | * Correctly handle failed migrations There is a bug in handling failed migrations whereby the migration task gets decoupled from the migration repository. This leads to a failure of the task to get deleted with the repository and also leads to the migration failed page resulting in a ISE. This PR removes the zeroing out of the task id from the migration but also makes the migration handler tolerate missing tasks much nicer. Fix #17571 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refactor commentTags functionality (#17558)Gusted2021-11-112-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | * feat: Allow multiple tags on comments - Allow for multiples tags(Currently Poster + {Owner, Writer}). - Utilize the Poster tag within the commentTag function and remove the checking from templates. - Use bitwise on CommentTags to enable specific tags. - Don't show poster tag(view_content.tmpl) on the initial issue comment. * Change parameters naming * Change function name * refactor variable wording * Merge 'master' branch into 'tags-comments' branch * Change naming * `tag` -> `role` Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Allow U2F 2FA without TOTP (#11573)Kamil Domański2021-11-083-27/+25
| | | | | | | This change enables the usage of U2F without being forced to enroll an TOTP authenticator. The `/user/auth/u2f` has been changed to hide the "use TOTP instead" bar if TOTP is not enrolled. Fixes #5410 Fixes #17495
* Escape issue titles in comments list (#17555)zeripath2021-11-051-1/+1
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Show correct "No" icon (#17537)delvh2021-11-041-1/+1
|
* fix email with + when active (#17518)Lunny Xiao2021-11-021-1/+1
| | | Co-authored-by: zeripath <art27@cantab.net>
* Move key forms before list and add cancel button (#17432)qwerty2872021-10-283-88/+78
| | | | | | | * Move GPG form before list and add cancel button * Move SSH form before list and add cancel button Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix login redirection links (#17451)qwerty2872021-10-281-1/+1
| | | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Add appearance section in settings (#17433)qwerty2872021-10-274-52/+77
| | | | | | | | | | | | | * Add appearance section in settings * Fix lint * Fix lint * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix a UI error when folding a file content in a commit view (#17446)wxiaoguang2021-10-271-1/+1
|