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
silverwind [Wed, 9 Dec 2020 00:12:15 +0000 (01:12 +0100)]
Fix frontpage avatars (#13853)
The frontpage uses a rather strange method to obtain the commit's avatar
which I've overlooked earlier. I don't exactly understand how it works
but this change fixes the wrong default avatars by using the function
that was in previous use.
Also introduced a few constants for size an size increase factor.
Jimmy Praet [Tue, 8 Dec 2020 21:18:02 +0000 (22:18 +0100)]
Allow 20 characters for "View [organization]" button (#13906)
In the "View [organization]" button on the dashboard, the organization name is currenly shortened to 10 chars.
This is a bit too limited. In all other places in the code the name is also shortened to 20 instead of 10.
silverwind [Tue, 8 Dec 2020 04:14:28 +0000 (05:14 +0100)]
Repo avatar fixes (#13891)
- Split up avatar rendering helpers for performance
- Fix showing repo SVG icon when no avatar is set
- Make repo SVG and avatar same size at 32px
- Fix fork line by adding vertical flexbox on repo title
techknowlogick [Sat, 5 Dec 2020 22:34:29 +0000 (17:34 -0500)]
Add link to shop in docs (#13864)
Replaced link to code.gitea.io as that subdomain isn't meant for human consumption, but rather for our vanity go import URLs
Only replaced link for english, open to adding links for other languages if anyone is able/willing to add them
silverwind [Sat, 5 Dec 2020 11:00:36 +0000 (12:00 +0100)]
Font weight tweaks (#13854)
Font weight 500 is not discernible from 400 on some fonts/operating
systems so push them back to previous value 600 except for
fomantic-ui elements which stay at 500.
silverwind [Fri, 4 Dec 2020 15:01:47 +0000 (16:01 +0100)]
Remove Noto Color Emoji fallback (#13838)
It's causing browser errors logged in Firefox under certain
circumstances, and I think we're better off recommending Linux users to
install a proper emoji font into their system.
silverwind [Fri, 4 Dec 2020 11:18:37 +0000 (12:18 +0100)]
Style and template tweaks (#13828)
* Style and template tweaks
- Get red and green buttons on arc green closer to base theme
- EasyMDE adjustments, toolbar and focus border
- Fix header on 404 repo page
- Tweaks to frontpage search, add 'Create Repo' button
- Fix misaligned box headers
- Fix pagination on arc-green
- Fix background and footer on explore and repo search
silverwind [Thu, 3 Dec 2020 18:46:11 +0000 (19:46 +0100)]
Direct avatar rendering (#13649)
* Direct avatar rendering
This adds new template helpers for avatar rendering which output image
elements with direct links to avatars which makes them cacheable by the
browsers.
This should be a major performance improvment for pages with many avatars.
* fix avatars of other user's profile pages
* fix top border on user avatar name
* uncircle avatars
* remove old incomplete avatar selector
* use title attribute for name and add it back on blame
silverwind [Wed, 2 Dec 2020 01:18:39 +0000 (02:18 +0100)]
Swap swagger-ui with swagger-ui-dist (#13777)
* Swap swagger-ui with swagger-ui-dist
The prebuilt version of swagger-ui is identical to the regular one but
brings the benefit of faster webpack compilation and less npm
dependencies so it npm installs will speed up too.
silverwind [Tue, 1 Dec 2020 04:00:14 +0000 (05:00 +0100)]
Add class to page content to unify top margin (#13766)
* Add class to page content to unify top margin
Previously pages would individually set this margin but some didn't so
content would stick to the header without any space. Resolve this by
adding a new class that is added on all pages. The only place where we
remove this margin again is on the pages with menu or wrapper in the
header.
silverwind [Mon, 30 Nov 2020 19:52:04 +0000 (20:52 +0100)]
Set RUN_MODE prod by default (#13765)
I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.