Commit Graph

2479 Commits

Author SHA1 Message Date
silverwind 062f35109d
move vue and vue-calendar-heatmap to webpack (#10188)
- unvendor vue and vue-calendar-heatmap
- remove unused moment.js leftover from previous heatmap version
- ensure webpack loads the full version of vue
- fix vue devmode warning related to 'searchLimit' type

I wanted to name the chunk heatmap.js but adblockers don't like that
filename [1].

[1] 3899d5dff3/easyprivacy/easyprivacy_general.txt (L2095)
2020-02-23 21:34:28 +00:00
silverwind 71d5a090df
Prevent Firefox from using apple-touch-icon (#10402)
* Prevent Firefox from using apple-touch-icon

The opaque background does not work well in Firefox which uses the icon
as a "rich icon". Prevent this by not specifying it in HTML. Real Apple
devices will still request the icon on the static path.

Fixes: https://github.com/go-gitea/gitea/issues/10394

Also adjust gitignore so app.ini.sample becomes searchable and fixed a
variable name in app.ini.sample.

* fix gitignore
2020-02-23 08:34:53 -06:00
zeripath c8d1c38129
Render READMEs in docs/ .gitea or .github from root (#10361)
* Render READMEs in docs/ .gitea or .github from root
2020-02-21 17:04:20 -06:00
John Olheiser ac18c3f6f2
Fixes (#10386)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-20 17:44:13 -06:00
Lauris BH 3c45cf8494
Add detected file language to code search (#10256)
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00
John Olheiser d3f618362a
Fix JS and Vue (#10328)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-02-18 08:07:57 +02:00
John Olheiser e76a64dda1
Inject SVG sprite via ajax (#10320)
* AJAX SVG
* Fix PWA
* Remove unused PWA assets

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

Co-Authored-by: silverwind <me@silverwind.io>
2020-02-17 23:11:59 +00:00
zeripath 314740e215
Truncate long commit message header (#10301)
* Truncate long commit message header

* Fix overflow in view commit table

* Use @media less

* Further improvements

* Fix the commit message on small screens

* adjust width of minimal table
2020-02-17 19:45:55 +02:00
Lunny Xiao 17656021f1
Fix reply on code review (#10227)
Co-authored-by: zeripath <art27@cantab.net>
2020-02-13 13:22:15 +08:00
David Svantesson 9ff4e1d2d9
Add API branch protection endpoint (#9311)
* add API branch protection endpoint

* lint

* Change to use team names instead of ids.

* Status codes.

* fix

* Fix

* Add new branch protection options (BlockOnRejectedReviews, DismissStaleApprovals, RequireSignedCommits)

* Do xorm query directly

* fix xorm GetUserNamesByIDs

* Add some tests

* Improved GetTeamNamesByID

* http status created for CreateBranchProtection

* Correct status code in integration test

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-02-12 23:19:35 +00:00
Lunny Xiao 83a8944fcf
Add feishu webhook support (#10229)
Add feishu webhook support
2020-02-12 08:48:28 +00:00
John Olheiser d67e9b9629
SVG Octicon fixes (#10237)
* SVG fixes

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

* Colorize span->svg only

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

* @silverwind suggestions

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

* Alphabetical

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

* Convert suburl and staticPrefix to window.config

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

* De-structure

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

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-11 20:53:18 -05:00
jaqra 2399bad1f1
fix label menu text on miletone issues (#10242)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-12 01:07:07 +01:00
James Lakin 54af3c90c7
Fix issue sidebar menus having an infinite height (#10239)
* Revert "Limit label list height on edit issue page"

* Fix issue sidebar menus having an infinite height
2020-02-11 22:40:47 +02:00
John Olheiser 86fdba177a
Add Octicon SVG spritemap (#10107)
* Add octicon SVG sprite

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

* Static prefix

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

* SVG for all repo icons

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

* make vendor

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

* Swap out octicons

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

* Move octicons to top of less imports

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

* Fix JS

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

* Definitely not a search/replace

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

* Missed regex

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

* Move to more generic calls and webpack

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

* make svg -> make webpack

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

* Remove svg-sprite

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

* Update tests

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

* Missed a test

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

* Remove svg from makefile

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

* Suggestions

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

* Attempt to fix test

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

* Update tests

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

* Revert timetracking test

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

* Swap .octicon for .svg in less

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

* Add aria-hidden

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

* Replace mega-octicon

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

* Fix webpack globbing on Windows

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

* Revert

Co-Authored-By: silverwind <me@silverwind.io>

* Fix octions from upstream

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

* Fix Vue and missed JS function

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

* Add JS helper and PWA

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

* Preload SVG

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

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-11 12:02:41 -05:00
jaqra 602b29e965
Limit label list height on edit issue page (#10216) 2020-02-11 16:41:48 +01:00
Lauris BH ad2642a8aa
Language statistics bar for repositories (#8037)
* Implementation for calculating language statistics

Impement saving code language statistics to database

Implement rendering langauge stats

Add primary laguage to show in repository list

Implement repository stats indexer queue

Add indexer test

Refactor to use queue module

* Do not timeout for queues
2020-02-11 11:34:17 +02:00
guillep2k 069a96ebe2
Improve 404 error message (#10214) 2020-02-10 21:23:35 +02:00
zeripath 9789e0ad53
Only show conflicted files if not merged (#10197)
* Only show conflicted files if not merged

* try again

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-09 21:53:41 -05:00
Lauris BH fe00886bef
Fix followers and following tabs in profile (#10202) 2020-02-09 22:18:01 +02:00
6543 e273817154
[API] Fix inconsistent label color format (#10129)
* update and use labelColorPattern

* add TestCases

* fix lint

* # optional for templates

* fix typo

* some more

* fix lint of **master**
2020-02-09 14:33:03 +00:00
silverwind 4721d45c2a
move clipboard.js to npm/webpack (#10183)
- created lazy-loaded webpack chunk for clipboard.js
- upgraded clipboard.js from 1.5.9 to 2.0.4
- parallelize initialization of all lazy-loaded features

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-08 00:03:42 +01:00
James Lakin 6e6da2c276
Tweak locale to respect singular conflicting file message in P… (#10177)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-07 17:38:18 +01:00
guillep2k 08c9160e71
Allow emoji on review head comments (#10159)
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-06 20:35:53 +02:00
guillep2k 727fc42db7
Fix issue/pull link (#10158) 2020-02-06 13:12:15 -05:00
6543 b3c72a7c4a
[API] expose RepoOwner on Issue responce (#10126)
* add RepoOwner on issue api responce

* CI.restart()
2020-02-04 00:05:17 -05:00
James Lakin 3ff95cef60
Show if a PR has conflicting files on the PR lists (#10130)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-02-04 00:14:38 +02:00
Lauris BH 20c513be6e
Show download count info in release list (#10124)
* Show download count info in release list

* Use go-humanize
2020-02-03 21:50:37 +02:00
Lunny Xiao 3ccd271081
Fix branch page pull request title and link error (#10092)
* Fix branch page pull request title and link error

* Fix ui
2020-02-01 15:54:25 +02:00
6543 13bc82009c
API endpoint for repo transfer (#9947)
* squash

* optimize

* fail before make any changes

* fix-header
2020-01-31 15:49:04 +00:00
John Olheiser 6bb0f20456
Remove unused config on UI (#10078)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-01-31 00:18:31 +02:00
silverwind 35ada598cc
move jquery.are-you-sure to npm/webpack (#10063) 2020-01-29 21:16:55 +00:00
6543 169bb55ec6
[UI] Show pull icon on pull (#10061)
* make fmt
* show pull icon on pull
2020-01-29 18:54:34 +00:00
NiTRoeSE db42a15fa0
add touch-icon with background (#10022)
* add touch-icon with background

...to prevent ugly glitch while minimize app to homescreen

* add / generate apple-touch-icon

* run make command

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-01-28 21:03:39 -05:00
zeripath c01221e70f
Queue: Make WorkerPools and Queues flushable (#10001)
* Make WorkerPools and Queues flushable

Adds Flush methods to Queues and the WorkerPool
Further abstracts the WorkerPool
Adds a final step to Flush the queues in the defer from PrintCurrentTest
Fixes an issue with Settings inheritance in queues

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

* Change to for loop

* Add IsEmpty and begin just making the queues composed WorkerPools

* subsume workerpool into the queues and create a flushable interface

* Add manager command

* Move flushall to queue.Manager and add to testlogger

* As per @guillep2k

* as per @guillep2k

* Just make queues all implement flushable and clean up the wrapped queue flushes

* cope with no timeout

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-28 20:01:06 -05:00
silverwind 7c84dbca4f
fix gitgraph commit hashes in dark theme (#10046)
because the CSS was lazy-loaded the rules in arc-green did not win.
included the css file in the main bundle to fix. the black dots can not
be fixed via CSS because they are drawn in a `<canvas>` element
unfortunately.
2020-01-28 23:22:39 +00:00
silverwind b9690d7c0b move highlight.js to npm/webpack (#10011)
- introduced window.config to help with js-based lazy-loading
- adjusted webpack chunk naming to avoid 'vendors~name.js' that webpack
  defaults to for vendor chunks.
- added theme class to html and prefixed all selectors. this is
  neccesary so that the theme styles win over the lazy-loaded ones.

Co-authored-by: zeripath <art27@cantab.net>
2020-01-28 23:57:20 +02:00
Andy Harrison d879353632 Minor typo fix (#10043) 2020-01-28 18:45:39 +00:00
mrsdizzie 52952d9f0f Style blockquote for default issue mail template (#10024)
Style blockquotes as one might expect for html email to disinguish them
from other text
2020-01-27 22:35:34 +00:00
silverwind 03cb168127 add apple-touch-icon (#10006)
fixes: https://github.com/go-gitea/gitea/issues/10003

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-27 13:10:57 +08:00
silverwind c640a1818a add explicit dimensions to navbar avatar (#9986)
* add explicit dimensions to navbar avatar

this prevents a temporary layout change when navigating between
pages with cache disabled.

* also add dimensions on frontpage

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-26 18:13:38 +02:00
silverwind fd094eea95 fix commit view JS features, reimplement folding (#9968)
* fix commit view JS features, reimplement folding

File content folding was not working so I reimplemented it in a saner
way. Then I noticed the issue was actually because of missing JS
libraries (seen on the console of every commit with error
'SimpleMDE is not defined').

Fixed the libraries. I think the reimplementation is worth to keep.

* add .closest polyfill

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-26 08:17:25 +00:00
Lauris BH 59510d6227
Change font to Roboto to support more charsets (#9803) 2020-01-25 23:47:42 +02:00
silverwind 1703a63da6 fix browser warnings related to crossorigin preload (#9984) 2020-01-25 23:18:31 +02:00
silverwind 75a124b449 remove loadCSS and preload woff2 icon fonts (#9976)
loadCSS was used as a polyfill for rel=preload but it seems we only used
it on a single CSS file which did not help much. Changed the icon CSS to
a blocking load and preload the woff2 variants which does work in modern
browsers (Firefox currently needs the network.preload about:config
setting but should gain proper support soon).

Co-authored-by: zeripath <art27@cantab.net>
2020-01-25 20:58:26 +02:00
Lunny Xiao a67c06ce90 Sanitize credentials in mirror form (#9975) 2020-01-25 10:57:42 +00:00
silverwind 5b17bb8f3d add css extraction and minification to webpack (#9944)
This changes the CSS output of webpack to output to the public/css
directory instead of inling CSS in JS. This enables CSS minification and
autoprefixer based on browserslist which would otherwise not be
possible.

The result of this change is two new output files currently:

- public/css/swagger.css
- public/css/gitgraph.css

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-01-25 16:41:34 +08:00
John Olheiser 88c212a8a3 Fix image (#9962)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-01-24 21:23:10 +00:00
SpaWn2KiLl 1f01f53c53 API add/generalize pagination (#9452)
* paginate results

* fixed deadlock

* prevented breaking change

* updated swagger

* go fmt

* fixed find topic

* go mod tidy

* go mod vendor with go1.13.5

* fixed repo find topics

* fixed unit test

* added Limit method to Engine struct; use engine variable when provided; fixed gitignore

* use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors

* set Page value on Home route

* improved memory allocations

* fixed response headers

* removed logfiles

* fixed import order

* import order

* improved swagger

* added function to get models.ListOptions from context

* removed pagesize diff on unit test

* fixed imports

* removed unnecessary struct field

* fixed go fmt

* scoped PR

* code improvements

* code improvements

* go mod tidy

* fixed import order

* fixed commit statuses session

* fixed files headers

* fixed headers; added pagination for notifications

* go mod tidy

* go fmt

* removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list

* Apply suggestions from code review

Co-Authored-By: 6543 <6543@obermui.de>
Co-Authored-By: zeripath <art27@cantab.net>

* fixed build error

* CI.restart()

* fixed merge conflicts resolve

* fixed conflicts resolve

* improved FindTrackedTimesOptions.ToOptions() method

* added backwards compatibility on ListReleases request; fixed issue tracked time ToSession

* fixed build error; fixed swagger template

* fixed swagger template

* fixed ListReleases backwards compatibility

* added page to user search route

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
2020-01-24 14:00:29 -05:00
Lunny Xiao f6067a8465 Migrate reviews when migrating repository from github (#9463)
* fix typo

* Migrate reviews when migrating repository from github

* fix lint

* Added test and migration when external user login

* fix test

* fix commented state

* Some improvements

* fix bug when get pull request and ref original author on code comments

* Fix migrated line; Added comment for review

* Don't load all pull requests attributes

* Fix typo

* wrong change copy head

* fix tests

* fix reactions

* Fix test

* fix fmt

* fix review comment reactions
2020-01-23 19:28:15 +02:00