summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Direct SVG rendering (#12157)silverwind2020-07-12227-609/+452
| | | | | | | | | | | | Introduce 'make svg' which calls a node script that compiles svg files to `public/img/svg`. These files are vendored to not create a dependency on Node for the backend build. On the frontend side, configure webpack using `raw-loader` so SVGs can be imported as string. Also moved our existing SVGs to web_src/svg for consistency. Fixes: https://github.com/go-gitea/gitea/issues/11618
* Extend Notifications API and return pinned notifications by default (#12164)zeripath2020-07-127-24/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extend notifications API and return pinned notifications in notifications list Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger again Signed-off-by: Andrew Thornton <art27@cantab.net> * fix test Signed-off-by: Andrew Thornton <art27@cantab.net> * remove spurious debugs * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update models/notification.go * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Upgrade xorm to v1.0.3 (#12210)Lunny Xiao2020-07-1149-1728/+2060
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Frontport Changelog of v1.12.2 (#12216)65432020-07-112-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changelog for v1.12.2 (#12214) * Changelog for v1.12.2 * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> * update docs Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* Ensure syntax highlighting is the same inside diffs (#12205)mrsdizzie2020-07-112-8/+12
| | | | | Make sure to end up with the same syntax highlighting inside various sections of diffs by processing the code first before detecting specific changes between the lines. Also try and make sure that when highlighting individual lines in a diff that it is tokenized the same as it would be when part of an entire file with more context. Fixes: #12190
* [skip ci] Updated translations via CrowdinGiteaBot2020-07-091-0/+11
|
* Default to showing closed Issues/PR list when there are only closed ↵65432020-07-091-1/+7
| | | | | issues/PRs (#12200) If all issues are closed, then set the default to show the closed issues.
* Make copy/paste work for source code (#12191)mrsdizzie2020-07-087-10/+27
| | | | | | | | | | | | | | | * Make copy/paste work for source code Fix regression casued by #12047 so copy/paste works properly in all browsers. Fixes #12184 Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore. * use pseudo-element to prevent copying of comment + symbol even when not visually selected * remove added newline here should not be necessary anymore * make sure empty line is newline so there is something to select and copy
* Fix regression: Gitea commits API again returns commit summaries, not full ↵Kristian Antonsen2020-07-081-1/+1
| | | | | messages (#12186) Closes #12185
* Update JS dependencies (#12181)silverwind2020-07-083-1282/+903
| | | | | | - Update all dependencies excluding octicons - Configure new eslint 7.3.0 rules Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Enable cloning via Git Wire Protocol v2 over HTTP (#12170)William Hilton2020-07-081-4/+15
| | | | | | | * Enable Git Wire Protocol v2 over HTTP * use RunInDirTimeoutEnv * pass $HOME environment variable to git upload-pack
* Remove newline when highlighting random chunks of code (#12180)mrsdizzie2020-07-082-2/+3
| | | | | | | | | | | * Remove newline when highlighting random chunks of code Somewhere when tokenizing a newline gets added to code formatted by chroma. This breaks the case of 'added-code' inside of an 'added-line' in a diff. Just remove any newline when processing chunks of code since we don't need it. Fixes #12172 * don't process empty lines * This is the proper way to fix this by telling chroma not to add the newline in the first place
* Trim to 255 runes instead of bytes (#12150)Jürgen Hötzel2020-07-081-4/+5
| | | | | | | | | | | | | * Trim to 255 runes instead of bytes Prevents invalid UTF-8 encoding for Description and Website. Refs #7905 * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Decrease the num_stars when deleting a repo (#11954)赵智超2020-07-075-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Decrease the num_stars when deleting a repo fix #11949 Signed-off-by: a1012112796 <1012112796@qq.com> * Add migration * use batch * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> * fix lint * fix lint * fix ci * fix ci2 * add doctor * duplicate code * fix migration * fix some nits * add start Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Adjust margin-top for repo header label (#12174)Cirno the Strongest2020-07-071-0/+1
|
* Fix U2F button icon (#12167)silverwind2020-07-071-1/+1
| | | | | Previously this used a USB icon which required a separate font file used nowhere else so replace it with a octicon and fix the background color on arc-green too.
* Ensure Subkeys are verified (#12155)zeripath2020-07-061-1/+41
| | | | | | | | | | | | | When attempting to verify subkeys the email address verification step requires checking the emails however, these emails are not stored on subkeys but instead on the primary key. This PR will obtain the primaryKey and check against these emails too. Fix #12128 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* fix a spelling error (#12163)Stormxx2020-07-061-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* models: break out of loops (#12159)Lars Lehtonen2020-07-061-3/+6
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2020-07-061-0/+6
|
* Fonts rework (#12114)silverwind2020-07-0623-954/+21
| | | | | | | | | | | | | - Use system fonts only for text to avoid FOUT - Move font-awesome to npm/webpack - Move NotoColorEmoji to web_src - Remove presumably unneccesary 'PT Sans Narrow' - Simplify webpack import exclusions Fixes: https://github.com/go-gitea/gitea/issues/11818 Fixes: https://github.com/go-gitea/gitea/pull/11814 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Update the wiki repository remote origin while update the mirror ↵yisiliang2020-07-052-4/+22
| | | | | | | | | | | | | | repository's Clone From URL (#12053) * update the wiki repository remote origin #12050 * wikiRemoteURL is under repo_module * export WikiRemoteURL func * remove redundant space and empty line Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777)zeripath2020-07-0517-17/+924
| | | | | | | | | | | | | | | | | | | | | | * Make LogDescriptions race safe * Add manager commands for pausing, resuming, adding and removing loggers Signed-off-by: Andrew Thornton <art27@cantab.net> * Placate lint * Ensure that file logger is run! * Add support for smtp and conn Signed-off-by: Andrew Thornton <art27@cantab.net> * Add release-and-reopen Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2020-07-059-54/+0
|
* Use hash of repo path, ref and entrypath as cache key (#12151)Lauris BH2020-07-061-2/+8
|
* 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>