]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agoEnforce transparent background on editor toolbar elements (#11569)
Cirno the Strongest [Sat, 23 May 2020 11:59:40 +0000 (13:59 +0200)]
Enforce transparent background on editor toolbar elements (#11569)

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix Enter not working in SimpleMDE (#11564)
silverwind [Sat, 23 May 2020 01:29:57 +0000 (03:29 +0200)]
Fix Enter not working in SimpleMDE (#11564)

* Fix Enter not working in SimpleMDE

This condition was wrongly inverted, leading to all enter keys being
blocked.

Fixes: https://github.com/go-gitea/gitea/issues/11559
* fix it for absent tribute too

4 years agoUse default commit message for wiki edits (#11550)
mrsdizzie [Fri, 22 May 2020 13:14:02 +0000 (09:14 -0400)]
Use default commit message for wiki edits (#11550)

Use a default commit message when a user doesn't add one (same as repo editor) to avoid commit lists with no message

4 years agoClose EventSource before unloading the page (#11539)
silverwind [Fri, 22 May 2020 10:57:54 +0000 (12:57 +0200)]
Close EventSource before unloading the page (#11539)

Should eliminate a error in the Firefox console regarding the connection
being interrupted while the page was loading.

4 years agoMove serviceworker to workbox and fix SSE interference (#11538)
silverwind [Fri, 22 May 2020 01:45:34 +0000 (03:45 +0200)]
Move serviceworker to workbox and fix SSE interference (#11538)

* Move serviceworker to workbox and fix SSE interference

Instead of statically hardcoding every frontend asset, this uses a
type-based approach to cache all js,css and manifest.json requests.

This also fixes the issue that the service worker was interfering with
EventSource because it was unconditionally handling all requests which
this new implementation doesn't.

Fixes: https://github.com/go-gitea/gitea/issues/11092
Fixes: https://github.com/go-gitea/gitea/issues/7372
* rethrow error instead of logging

* await .register

* Revert "rethrow error instead of logging"

This reverts commit 043162ba1f18b98a4bf9635959fd28d16e839fc5.

* improve comment

* remove JSRenderer

* add version-based cache invalidation

* refactor

* more refactor

* remove comment

* rename item to fit cache name

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 22 May 2020 00:03:16 +0000 (00:03 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoEnsure emoji render with regular font-weight (#11541)
silverwind [Fri, 22 May 2020 00:01:58 +0000 (02:01 +0200)]
Ensure emoji render with regular font-weight (#11541)

Emoji characters don't support bold attributes and may do weird things
like rendering monochrome when bolded.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 21 May 2020 13:49:42 +0000 (13:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoPrevent transferring repos to invisible orgs (#11517)
guillep2k [Thu, 21 May 2020 13:48:01 +0000 (10:48 -0300)]
Prevent transferring repos to invisible orgs (#11517)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoAPI PullReviewComment HTMLPullURL should return the HTMLURL (#11501)
zeripath [Thu, 21 May 2020 02:41:30 +0000 (03:41 +0100)]
API PullReviewComment HTMLPullURL should return the HTMLURL (#11501)

Fix #11499

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoMove tributejs to npm/webpack (#11497)
silverwind [Thu, 21 May 2020 02:00:43 +0000 (04:00 +0200)]
Move tributejs to npm/webpack (#11497)

* Move tributejs to npm/webpack

- Move vendored bundle to npm and webpack
- Rewrote initialization to single function
- Restyled it (made it a bit smaller)
- Fixed it for arc-green

* fix mention

* also include emoji on #content

* Update web_src/less/_tribute.less

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* rewrite to only use one instance of Tribute

* refactor

* fix copy/paste error

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix repo-list private and total count bugs (#11500)
zeripath [Thu, 21 May 2020 01:15:30 +0000 (02:15 +0100)]
Fix repo-list private and total count bugs (#11500)

* Fix repo-list private and total count bugs

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure limited and private org public repos are displayed on "private"

Signed-off-by: Andrew Thornton <art27@cantab.net>
* switch from onlyPrivate to is_private

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Generate swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix webpack chunk loading with STATIC_URL_PREFIX (#11526)
silverwind [Wed, 20 May 2020 22:33:31 +0000 (00:33 +0200)]
Fix webpack chunk loading with STATIC_URL_PREFIX (#11526)

Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix text-transform on wiki revisions page (#11486)
Cirno the Strongest [Wed, 20 May 2020 20:27:14 +0000 (22:27 +0200)]
Fix text-transform on wiki revisions page (#11486)

* Fix text-transform on wiki revisions page

* apply global

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix the bug that the emoji does not disappear (#11489)
L0veSunshine [Wed, 20 May 2020 19:41:33 +0000 (03:41 +0800)]
Fix the bug that the emoji does not disappear (#11489)

* Fix the bug that the emoticon does not disappear

* Update web_src/js/index.js

Co-authored-by: Lauris BH <lauris@nix.lv>
* Update web_src/js/index.js

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 May 2020 18:36:38 +0000 (18:36 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix form action template substitutions on admin pages (#11519)
Matthew R. McDougal [Wed, 20 May 2020 18:35:16 +0000 (13:35 -0500)]
Fix form action template substitutions on admin pages (#11519)

* Fix form action template substitution on admin dashboard

* Fix form action template substitution on admin monitoring page

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 May 2020 17:13:30 +0000 (17:13 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix margin for branch-update grid on PR view when update button is not present (...
Cirno the Strongest [Wed, 20 May 2020 17:12:08 +0000 (19:12 +0200)]
Fix margin for branch-update grid on PR view when update button is not present (#11521)

* Fix margin for branch-update grid on PR view when update button is not present

* Move padding to row element

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 May 2020 16:17:40 +0000 (16:17 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoTrimSpace when reading InternalToken from a file (#11502)
zeripath [Wed, 20 May 2020 16:16:06 +0000 (17:16 +0100)]
TrimSpace when reading InternalToken from a file (#11502)

InternalTokens are fixed as alphanum strings therefore TrimSpace from these.
Also use isatty to not add a terminal newline when redirecting generate.

Fix #11498

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoAdd push commits history comment on PR time-line (#11167)
赵智超 [Wed, 20 May 2020 12:47:24 +0000 (20:47 +0800)]
Add push commits history comment on PR time-line (#11167)

* Add push commits history comment on PR time-line
* Add notify by email and ui of this comment type also

Signed-off-by: a1012112796 <1012112796@qq.com>
* Add migrations for IsForcePush
* fix wrong force-push judgement
* Apply suggestions from code review
* Remove commit number check
* add own notify fun
* fix some typo

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* fix lint

* fix style again, I forgot something before

* Change email notify way

* fix api

* add number check if It's force-push

* Add repo commit link fuction
remove unnecessary check
skip show push commits comment which not have commits alive

* Update issue_comment.go

* Apply suggestions from code review

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* Apply suggestions from code review

* fix ui view

Co-authored-by: silverwind <me@silverwind.io>
* fix height

* remove unnecessary style define

* simplify GetBranchName

* Apply suggestions from code review

* save commit ids and isForce push by json
* simplify GetBranchName

* fix bug

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
4 years agoEnable stylelint's shorthand-property-no-redundant-values (#11436)
silverwind [Wed, 20 May 2020 04:06:04 +0000 (06:06 +0200)]
Enable stylelint's shorthand-property-no-redundant-values (#11436)

Enabled the rule and --fix'ed issues.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoRemove IE11 support (#11470)
silverwind [Wed, 20 May 2020 03:28:59 +0000 (05:28 +0200)]
Remove IE11 support (#11470)

* Remove IE11 support

With master now on 1.13, it's time to drop IE11 for good. The woff
variants are also in use by Opera Mini but it has even less market share
and I can only imagine how broken the UI is in it.

Fixes: https://github.com/go-gitea/gitea/issues/6147
* update docs

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix selected line color in arc-green (#11492)
Cirno the Strongest [Wed, 20 May 2020 02:49:48 +0000 (04:49 +0200)]
Fix selected line color in arc-green (#11492)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix dropzone color on arc-green (#11514)
Cirno the Strongest [Tue, 19 May 2020 22:54:20 +0000 (00:54 +0200)]
Fix dropzone color on arc-green (#11514)

* Fix dropzone color on arc-green

* fix missing ;

* use same color as textarea and fix border

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 19 May 2020 20:25:38 +0000 (20:25 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoInsert ui divider directly in templates instead of from inside heatmap vue component...
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf [Tue, 19 May 2020 20:24:14 +0000 (22:24 +0200)]
Insert ui divider directly in templates instead of from inside heatmap vue component (#11508)

* ui: remove the divider between heatmap and feeds in the dashboard view

* this commit reverses 6ccd19ef86b3b729a3b6dc35076639db5531550a

Signed-off-by: surtur <a_mirre@utb.cz>
* add a divider to the default user dashboard view

* another one-line change, this time as a direct complement of
  2bfc71614c0c5470162825a21c13838e15ccf5a6 to implement a divider of
  sorts (as per 6ccd19ef86b3b729a3b6dc35076639db5531550a originally)

Signed-off-by: surtur <a_mirre@utb.cz>
* removed the divider in heatmap.tmpl

* the separator is added by partial templates as needed

Signed-off-by: surtur <a_mirre@utb.cz>
* load proper dashboard template code in profile.tmpl

* as discussed in Discord
* includes a divider of its own

Signed-off-by: surtur <a_mirre@utb.cz>
4 years agoTweak reaction buttons (#11496)
silverwind [Tue, 19 May 2020 07:17:37 +0000 (09:17 +0200)]
Tweak reaction buttons (#11496)

- Vertical centering using flexbox
- Very slightly decreased size of the boxes

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoui: Add dividing line between heatmap and feeds in dashboard view (#11437)
赵智超 [Tue, 19 May 2020 06:42:43 +0000 (14:42 +0800)]
ui: Add dividing line between heatmap and feeds in dashboard view (#11437)

* ui: Add dividing line between heatmap and feeds in dashboard view

I think it's necessary to add dividing line between heatmap
and feeds in dashboard view, or the first items in feed is too
near with heatmap which is not a good view.

Signed-off-by: a1012112796 <1012112796@qq.com>
* Change the implementation method

* change style

* restart ci

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoUse more toned colors for selected line (#11493)
Cirno the Strongest [Tue, 19 May 2020 05:58:45 +0000 (07:58 +0200)]
Use more toned colors for selected line (#11493)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoAdd myself to MAINTAINERS (#11494)
Cirno the Strongest [Mon, 18 May 2020 21:50:22 +0000 (23:50 +0200)]
Add myself to MAINTAINERS (#11494)

4 years agoMake localstorage read ssh or https correctly (#11483)
L0veSunshine [Mon, 18 May 2020 17:44:39 +0000 (01:44 +0800)]
Make localstorage read ssh or https correctly (#11483)

* Make localstorage read ssh or https correctly

* Update index.js

If not login there is only a "https" button, This commit fix  the "https" button hasn't blue border.

* Keep user selected whether or not to log in

* Update index.js

4 years agoFix top margin for bottom attached header (#11480)
Cirno the Strongest [Mon, 18 May 2020 10:27:09 +0000 (12:27 +0200)]
Fix top margin for bottom attached header (#11480)

4 years agoFix footer padding for comment code reply form on issue event view (#11469)
Cirno the Strongest [Mon, 18 May 2020 05:33:47 +0000 (07:33 +0200)]
Fix footer padding for comment code reply form on issue event view (#11469)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 23:29:05 +0000 (23:29 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoEnsure public repositories in private organizations are visible and fix admin organiz...
zeripath [Sun, 17 May 2020 23:27:54 +0000 (00:27 +0100)]
Ensure public repositories in private organizations are visible and fix admin organizations list (#11465)

* Ensure that we can see public repositories in private organization

Fix #10144 (Again)

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix Admin users and organizations page

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/repo_list.go

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix "Unknown task: git_fsck" error on admin dashboard (#11468)
6543 [Sun, 17 May 2020 22:14:33 +0000 (00:14 +0200)]
Fix "Unknown task: git_fsck" error on admin dashboard (#11468)

4 years agoFix styling of resolved code comment box (#11463)
Cirno the Strongest [Sun, 17 May 2020 20:43:04 +0000 (22:43 +0200)]
Fix styling of resolved code comment box (#11463)

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix .comment-code-cloud not being removed when cancelling new code comment (#11464)
Cirno the Strongest [Sun, 17 May 2020 20:36:34 +0000 (22:36 +0200)]
Fix .comment-code-cloud not being removed when cancelling new code comment (#11464)

4 years agoDo not show lock icon on repo list for public repos in private org (#11445) v1.13.0-dev
Cirno the Strongest [Sun, 17 May 2020 16:59:25 +0000 (18:59 +0200)]
Do not show lock icon on repo list for public repos in private org (#11445)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 15:36:19 +0000 (15:36 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoIncrease width for authors on commit view (#11441)
Cirno the Strongest [Sun, 17 May 2020 15:35:07 +0000 (17:35 +0200)]
Increase width for authors on commit view (#11441)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 14:16:15 +0000 (14:16 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoChange tab width for .go files to 4 (#11455)
silverwind [Sun, 17 May 2020 14:14:36 +0000 (16:14 +0200)]
Change tab width for .go files to 4 (#11455)

* Change tab width for .go files to 4

I thing 8-wide tabs are kind of archaic and inconsisten with template
files which already use 4-wide.

Also did some misc cleanups in the .editorconfig files.

* add css

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 12:44:33 +0000 (12:44 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoWhenever the ctx.Session is updated, release it to save it before sending the redirec...
zeripath [Sun, 17 May 2020 12:43:29 +0000 (13:43 +0100)]
Whenever the ctx.Session is updated, release it to save it before sending the redirect (#11456)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 11:11:07 +0000 (11:11 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoDocs: add AlpineLinux packages (#11446)
6543 [Sun, 17 May 2020 11:09:56 +0000 (13:09 +0200)]
Docs: add AlpineLinux packages (#11446)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix translation to be compatible with crowdin (#11453)
Lauris BH [Sun, 17 May 2020 09:18:59 +0000 (12:18 +0300)]
Fix translation to be compatible with crowdin (#11453)

4 years agoAllow all members of private orgs to see public repos (#11442)
zeripath [Sun, 17 May 2020 08:22:17 +0000 (09:22 +0100)]
Allow all members of private orgs to see public repos (#11442)

* Allow all members of private orgs to see public repos

Fix #10144

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/repo_list.go

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoForcibly clean and destroy the session on logout (#11447)
zeripath [Sun, 17 May 2020 06:05:11 +0000 (07:05 +0100)]
Forcibly clean and destroy the session on logout (#11447)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 00:49:40 +0000 (00:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoCheck Push permissions on IsUserAllowedToUpdate (#11448)
6543 [Sun, 17 May 2020 00:48:30 +0000 (02:48 +0200)]
Check Push permissions on IsUserAllowedToUpdate (#11448)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 16 May 2020 23:33:25 +0000 (23:33 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRefactor Cron and merge dashboard tasks (#10745)
zeripath [Sat, 16 May 2020 23:31:38 +0000 (00:31 +0100)]
Refactor Cron and merge dashboard tasks (#10745)

* Refactor Cron and merge dashboard tasks

* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page

* golangci-lint fixes

* Enforce that only one task with the same name can be registered

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix name check

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @guillep2k

* as per @lafriks

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add git.CommandContext variants

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoHide archived repos by default in repo-list (#11440)
zeripath [Sat, 16 May 2020 22:12:03 +0000 (23:12 +0100)]
Hide archived repos by default in repo-list (#11440)

As discussed in #11268 hide archived repos by default in the
dashboard repo-list

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 16 May 2020 21:07:43 +0000 (21:07 +0000)]
[skip ci] Updated translations via Crowdin

4 years ago[UI] Adjust CSS details for adding emoticons (#11435)
L0veSunshine [Sat, 16 May 2020 21:06:34 +0000 (05:06 +0800)]
[UI] Adjust CSS details for adding emoticons (#11435)

* Adjust CSS details for added emoticons

* fix lint

* avoid git conflict

4 years agoMake API EditIssue and EditPullRequest issue notifications (#11123)
zeripath [Sat, 16 May 2020 21:05:19 +0000 (22:05 +0100)]
Make API EditIssue and EditPullRequest issue notifications (#11123)

* Make API EditIssue and EditPullRequest issue notifications

Restructure models.UpdateIssueByAPI and EditIssue/EditPullRequest
to issue notifications

Fix #10014

Signed-off-by: Andrew Thornton <art27@cantab.net>
* As per @6543

Signed-off-by: Andrew Thornton <art27@cantab.net>
* update status!

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoAdd paging and archive/private repository filtering to dashboard list (#11321)
zeripath [Sat, 16 May 2020 20:07:01 +0000 (21:07 +0100)]
Add paging and archive/private repository filtering to dashboard list (#11321)

* Add archived options to SearchRepository

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add only-private search

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add filter options and paging to dashboard repository page

Signed-off-by: Andrew Thornton <art27@cantab.net>
* swagger generate

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix-swagger-again

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @mrsdizzie also remember state

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoUse session for retrieving org teams (#11438)
guillep2k [Sat, 16 May 2020 19:29:29 +0000 (16:29 -0300)]
Use session for retrieving org  teams (#11438)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoFix buttons left-margin (#11427)
Cirno the Strongest [Sat, 16 May 2020 17:45:44 +0000 (19:45 +0200)]
Fix buttons left-margin (#11427)

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoSupport view individual commit for wiki pages (#11415)
mrsdizzie [Sat, 16 May 2020 16:38:40 +0000 (12:38 -0400)]
Support view individual commit for wiki pages (#11415)

Currently you can see a list of commit history for wiki pages but aren't able to view the commit diff itself. This adds the feature to view an individual commit to a wiki repo.

Closes #8999

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoBetter styling for code review comment textarea (#11428)
Cirno the Strongest [Sat, 16 May 2020 15:50:36 +0000 (17:50 +0200)]
Better styling for code review comment textarea (#11428)

* Better styling for code review comment textarea

* align tabular menu with textarea

* border around active tab instead of textarea

* border radius

* use .28571429rem

4 years agoAllow log.xxx.default to set logging settings for the default logger only (#11292)
zeripath [Sat, 16 May 2020 02:38:52 +0000 (03:38 +0100)]
Allow log.xxx.default to set logging settings for the default logger only (#11292)

* Allow log.xxx.default to set logging settings for the default logger only

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/setting/log.go

* as per @silverwind add some documentation

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix margin on attached segment headers when they are separated by other element ...
Cirno the Strongest [Sat, 16 May 2020 01:35:22 +0000 (03:35 +0200)]
Fix margin on attached segment headers when they are separated by other element (#11425)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix yellow background on active elements in code review (#11414)
Cirno the Strongest [Sat, 16 May 2020 00:55:19 +0000 (02:55 +0200)]
Fix yellow background on active elements in code review (#11414)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoBetter styling for code review comment form (#11413)
Cirno the Strongest [Fri, 15 May 2020 22:54:18 +0000 (00:54 +0200)]
Better styling for code review comment form (#11413)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoCheck that the ctx.User is not nil before checking its ID (#11424)
zeripath [Fri, 15 May 2020 20:44:33 +0000 (21:44 +0100)]
Check that the ctx.User is not nil before checking its ID (#11424)

Fix #11423

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoUpdate JS dependencies (#11412)
silverwind [Fri, 15 May 2020 19:46:49 +0000 (21:46 +0200)]
Update JS dependencies (#11412)

A bugfix for JS syntax in highlight.js and some misc updates.

4 years agoFix webhook template when validation errors occur (#11421)
kolaente [Fri, 15 May 2020 19:02:46 +0000 (21:02 +0200)]
Fix webhook template when validation errors occur (#11421)

Signed-off-by: kolaente <k@knt.li>
4 years agoFix issue ref migration (#11419)
kolaente [Fri, 15 May 2020 14:05:18 +0000 (16:05 +0200)]
Fix issue ref migration (#11419)

The migration introduced in #8742 breaks mysql installations. This pr fixes that by correctly using CONCAT.

Signed-off-by: kolaente <k@knt.li>
4 years agoHandle panics that percolate up to the graceful module (#11291)
zeripath [Fri, 15 May 2020 00:06:00 +0000 (01:06 +0100)]
Handle panics that percolate up to the graceful module (#11291)

* Handle panics in graceful goroutines

Adds a some deferred functions to handle panics in graceful goroutines

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle panic in webhook.Deliver

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle panic in mirror.syncMirror

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agodocs: update 'Testing redux' in CONTRIBUTING.md (#11386)
赵智超 [Thu, 14 May 2020 23:28:26 +0000 (07:28 +0800)]
docs: update 'Testing redux' in CONTRIBUTING.md (#11386)

* docs: update 'Testing redux' in CONTRIBUTING.md

try simplfy it to make it more easy for contributor to follow it to
test their work by themselves.

Signed-off-by: a1012112796 <1012112796@qq.com>
* align help message strings

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix ref links in issue overviews for tags (#8742)
Sijmen Schoon [Thu, 14 May 2020 22:55:43 +0000 (00:55 +0200)]
Fix ref links in issue overviews for tags (#8742)

* Properly generate ref URLs

Tags used to not generate correct URLs (src/branch/tags/1.0.0 instead of
src/tags/1.0.0).

Also cleans up some code around it with the created helper functions.

* Fix formatting and create migration

* Add copyright head to utils_test

* Use a raw query for the ref migration

* Remove semicolon

* Quote column and table names in migration SQL

* Change || to CONCAT, since MSSQL does not support ||

* Make migration engine aware

* Add missing import

* Move ref EndName and URL to the issue service

* Fix tests

* Add test for commit refs

* Update issue.go

* Use the right command for building JavaScript bundles

* Prepare for merge

* Check for refs/* before prepending in migration

* Update services/issue/issue_test.go

* Update modules/git/utils_test.go

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 14 May 2020 21:35:09 +0000 (21:35 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd localization docs (#11411)
John Olheiser [Thu, 14 May 2020 21:33:52 +0000 (16:33 -0500)]
Add localization docs (#11411)

* Add localization docs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Clarify bleeding edge vs release

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Capitalize Crowdin

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoPrettify timeline 3 (#11139)
Sorien [Thu, 14 May 2020 19:15:21 +0000 (21:15 +0200)]
Prettify timeline 3 (#11139)

* Fix timeline comments sections borders

* Fix files dropzone right alignment

* Update review comment form and controls

* Clear segment style from comment form tabs

* Remove segment class from pulls tab

* Fix Time Tracker - Add Time button border

* Fix buttons right alignment

* Markdown tab minimal height

* Fix DropZone hover effect

* Fix Lint + remove unused controls class

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 14 May 2020 18:00:33 +0000 (18:00 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix svg octicon-key placement (#11410)
Cirno the Strongest [Thu, 14 May 2020 17:59:18 +0000 (19:59 +0200)]
Fix svg octicon-key placement (#11410)

4 years agoSwitch code editor to Monaco (#11366)
silverwind [Thu, 14 May 2020 16:06:01 +0000 (18:06 +0200)]
Switch code editor to Monaco (#11366)

* Switch code editor to Monaco

This switches out CodeMirror for Monaco which is based on the same code
base as VS code and should work pretty similar to it.

It does add a few async chunks, totalling around 10MB to our build. It
currently supports around 65 languages and in the default configuration,
each language would emit one ugly [number].js chunk, so I opted to
combine them all into a single file for now.

CodeMirror is still being used under the hood by SimpleMDE so it can not
be removed yet.

* inline editorconfig, fix diff, use for markdown, remove more dead code

* refactors, remove jquery usage

* use tab_width

* fix intellisense

* rename function for clarity

* misc tweaks, enable webpack progress display

* only use --progress on dev build

* remove useless borders in arc-green

* fix typo

* remove obsolete comment

* small refactor

* fix file creation and various refactors

* unset useTabStops too when no editorconfig

* small refactor

* disable webpack's [big] warnings

* remove useless await

* fix dark theme check

* rename chunk to 'monaco'

* add to .gitignore and delete webpack dest before build

* increase editor height

* support more editorconfig properties

* remove empty element filter

* rename

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 May 2020 23:00:00 +0000 (23:00 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd awesome-gitea reference on install from package docs (#11405)
John Olheiser [Wed, 13 May 2020 22:58:49 +0000 (17:58 -0500)]
Add awesome-gitea reference on install from package docs (#11405)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoChange install description (#11395)
John Olheiser [Wed, 13 May 2020 09:08:44 +0000 (04:08 -0500)]
Change install description (#11395)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 May 2020 07:52:13 +0000 (07:52 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRevert "Avoid 0 new commits messages to be send (#11082)" (#11397)
zeripath [Wed, 13 May 2020 07:50:56 +0000 (08:50 +0100)]
Revert "Avoid 0 new commits messages to be send (#11082)" (#11397)

This reverts commit 6034f8bcaaa5348fee775d2307ff03162130a088.

4 years agoAdd missing card component to semantic.json (#11394)
Cirno the Strongest [Wed, 13 May 2020 01:43:06 +0000 (03:43 +0200)]
Add missing card component to semantic.json (#11394)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoRefactor Milestone related (#11225)
6543 [Tue, 12 May 2020 21:54:35 +0000 (23:54 +0200)]
Refactor Milestone related (#11225)

4 years agoUnfortunately go template if does not shortcut (#11392)
zeripath [Tue, 12 May 2020 21:01:27 +0000 (22:01 +0100)]
Unfortunately go template if does not shortcut (#11392)

Go template's `{{if ...}}` does not shortcut its tests therefore it is
possible to cause a NPE unless you separate ifs into two.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoEnsure search action button coalesced to adjacent input (#11385)
zeripath [Tue, 12 May 2020 19:08:43 +0000 (20:08 +0100)]
Ensure search action button coalesced to adjacent input (#11385)

Fomantic-ui's action button syntax requires that the button is
the next sibling of the input it is attached to and that they
are both children of a div.action.

Fix #11375

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoui: Replenish the missing ‘PageIsSignUp’ in sign up view (#11390)
赵智超 [Tue, 12 May 2020 18:01:15 +0000 (02:01 +0800)]
ui: Replenish the missing ‘PageIsSignUp’ in sign up view (#11390)

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years agoUpdate docs to reflect new location of homebrew repo (#11384)
techknowlogick [Tue, 12 May 2020 12:51:41 +0000 (08:51 -0400)]
Update docs to reflect new location of homebrew repo (#11384)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoAllow compare page to look up base, head, own-fork, forkbase-of-head (#11327)
zeripath [Tue, 12 May 2020 05:52:46 +0000 (06:52 +0100)]
Allow compare page to look up base, head, own-fork, forkbase-of-head (#11327)

* Allow compare page to look up base, head, own-fork, forkbase-of-head

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @guillep2k

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update routers/repo/compare.go

* as per @guillep2k

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Rationalise the names a little

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Rationalise the names a little (2)

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix 500 with fork of fork

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent 500 on compare different trees

Signed-off-by: Andrew Thornton <art27@cantab.net>
* dotdotdot is perfectly valid in both usernames and repo names

Signed-off-by: Andrew Thornton <art27@cantab.net>
* ensure we can set the head and base repos too

Signed-off-by: Andrew Thornton <art27@cantab.net>
* ensure we can set the head and base repos too (2)

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
* only set headRepo == baseRepo if isSameRepo

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoFix usage of removed jqXHR.success (#11379)
Cirno the Strongest [Tue, 12 May 2020 03:34:48 +0000 (05:34 +0200)]
Fix usage of removed jqXHR.success (#11379)

Introduced by b57a735 via removal of jQuery-Migrate.

This PR changes usage of .success on jqXHR to .done.

Fixes #11228 and few other places, such as removal of code comments.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 May 2020 22:05:16 +0000 (22:05 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoCorrectly set the organization num repos (#11339)
zeripath [Mon, 11 May 2020 22:04:08 +0000 (23:04 +0100)]
Correctly set the organization num repos (#11339)

* Correctly set the organization num repos

Correctly set the organization num repos to the number of
accessible repos for the user

Fix #11194

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>
* attempt to fix mssql

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/user.go

* Explicit columns

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add test and fix 0 counted orgs

Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove orgname from api

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 May 2020 09:45:39 +0000 (09:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoConsolidate API for getting single commit (#11368)
Cirno the Strongest [Mon, 11 May 2020 09:44:36 +0000 (11:44 +0200)]
Consolidate API for getting single commit (#11368)

* Allow Git ref for /repos/{owner}/{repo}/git/commits/{sha}

* Consolidate API for getting single commit

* Fix tests and do it differently

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 May 2020 08:39:13 +0000 (08:39 +0000)]
[skip ci] Updated translations via Crowdin