Norwin [Tue, 22 Dec 2020 02:53:37 +0000 (02:53 +0000)]
rework heatmap permissions (#14080)
* now uses the same permission model as for the activity feed:
only include activities in repos, that the doer has access to.
this might be somewhat slower.
* also improves handling of user.KeepActivityPrivate (still shows
the heatmap to self & admins)
胡玮文 [Mon, 21 Dec 2020 17:59:18 +0000 (01:59 +0800)]
Fix storage config implementation (#14091)
The design is very flexible, but not implemented correctly.
This commit fixes several issues:
* Costom storage type stated in https://docs.gitea.io/en-us/config-cheat-sheet/#storage-storage
not working
* [storage.attachments], [storage.minio] section not respected
Mura Li [Mon, 21 Dec 2020 16:46:14 +0000 (00:46 +0800)]
Use the text of pull-request as the squash commit's message (#13071)
Originally, it was filled by the commit messages of the involved
commits. In this change, we use the headline comment of the pull
request as the commit message when it is a squash merge.
Thanks to @zeripath for suggesting the idea.
Fixes #12365
Co-authored-by: Mura Li <typeless@users.noreply.github.com>
This patch introduces DISABLE_MIGRATIONS parameter in [repository]
section of app.ini (by default set to false). If set to true
it blocks access to repository migration feature.
This mod hides also local repo import option in user editor if
local repo importing or migrations is disabled.
* Alter Example config
DISABLE_MIGRATIONS set to false in example config to
match its default value.
* HTTP error 403 instead of 500 on denied access to migration
silverwind [Sun, 20 Dec 2020 18:00:03 +0000 (19:00 +0100)]
Search and Diff CSS enhancements (#14050)
* Search and Diff CSS enhancements
- Use flexbox for language stats
- Improve labels and code boxes on repo and code search
- Use flexbox on diff header and improve suppressed diff text
- Add dedicated color for diff expander
* more diff tweaks, less vertical padding on header
Jiri Vlasak [Sun, 20 Dec 2020 01:31:06 +0000 (02:31 +0100)]
Manually approve new registration (#13083)
* Add register manual confirm settings option
The new settings option is used when manually approving new
registrations.
* Enable manual confirmation of new registered user
When manual registration confirmation is desired (by default `false`)
create new user in the database that is *not active*. The user must then
be activated manually.
This change speeds up the process of adding new confirmed users for
Gitea instances without external auth mechanism. (Currently the option
is to manually create new user by admin.)
https://github.com/go-gitea/gitea/pull/14028 had improved dropdown
triangle display for buttons with text but had regressed it for buttons
without. Fix this by adding a class to prevent horizontal margin adjustment.
silverwind [Fri, 18 Dec 2020 20:00:07 +0000 (21:00 +0100)]
Commit list display tweaks (#14043)
- Make plain <pre> inherit our monospace fonts, overriding fomantic's
css reset which means expanded commit messages now follow the font
settings.
- Adjust link styling and keyword highlighting in commit message
- Consolidate .commit-summary styles to single selector group
silverwind [Thu, 17 Dec 2020 19:58:21 +0000 (20:58 +0100)]
Dashboard search tweaks (#14008)
- Fix color of inactive pagination parts caused by overreaching CSS
selector.
- Slightly reduce horizontal padding on list items
- Add spacing around pagination and move it outside of <ul>
silverwind [Thu, 17 Dec 2020 15:52:58 +0000 (16:52 +0100)]
Diff and code review refactors and improvements (#13922)
* Diff CSS refactors and misc tweaks
- Simplify Diff CSS styling
- Add color variables for diff
- Fix vertical centering of inline comment button
- Slightly adjust text colors, e.g. in comment header
silverwind [Thu, 17 Dec 2020 14:37:56 +0000 (15:37 +0100)]
Dropdown triangle fixes (#14028)
* Dropdown triangle fixes
Fomantic's CSS assumes the dropdown triangles are fonts but we've recently
swapped them for SVG so we need to wrestle a bit with Fomantic to get it
to display properly and not cause buttons to resize.
Fixes: https://github.com/go-gitea/gitea/issues/14014
* move css and add link
zeripath [Thu, 17 Dec 2020 12:26:22 +0000 (12:26 +0000)]
Cause NotifyMigrateRepository to emit a repo create webhook (#14004)
* Cause NotifyMigrateRepository to emit a repo create webhook
This PR simply makes NotifyMigrateRepository emit a Create Repo webhook.
The reason for no new payload is that the information sent to
NotifyMigrateRepository is only essentially the same as
NotifyCreateRepository
Jimmy Praet [Wed, 16 Dec 2020 09:54:58 +0000 (10:54 +0100)]
Fix correct diff view for PR review comments in PR view page (#14002)
Fixes #13683.
The diff snippet that provides context for a code review comment on the pull request timeline page used to be calculated based on the headCommitID. But in 1.13, with PR #13448, this changed to the commitID from the blame for the commented line, which seems to cause these incorrect review comment diff snippets.
zeripath [Mon, 14 Dec 2020 17:08:37 +0000 (17:08 +0000)]
Trim the branch prefix from action.GetBranch (#13981)
* Trim the branch prefix from action.GetBranch
#13882 has revealed that the refname of an action is actually only a
refname pattern and necessarily a branch. For examplem pushing to
refs/heads/master will result in action with refname refs/heads/master
but pushing to master will result in a refname master.
The simplest solution to providing a fix here is to trim the prefix
therefore this PR proposes this.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/action.go
silverwind [Sun, 13 Dec 2020 01:05:50 +0000 (02:05 +0100)]
Markdown task list improvements (#13952)
* Markdown task list improvements
- Remove `.ui` class and wrappers to prevent fomantic from messing with it.
- Change rendered HTML to match GitHub.
- Add custom styling for the checkboxes.
zeripath [Sat, 12 Dec 2020 18:59:49 +0000 (18:59 +0000)]
Whenever the password is updated ensure that the hash algorithm is too (#13966)
`user.HashPassword` may potentially - and in fact now likely does - change
the `passwd_hash_algo` therefore whenever the `passwd` is updated, this
also needs to be updated.
silverwind [Sat, 12 Dec 2020 01:06:22 +0000 (02:06 +0100)]
Diff stat improvements (#13954)
* Diff stat improvements
- Combine number to just total number of changes
- Add tooltip over stats bar
- Increase contrast on file name
- Refactor classes and CSS to be more reusable
zeripath [Fri, 11 Dec 2020 17:27:00 +0000 (17:27 +0000)]
Ensure that pusher is not nil preventing panic in push (#13945)
PR #13381 refactored notification actions to call NotifyCreateRef and
NotifyDeleteRef in a slightly different manner. This leads to the pusher
not being set before the call.
This PR ensures that the pusher is updated before the call.
silverwind [Thu, 10 Dec 2020 20:39:09 +0000 (21:39 +0100)]
Better vertical align of buttons in headers (#13932)
The previous method used `transform` which formed a CSS stacking context
which caused issues with dropdowns appearing behind other elements which
made `position: static` necessary but that again caused even more
issues.
This method achieves the same as before, but without the additional
stacking context.
silverwind [Thu, 10 Dec 2020 05:44:13 +0000 (06:44 +0100)]
Fix avatar template error on repo collaborator page (#13924)
Fixes error `template: repo/settings/collaboration:16:16: executing
"repo/settings/collaboration" at <.>: wrong type for value; expected
*models.User; got *models.Collaborator` seen on repo collaborator page.
mrsdizzie [Thu, 10 Dec 2020 04:47:48 +0000 (23:47 -0500)]
Move diff split code into own template file (#13919)
* Move diff split code into own template file
Separate split diff view same as unified already is. Mainly because I'm working on a separate PR with this change and merge conflicts for each change to box.tmpl are annoying and I'm worried about breaking something subtle while trying to resolve them.
silverwind [Wed, 9 Dec 2020 19:03:19 +0000 (20:03 +0100)]
Replace more icons with SVG, repo search tweaks (#13860)
* Replace more icons with SVG
- Replace remaining icons on admin page with SVG
- Fix vertical menu background on arc-green
- Minor improvments to frontpage repo search
- More icon replacements here and there
silverwind [Wed, 9 Dec 2020 14:03:45 +0000 (15:03 +0100)]
Markdown: Enable wrapping in code blocks and a color tweak (#13894)
- Enable wrapping of long lines in code blocks like already done in code
view.
- Slightly lighten the background of code blocks on default theme
- Darken the background on inline code and kbd elements on arc-green