aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
* Update some JS dependencies (#13222)silverwind2020-10-213-32/+24
| | | | | | | | | | | | | * Update some JS dependencies - Update selective dependencies that are compatible with webpack 4. We can not upgrade to webpack 5 yet because `license-webpack-plugin` is incompatible. - Enable a few new eslint rules and fix new issues * fix comment Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* Return the full rejection message and errors in flash errors (#13221)zeripath2020-10-201-0/+5
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Various arc-green fixes (#13214)silverwind2020-10-201-45/+126
| | | | | | | | | | | | - Style search dropdown - Fix radio buttons and tweak checkboxes - Add styling for error form elements - Make borders brighter and focus more apparent - Adjust comment box border color to match Fixes: https://github.com/go-gitea/gitea/pull/12491 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use CSS Variables for fonts, remove postcss-loader (#13204)silverwind2020-10-196-111/+99
| | | | | | | | | | | | | * Use CSS Variables for fonts, remove postcss-loader - Use CSS variables for fonts, making the fonts easier to customize - Remove postcss-loader, it's not doing anything useful and is actually applying strange transforms on our CSS. Fixes: https://github.com/go-gitea/gitea/issues/11045 * introduce helper variable, mark documented vars * work around case issue by always quoting specific fonts
* Fix size and clickable area on file table back link (#13205)silverwind2020-10-191-0/+7
| | | | | Fixes: https://github.com/go-gitea/gitea/issues/13038 Should backport to 1.13.
* Show outdated comments in pull request (#13148)Iván Valdés2020-10-151-0/+10
| | | Co-authored-by: zeripath <art27@cantab.net>
* Gitea 2 Gitea migration (#12657)65432020-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * first draft * update gitea sdk to 9e280adb4da * adapt feat of updated sdk * releases now works * break the Reactions loop * use convertGiteaLabel * fix endless loop because paggination is not supported there !!! * rename gitea local uploader files * pagination can bite you in the ass * Version Checks * lint * docs * rename gitea sdk import to miss future conficts * go-swagger: dont scan the sdk structs * make sure gitea can shutdown gracefully * make GetPullRequests and GetIssues similar * rm useles * Add Test: started ... * ... add tests ... * Add tests and Fixing things * Workaround missing SHA * Adapt: Ensure that all migration requests are cancellable (714ab71ddc4260937b1480519d453d2dc4e77dd6) * LINT: fix misspells in test set * adapt ListMergeRequestAwardEmoji * update sdk * Return error when creating giteadownloader failed * update sdk * adapt new sdk * adopt new features * check version before err * adapt: 'migrate service type switch page' * optimize * Fix DefaultBranch * impruve * handle subPath * fix test * Fix ReviewCommentPosition * test GetReviews * add DefaultBranch int test set * rm unused * Update SDK to v0.13.0 * addopt sdk changes * found better link * format template * Update Docs * Update Gitea SDK (v0.13.1)
* Add team support for review request (#12039)赵智超2020-10-122-2/+9
| | | | | | | | | | | Add team support for review request Block #11355 Signed-off-by: a1012112796 <1012112796@qq.com> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fix attachments list in edit comment (#13036)zeripath2020-10-111-13/+21
| | | | | | | | | | #11141 broke the appearance of dropzone attachments when editting comments causing poorly updating lists. This PR fixes this. Fix #12583 Signed-off-by: Andrew Thornton art27@cantab.net
* Adding visual cue for "Limited" & "Private" organizations. (#13040)Spencer Taylor2020-10-062-1/+11
| | | | | | | | * Adding visual cue for "Limited" & "Private" organizations. * Moving org visibility CSS styles to .less files. Co-authored-by: Gitea <gitea@fake.local> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix Pull Request merge buttons on mobile (#13035)kolaente2020-10-051-0/+10
| | | | | Signed-off-by: kolaente <k@knt.li> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix Issue & Pull Request comment headers on mobile (#13039)kolaente2020-10-051-9/+12
| | | Signed-off-by: kolaente <k@knt.li>
* Attachments: Add extension support, allow all types for releases (#12465)silverwind2020-10-051-7/+7
| | | | | | | | | | | | | | | | | | | | | * Attachments: Add extension support, allow all types for releases - Add support for file extensions, matching the `accept` attribute of `<input type="file">` - Add support for type wildcard mime types, e.g. `image/*` - Create repository.release.ALLOWED_TYPES setting (default unrestricted) - Change default for attachment.ALLOWED_TYPES to a list of extensions - Split out POST /attachments into two endpoints for issue/pr and releases to prevent circumvention of allowed types check Fixes: https://github.com/go-gitea/gitea/pull/10172 Fixes: https://github.com/go-gitea/gitea/issues/7266 Fixes: https://github.com/go-gitea/gitea/pull/12460 Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers * rename function * extract GET routes out of RepoMustNotBeArchived Co-authored-by: Lauris BH <lauris@nix.lv>
* CSS tweaks to warning/error segments and misc fixes (#13024)silverwind2020-10-042-11/+55
| | | | | | | | | | | | | | | | * CSS tweaks to warning/error segments and misc fixes - Adjust styling for warning/error in arc-green - Change danger boxes from orange to red - Fix code highlight text color in arc-green - Fix warning message in arc-green - Fix border in org member list in arc-green - Fix disabled checkbox text in arc-green * use same selector in gitea theme * fix blame highlight Co-authored-by: zeripath <art27@cantab.net>
* hCaptcha Support (#12594)John Olheiser2020-10-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work on hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use module Signed-off-by: jolheiser <john.olheiser@gmail.com> * Format Signed-off-by: jolheiser <john.olheiser@gmail.com> * At least return and debug log a captcha error Signed-off-by: jolheiser <john.olheiser@gmail.com> * Pass context to hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add context to recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * fix lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Finish hcaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update example config Signed-off-by: jolheiser <john.olheiser@gmail.com> * Apply error fix for recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change recaptcha ChallengeTS to string Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fix formatting of branches ahead-behind on narrow windows (#12989)zeripath2020-10-021-1/+2
| | | | | | | | | | Make the bar-groups width 50% with max-width of 90px Fix #12252 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove code-view class from diff view (#13011)mrsdizzie2020-10-021-0/+1
| | | | | | | | code-view class seems unecessary here as everything needed style wise comes from various diff classes. This allows comments and comment editor to be styled properly and fixes linked bug. Fixes #13010 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Changed width of signature avatar from auto to 16px (#12961)Victor2020-09-281-1/+1
| | | | | Signed-off-by: Victor Roest <victor@xirion.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Adopt repositories (#12920)zeripath2020-09-252-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't automatically delete repository files if they are present Prior to this PR Gitea would delete any repository files if they are present during creation or migration. This can in certain circumstances lead to data-loss and is slightly unpleasant. This PR provides a mechanism for Gitea to adopt repositories on creation and otherwise requires an explicit flag for deletion. PushCreate is slightly different - the create will cause adoption if that is allowed otherwise it will delete the data if that is allowed. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix tests and migrate overwrite Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @lunny Only offer to adopt or overwrite if the user can do that. Allow the site administrator to adopt or overwrite in all circumstances Signed-off-by: Andrew Thornton <art27@cantab.net> * Use setting.Repository.DefaultBranch for the default branch Signed-off-by: Andrew Thornton <art27@cantab.net> * Always set setting.Repository.DefaultBranch Signed-off-by: Andrew Thornton <art27@cantab.net> * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * update templates Signed-off-by: Andrew Thornton <art27@cantab.net> * ensure repo closed Signed-off-by: Andrew Thornton <art27@cantab.net> * Rewrite of adoption as per @6543 and @lunny Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * missing not Signed-off-by: Andrew Thornton <art27@cantab.net> * add modals and flash reporting Signed-off-by: Andrew Thornton <art27@cantab.net> * Make the unadopted page searchable Signed-off-by: Andrew Thornton <art27@cantab.net> * Add API Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle empty and non-master branched repositories Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * remove commented out code Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Disable migration items when mirror is selected (#12918)mrsdizzie2020-09-221-3/+10
| | | | | | | | | * Disable migration items when mirror is selected Disable migration items when mirror option is selected to make it more clear that it isn't possible to mirror anything other than code. * allow wiki checkbox for mirrors Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add the checkbox quick button to the comment tool bar also (#12885)赵智超2020-09-201-1/+20
| | | | | | | | Just copy it from the WIKI tool bar :) Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix line selection on blame view (#12857)mrsdizzie2020-09-152-3/+13
| | | | | | | Blame and regular code view have diverge slightly so line highlighting wasn't working properly anymore. Make work again in lieu of a larger refactor of blame HTML to move it outside of source and into templates to match code view. Fixes #12836 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix background of signed-commits on arc-green (#12837)zeripath2020-09-141-1/+2
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make SVG size argument optional (#12814)silverwind2020-09-112-2/+2
| | | | | Now defaults to 16 on both frontend and backend. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add check for LDAP group membership (#10869)John Olheiser2020-09-101-0/+12
| | | | | | | | | | | | | | This is a port of gogs/gogs#4398 The only changes made by myself are: Add locales Add some JS to the UI Otherwise all code credit goes to @aboron Resolves #10829 Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Set language via AJAX (#12785)techknowlogick2020-09-101-0/+8
| | | | | * Set language via AJAX * fix lint
* Add a migrate service type switch page (#12697)Lunny Xiao2020-09-096-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a migrat service type switch page * Improve translations * remove images * Fix images * remove extra create repo button on dashboard * Follow reviewers' opinions * Fix frontend lint * Remove wrong submit file * Fix tests * Adjust the size of image * Apply suggestions from code review Co-authored-by: 赵智超 <1012112796@qq.com> * Remove username and password from migration of github/gitlab * Improve docs * Improve interface docs Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* File header tweaks, add CSS helpers (#12635)silverwind2020-09-083-7/+108
| | | | | | | | | - replace two instances of fontawesome with octicons - add new "class" optional argument to "svg" helper - add many new CSS helpers and move their import to the end for increaseed precedence Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Change/remove a branch of an open issue (#9080)Vedran2020-09-081-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add field with isIssueWriter to front end * Make branch field editable * Switch frontend to form and POST from javascript * Add /issue/id/ref endpoint to routes * Use UpdateIssueTitle model to change ref in backend * Removed crossreference check and adding comments on branch change * Use ref returned from POST to update the field * Prevent calling loadRepo from models/ * Branch/tag refreshed without page reload * Remove filter for empty branch name * Add clear option to tag list as well * Delete button translation and coloring * Fix for not showing selected branch name in new issue * Check that branch is not being changed on a PR * Change logic * Notification when changing issue ref * Fix for renamed permission parameter * Fix for failing build * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Gitea <gitea@fake.local> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove duplicate logic in initListSubmits (#12660)赵智超2020-09-021-56/+36
| | | | | | | | | | | | | | | | | | * Remove duplicate logic in initListSubmits Using the same logic to handle Choosing reviewers and assignees as choosing label. It's the first step of #10926. Signed-off-by: a1012112796 <1012112796@qq.com> * fix choose block * fix nit * try fix bug * simple code Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Do not disable commit changes button on repost (#12644)zeripath2020-08-291-1/+3
| | | | | | | | If the user has pressed commit changes and the post has failed - do not disable the commit changes button. Fix #12072 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Dark theme for line numbers in blame view (#12632)Mike L2020-08-291-2/+4
|
* Avoid unnecessary system-ui expansion (#12522)Mike L2020-08-281-8/+8
| | | | | | | | * Avoid unnecessary system-ui expansion (fix #12325) * extract config to static object Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Apply #12576 to top right reaction picker (#12623)Mike L2020-08-282-13/+10
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Git migration UX (#12619)John Olheiser2020-08-283-27/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Implementation Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix gitlab and token cloning Signed-off-by: jolheiser <john.olheiser@gmail.com> * Imports and JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Linting Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move mirror toggle and rename options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix ellipsis in files table (#12617)silverwind2020-08-271-2/+3
| | | | | | | Turns out text ellispsis does not work in combination with flexbox and while wrapping in a display:block can help in some cases, I could not get this to work properly so this changes the truncate to inline-block again and reduces the clickable area to just vertical expansion from the links.
* Extract Swagger CSS to its own file (#12616)silverwind2020-08-261-0/+31
|
* Fix file table overflows (#12603)silverwind2020-08-263-5/+21
| | | | | | | | | - Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reindent Less to 2-space (#12602)silverwind2020-08-2520-5828/+5828
| | | Reindent and unify codebase to 2-space indentation.
* Fix emoji replacements, make emoji images consistent (#12567)silverwind2020-08-231-1/+1
| | | | | | | - Fix emoji not being replaced in issue title change text - Make the image attributes consistent, add alt, remove align Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reaction picker display improvements (#12576)silverwind2020-08-232-7/+28
| | | | | | | | - Remove overly thin font-width on counter - Add hover effect on reaction picker - Change colors on arc-green to green to match the theme Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Increase clickable area on files table links (#12553)silverwind2020-08-231-5/+10
|
* Set z-index for sticky diff box lower (#12537)zeripath2020-08-191-1/+1
| | | | | Fix #12525 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Kanban board (#8346)Lanre Adelowo2020-08-164-1/+201
| | | | | | | | | | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: Kerry <flatline-studios@users.noreply.github.com> Co-authored-by: Jaqra <jaqra@hotmail.com> Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com> Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com> Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Actually fix image diff padding/border (#12381)silverwind2020-08-061-2/+2
| | | | | | | | https://github.com/go-gitea/gitea/pull/12346 was using the wrong selector which affected only the single image view. Use the correct selector for image diffs. Removal of border-radius is still worth to keep to override the global 3px on <img>. Co-authored-by: Lauris BH <lauris@nix.lv>
* Render the git graph on the server (#12333)zeripath2020-08-068-589/+383
| | | | | | | | | | | | | Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation. * This implementation provides a 16 limited color selection * The uniqued color numbers are also provided * And there is also a monochrome version *In addition is a hover highlight that allows users to highlight commits on the same flow. Closes #12209 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: silverwind <me@silverwind.io>
* Collapse Swagger UI tags by default (#12428)silverwind2020-08-051-0/+1
| | | | | | | | This makes is slightly faster to navigate through the swagger docs by initially collapsing the tags like 'admin' or 'miscellaneous'. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Add loading spinners and mermaid error handling (#12358)silverwind2020-08-047-19/+120
| | | | | - Add loading spinners on editor and mermaid renderers - Add error handling and inline error box for mermaid - Fix Mermaid rendering by using the .init api
* Improve HTML escaping helper (#12383)silverwind2020-07-301-10/+7
| | | | | | | | The previous method did not escape single quotes which under some circumstances can lead to XSS vulnerabilites and the fact that it depends on jQuery is also not ideal. Replace it with a lightweight module. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Various arc-green fixes (#12384)silverwind2020-07-301-6/+27
| | | | | | | | - Fix various white borders - Fix dropdown triangle - Fix tab backgrounds - Fix release page timeline dots Co-authored-by: techknowlogick <techknowlogick@gitea.io>