summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Multiple small admin dashboard fixes (#12153)zeripath2020-07-056-15/+21
| | | | | | | | | * Remove spurious spacing between Maintenance Operations and its table on dashboard * Prevent (EXTRA string) comments in Task headers * Redirect tasks started from monitor page back to monitor * Fix #12107 - redirects from process cancel should use AppSubUrl * When wrapping queues set the name correctly Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure tabs wrap correctly on user profile page (#12144)George Merlocco2020-07-051-0/+3
| | | Co-authored-by: zeripath <art27@cantab.net>
* properly set symbolic-ref HEAD when a repo is created with a non-master ↵xenofem2020-07-051-0/+7
| | | | | default branch (#12135) This fixes an issue I noticed with #10803: when you create a repo with a non-master default branch, gitea doesn't change the remote ref HEAD, so it still points at refs/heads/master. As a result, cloning my repos gives me error messages and doesn't check out the desired default branch, so I need to manually check it out after cloning.
* Enable a few more eslint rules (#12145)silverwind2020-07-051-4/+6
| | | | | | This gets the config closer to what 1.12 had. Related: https://github.com/go-gitea/gitea/pull/12129
* Remove spurious logging (#12139)zeripath2020-07-051-3/+0
| | | | | | | Unfortunately #10745 merged a spurious logging message. This PR removes this. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Rewrite GitGraph.js (#12137)zeripath2020-07-053-436/+567
| | | | | | | | | | | | | | | | | | | The current vendored gitgraph.js is no longer maintained and is difficult to understand, fix and maintain. This PR completely rewrites its logic - hopefully in a clearer fashion and easier to maintain. It also includes @silverwind's improvements of coloring the commit dots and preventing the flash of incorrect content. Further changes to contemplate in future will be abstracting out of the flows to an object, storing the involved commit references on the flows etc. However, this is probably a required step for this. Replaces #12131 Fixes #11981 (part 3) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Re-fix #12095 again (#12138)zeripath2020-07-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately some of the suggested changes to #12095 introduced bugs which due to caching behaviour of sharedworkers were not caught on simple tests. These are as follows: * Changing from simple for loop to use includes here: ```js register(port) { if (!this.clients.includes(port)) return; this.clients.push(port); port.postMessage({ type: 'status', message: `registered to ${this.url}`, }); } ``` The additional `!` prevents any clients from being added and should read: ```js if (this.clients.includes(port)) return; ``` * Dropping the use of jQuery `$(...)` selection and using DOM `querySelector` here: ```js async function receiveUpdateCount(event) { try { const data = JSON.parse(event.data); const notificationCount = document.querySelector('.notification_count'); if (data.Count > 0) { notificationCount.classList.remove('hidden'); } else { notificationCount.classList.add('hidden'); } notificationCount.text() = `${data.Count}`; await updateNotificationTable(); } catch (error) { console.error(error, event); } } ``` Requires that `notificationCount.text()` be changed to use `textContent` instead. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Bugfix for shared event source (#12129)zeripath2020-07-042-17/+7
| | | | | | | | For some reason our eslint configuration is not working correctly and a bug has become apparent when trying to backport this to 1.12. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* templates/repo/empty.tmpl : fix repo setup instructions (#12122)Andreas Shimokawa2020-07-031-1/+1
| | | Co-authored-by: codeberg <codeberg@codeberg.org>
* Move EventSource to SharedWorker (#12095)zeripath2020-07-039-36/+220
| | | | | | | | | | | | | Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1 open browser connections from preventing gitea from opening multiple tabs. Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating Fix #11978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix ui bug in wiki commit page (#12089)赵智超2020-07-021-2/+9
| | | | | | | | | | | | * Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-07-021-0/+5
|
* Fix repo API listing stability (#12057)Clark Boylan2020-07-021-0/+1
| | | | | | | | | | | | | | Repo listings are paginated in the API now. Unfortunately, they are ORDER BY updated_unix which only has second resolution. This means that if you do a listing when multiple projects were created at the same time you can unstable ordering. If that unstable ordering happens at a page boundary you may fail to get a complete repo listing. To make things worse sorting by updated_unix means that we may never get a complete listing because udpated_unix can change independent of our API calls. Fix this by making the API repo listing order by id instead.
* Provide option to unlink a fork (#11858)zeripath2020-07-025-48/+124
| | | | | | | | | | | | | | | | | | | | | | * Provide option to unlink a fork Fix #4566 Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * Add check that user can create repo Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @cirnoT Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Fix missing gitgraph css import (#12112)silverwind2020-07-011-0/+2
| | | | | | | | | The filter was wrongly excluding the gitGraph.css file. Need to clean this up later so that imports are always relative to the source file (which is not the case for fonts right now). Regressed by: https://github.com/go-gitea/gitea/pull/11997 Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-07-011-0/+4
|
* Improve arc-green code colors (#12111)silverwind2020-07-012-72/+59
| | | | | | | | | | * Improve arc-green code colors This should fix all previous colors that had too few contrast on the background. I took solarized-dark as a baseline and did various improvments. I removed bold/italic flags because I don't think they fit and generally other tools also don't use those font flags. * diff tweak
* Ensure BlameReaders close at end of request (#12102)zeripath2020-07-013-8/+13
| | | | | | | | | | | | | | | | | | | | #11716 reports multiple git blame processes hanging around this was thought to be due to timeouts, however on closer look this appears to be due to the Close() function of the BlameReader hanging with a blocked stdout pipe. This PR fixes this Close function to: * Cancel the context of the cmd * Close the StdoutReader - ensuring that the output pipe is closed Further it makes the context of the `git blame` command a child of the request context - ensuring that even if Close() is not called, on cancellation of the Request the blame is command will also be cancelled. Fixes #11716 Closes #11727 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix merge section in dark theme (#12086)Lauris BH2020-07-011-26/+29
| | | | | * Fix merge section in dark theme * Fix lint
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-01336-765/+37289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Server-side syntax hilighting for all code This PR does a few things: * Remove all traces of highlight.js * Use chroma library to provide fast syntax hilighting directly on the server * Provide syntax hilighting for diffs * Re-style both unified and split diffs views * Add custom syntax hilighting styling for both regular and arc-green Fixes #7729 Fixes #10157 Fixes #11825 Fixes #7728 Fixes #3872 Fixes #3682 And perhaps gets closer to #9553 * fix line marker * fix repo search * Fix single line select * properly load settings * npm uninstall highlight.js * review suggestion * code review * forgot to call function * fix test * Apply suggestions from code review suggestions from @silverwind thanks Co-authored-by: silverwind <me@silverwind.io> * code review * copy/paste error * Use const for highlight size limit * Update web_src/less/_repository.less Co-authored-by: Lauris BH <lauris@nix.lv> * update size limit to 1MB and other styling tweaks * fix highlighting for certain diff sections * fix test * add worker back as suggested Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix commit icon position (#12087)Lauris BH2020-06-292-1/+2
|
* Fix potential make error related to fomantic files (#12079)silverwind2020-06-281-5/+5
| | | | | | | | This prevents a potential make errors like "No rule to make sticky.js" that happens when a file is present from a previous build but is not generated in the current build. We don't use these module files from fomantic so it's safe to not depend on them. Related to: https://github.com/go-gitea/gitea/commit/7761245d087c9477ea7f3e50c60daecd6cc6ec14
* Use custom SVGs for commit signing lock icon (#12017)Cirno the Strongest2020-06-288-14/+28
| | | | | | | | | | | | * Use custom SVGs for commit signing lock icon * missing spans * editorconfig * xmlns and remove aria-hidden Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Move fomantic and jQuery to main webpack bundle (#11997)silverwind2020-06-279-69/+88
| | | | | | | | | | | | | | This saves around 3 MB binary size by not including useless fomantic files in the build. Also, this allows us to move jQuery into the main bundle as well which eliminates a few HTTP requests. Also included are webpack config changes: - split less and css loaders to speed up compliation - enable css sourcemaps - switch css minfier plugin to cssnano-webpack-plugin which works better for sourcemaps than the previous plugin Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Do not override API issue pagination with UI settings (#12068)Cirno the Strongest2020-06-271-3/+0
| | | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-06-2717-54/+40
|
* Fix swagger docs for /repos/issues (#12069)Cirno the Strongest2020-06-272-0/+11
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix some periods and language usage in en-US locale (#12067)Linkjay2020-06-271-4/+4
|
* Disable go module when downloading global binaries (#12030)silverwind2020-06-261-6/+6
| | | | | | | | | | Prevent `go get` from touching `go.mod` and `go.sum` when executing global binaries during the build process. Once https://github.com/golang/go/issues/30515 is fixed, we should is whatever solution is provided there. Fixes: https://github.com/go-gitea/gitea/pull/12010 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-06-261-0/+7
|
* Shorten markdown heading anchors links (#11903)silverwind2020-06-263-73/+67
| | | | | | | | | | | | | | | | | | | | | This changes the links on headings like '# Usage' in markdown from `https://host/user/repo#user-content-usage` to just `https://host/user/repo#usage` matching GitHub and GitLab. The linked id elements still have the prefix and this behaviour matches GitHub and GitLab too, so JS is needed to scroll to the active anchor. I suspect it's like that to avoid namespace collission between user-generated content and other page content. Compatibilty for old links is included so they will continue to work. Also included are some enhancements to make the clickable area for the link icon larger and fix its color on arc-green. Fixes: https://github.com/go-gitea/gitea/issues/11896 Fixes: https://github.com/go-gitea/gitea/issues/12062
* Show description on individual milestone view (#12055)mrsdizzie2020-06-252-1/+5
| | | | | Fixes #12043 Co-authored-by: Lauris BH <lauris@nix.lv>
* Add org avatar on top of internal repo icon (#11895)Cirno the Strongest2020-06-264-23/+45
| | | | | | | | | | | | | | | | | * Add org avatar on top of internal repo icon * add color for arc-green * use wrapper div to avoid negative margins * rename class and move div * move div to icon tmpl * remove unnecessary margin for lock octicon * fix label align together with #11891 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use Fomantic's fluid padded for blame full width (#12023)Cirno the Strongest2020-06-252-8/+2
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix gitgraph branch continues after merge (#12044)zeripath2020-06-251-0/+7
| | | | | | | | | | | | | | | | | | | * Fix gitgraph branch continues after merge After fixing the initial problem in #11981 another problem has come to light... Fix #11981 (part 2) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix comments webhook panic (#12046)Cornel2020-06-248-9/+39
| | | | | | | * Fix webhook comment handling type cast panic * Handle HookIssueReviewed action in webhook Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update Goldmark v1.1.25 -> v1.1.32 (#12048)65432020-06-2510-26/+85
|
* [UI] Sortable Tables Header By Click (#7980)65432020-06-2410-18/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | * [UI] Sortable Tables Header By Click * get rid of padding above header * restart CI * fix lint * convert getArrow JS to SortArrow go func * addopt SortArrow funct * suggestions from @silverwind - tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
* fix bug about can't skip commits base on base branch (#11555)赵智超2020-06-242-11/+97
| | | | | | | | | | | | | | | | | * fix bug about can't skip commits base on base branch Signed-off-by: a1012112796 <1012112796@qq.com> * Update modules/git/commit.go Co-authored-by: Lauris BH <lauris@nix.lv> * Update models/issue_comment.go Co-authored-by: Lauris BH <lauris@nix.lv> * fix lint Co-authored-by: Lauris BH <lauris@nix.lv>
* Don't use -webkit-font-smoothing (#12029)mrsdizzie2020-06-241-1/+0
| | | | | | | Don't change font smoothing via CSS. Linked issue has more details, but this seems fowned upon in general and a was also removed from standards track. Hopefully this will be a part of reverting to a native font stack for Gitea. Fixes #11931 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-06-2426-0/+33
|
* Disable dropzone's timeout (#12024)silverwind2020-06-241-0/+2
| | | | | | | | | | | | Dropzone 4.4 introduced a 30s XHR timeout that will kill any upload still in progress. This disable that timeout again. Ref: https://www.dropzonejs.com/#config-timeout Ref: https://github.com/go-gitea/gitea/pull/10645 Ref: https://xhr.spec.whatwg.org/#the-timeout-attribute Fixes: https://github.com/go-gitea/gitea/issues/12022 Fixes: https://github.com/go-gitea/gitea/issues/11906 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use label to describe repository type (#11891)Cirno the Strongest2020-06-223-9/+44
| | | | | | | | | | | | | | | | | | | * Use label instead of icon to describe repository type when repo avatar is set * header_icon is not longer duplicated; move out of separate template * handle archived case too * use everywhere * public template -> template * bring back separate icon in better form * definitely was overthinking this * 32 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix sticky diff stats container (#12002)Cirno the Strongest2020-06-225-8/+18
| | | | | | | | | | | | | * Fix sticky diff stats container * Use pure CSS sticky instead of Fomantic's JS * add border color to arc-green * add slight padding on sides * make linter happy Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new ↵65432020-06-227-33/+73
| | | | | | | | | | | | | swagger section settings (#11854) * move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
* Make tabs smaller (#12003)silverwind2020-06-223-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make tabs smaller Fomantic's tabs are excessively wide and with another tab added on the repo tabbar (https://github.com/go-gitea/gitea/pull/8346) it would break the layout on the english language. Globally reduce tab bar padding to around half of the previous values. * disable no-duplicate-selectors linter rule * more tab bar tweaks * more tweaks * merge rules and nesting * remove arc-green weird hover color * few more arc-green tweaks * restore to 12px * tweaks * use half width height padding * final tweak * 10px * remove min-height * 11px * remve new-menu background on light theme too * background fixes for new-menu Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix typo (#12013)successgo2020-06-222-2/+2
| | | | | | | | | | | * Fix typo of MSSQL * Fix typo: validates * Fix typo * fix comment with space Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Changelog for v1.11.8 and v1.12.1 (#12006) (#12007)Lauris BH2020-06-222-1/+15
| | | | | * Changelog for v1.12.1 (#12006) * Update gitea version to latest release
* Fix missing styling for dropdown icon on review button (#11998)Cirno the Strongest2020-06-222-1/+7
| | | | | | | | * Fix missing styling for dropdown icon on review button * Remove unnecessary span element Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use octicons for all repo header buttons (#11890)Cirno the Strongest2020-06-222-5/+6
| | | | | | | | * Use octicons for all repo header buttons * ensure margin isn't set on any other svg outside repo buttons Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>