Commit graph

8465 commits

Author SHA1 Message Date
GiteaBot
c15d371939 [skip ci] Updated translations via Crowdin 2019-11-09 03:44:04 +00:00
guillep2k
6e1912c73a Fix password complexity check on registration (#8887)
* Fix registration password complexity

* Fix integration to use a complex password ;)
2019-11-09 11:40:37 +08:00
David Svantesson
9ae4c17cb1 Allow to add and remove all repositories to/from team. (#8867)
* Allow to add and remove all repositories to team.

* Change style, buttons on same row.

* Apply suggestions from code review

Grammar

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Move set num repos to lower function.

* Make general language sentences
2019-11-09 08:39:37 +08:00
MysticBoy
d2aee2a3e2 Create third-party-tools.zh-cn.md (#6303)
* Create third-party-tools.zh-cn.md

* Update third-party-tools.zh-cn.md

* Update third-party-tools.zh-cn.md
2019-11-08 17:32:30 -05:00
Lunny Xiao
f02138a148 Fix bug when migrate from API (#8631)
* fix bug when migrate from API

* fix test

* fix test

* improve

* fix error message
2019-11-08 17:21:00 -05:00
Lunny Xiao
55bdc9aa38 Webhook support custom proxy (#8760)
* Webhook support custom proxy

* Add glob support on webhook proxy host rules

* fix app.ini.sample

* improve code and app.ini.sample

* update cheetsheet about added webhook options
2019-11-08 16:25:53 -05:00
Lunny Xiao
016a5d0438 Move some actions to notification/action (#8779)
* Move some actions to notification/action

* Fix test

* fix test
2019-11-08 15:54:50 -05:00
John Olheiser
fb459f2c2c Add password reset to FAQ (#8883)
* Add password reset to FAQ

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

* Add links to email setup docs

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

* Add en-us to email setup

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

* Update docs/content/doc/help/faq.en-us.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Manually merge changes from @guillep2k and add small changes

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-08 14:44:18 -05:00
Jookia
1274ad864e a11y: Improve accessibility of dropdown menus (#8638)
* js: Import Semantic-UI's dropdown.js (version 2.3.1)

* js: Set tabindex=-1 on dropdown items

Setting tabindex=-1 on focusable elements within dropdown menus allows
the user to treat dropdown menus as a single focusable item with its own
internal navigation using arrow keys.

* js: Don't use jQuery to click menu items

Menu items are often <a> elements, which jQuery refuses to trigger click
events on. Instead it just bubbles up to the menu.

Using HTMLElement's click method fixes this and makes menu items
clickable from the keyboard using dropdown menus.

* js: Set correct ARIA 1.1 roles on dropdown menus

Setting role= makes assistive technology aware there is a widget here.
In this case, Orca will now exit browse mode and allow us to capture
keydown events when focused on a dropdown menu. It will also inform the
user that there's a menu focused.

Since dropdowns can be used in multiple elements each with different
ARIA roles, a guessRole method is used to find the correct role.
All roles I consider possible are listed, but only menu is implemented.

* js: Set aria-expanded when dropdown menus show and hide

This is deliberately done before the transition finishes so that screen
readers get immediate feedback.

* js: Set aria-label or aria-labelledby on dropdown menus

This makes dropdown menu buttons screen reader accessible.

aria-labelledby refers to an element using an ID, so the chosen labels
are now assigned a unique ID- This ID is not stable, do not refer to it
with user scripts.

* js: Set aria-activedescendant on dropdown menus

As the menus grab focus and navigate by tracking a 'selected' div class,
assistive technology has no idea that what the current selection is.

Assign IDs to each menu item and set aria-activedescendant to the ID of
the currently selected menu item.

When the menu is unfocused, remove aria-activedescendant- This isn't
neccessary but in my experience it triggers Orca to remind the user of
their current selection when re-focusing the menu.

* Makefile: Make eslint ignore semantic.dropdown.js

This file is taken from Semantic UI which isn't linted upstream.
Ignore it as we won't fix these issues.

* js: Add version note to semantic.dropdown.js

* Add Md5 AppVer to templates/base/footer.tmpl

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Add Md5 AppVer to templates/pwa/serviceworker_js.tmpl

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* semantic.dropdown.js -> semantic.dropdown.custom.js

* Use eslintignore

* remove bogus submodule
2019-11-08 12:33:21 -05:00
mrsdizzie
d9be82bd00 Fix edit content button on migrated issue content (#8877)
Typo on a closing span tag caused edit button not to work properly on
the original issue content for a migrated issue.

Fixes #8876
2019-11-08 09:01:24 +02:00
mrsdizzie
b747501337 Show due date in dashboard issues list (#8860)
* Show due date in dashboard issues list

Include due date when vieiwiing all issues on dashboard (matching what
we show for repo issue lists).

Fixes #8859

* Put in same order as repo issue list

* Add suggested changes and also update repo issue list to match
2019-11-07 21:12:23 +01:00
GiteaBot
884acf8295 [skip ci] Updated translations via Crowdin 2019-11-07 18:33:04 +00:00
jaqra
065bbddab9 Fix count for commit graph last page (#8843)
* Fix count for commit graph last page

* Remove used once variable

* Move func to model

* capitalize method name

* fix error message
2019-11-07 20:09:51 +02:00
guillep2k
1f90147f39 Use templates for issue e-mail subject and body (#8329)
* Add template capability for issue mail subject

* Remove test string

* Fix trim subject length

* Add comment to template and run make fmt

* Add information for the template

* Rename defaultMailSubject() to fallbackMailSubject()

* General rewrite of the mail template code

* Fix .Doer name

* Use text/template for subject instead of html

* Fix subject Re: prefix

* Fix mail tests

* Fix static templates

* [skip ci] Updated translations via Crowdin

* Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528)

* Expose db.SetMaxOpenConns and allow other dbs to set their connection params
* Add note about port exhaustion

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Prevent .code-view from overriding font on icon fonts (#8614)

* Correct some outdated statements in the contributing guidelines (#8612)

* More information for drone-cli in CONTRIBUTING.md

* Increases the version of drone-cli to 1.2.0
* Adds a note for the Docker Toolbox on Windows

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>

* Fix the url for the blog repository (now on gitea.com)

Signed-off-by: LukBukkit <luk.bukkit@gmail.com>

* Remove TrN due to lack of lang context

* Redo templates to match previous code

* Fix extra character in template

* Unify PR & Issue tempaltes, fix format

* Remove default subject

* Add template tests

* Fix template

* Remove replaced function

* Provide User as models.User for better consistency

* Add docs

* Fix doc inaccuracies, improve examples

* Change mail footer to math AppName

* Add test for mail subject/body template separation

* Add support for code review comments

* Update docs/content/doc/advanced/mail-templates-us.md

Co-Authored-By: 6543 <24977596+6543@users.noreply.github.com>
2019-11-07 21:34:28 +08:00
Damien Pollet
d5b1e6bc51 Theme arc-green: reverse heatmap colors (#8840)
* Theme arc-green: reverse heatmap colors

This uses the same colors as the updated palette in the base theme.

See #8709 and #5864, in particular [my comment showing the problem](https://github.com/go-gitea/gitea/issues/5864#issuecomment-462334171)

* Rebuild CSS

* Use link color as hot, interpolate between hot and cold colors

* Use color from a:hover
2019-11-06 18:23:06 +01:00
GiteaBot
f05cd3e317 [skip ci] Updated translations via Crowdin 2019-11-06 13:42:48 +00:00
Lunny Xiao
12170d26a7 Split sendCreateCommentAction as two parts, one for update comment related informations, another for actions (#8784)
* Split sendCreateCommentAction as two parts, one for update comment related informations, another for actions

* fix lint
2019-11-06 15:39:29 +02:00
David Svantesson
72aa5a20ec Add team option to grant rights for all organization repositories (#8688)
* Add field IsAllRepositories to team

* Add AllRepositories to team UI

* Manage team with access to all repositories

* Add field IsAllRepositories to team API

* put backticks around table/column names

* rename IsAllRepositories to IncludesAllRepositories

* do not reload slice if already loaded

* add repo to teams with access to all repositories when changing repo owner

* improve tests for teams with access to all repositories

* Merge branch 'master'

* Change code for adding all repositories

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* fmt after merge

* Change code in API EditTeam similar to EditTeamPost web interface

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Clarify that all repositories will be added

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* All repositories option under Permissions headline

* New setting group 'Repository access'

* Move check IncludeAllRepositories to removeRepository.

* Revert "Move check IncludeAllRepositories to removeRepository." and add comment instead.

This reverts commit 753b7d205be260b8be465b5291a02975a81f3093.

* Clarify help text what options do.
2019-11-06 11:37:14 +02:00
Lunny Xiao
0109229928
Move release webhook to notification (#8817)
* Move release webhook to notification

* Extract release webhook method

* fix bug

* fix import
2019-11-06 16:25:50 +08:00
GiteaBot
6d42add37f [skip ci] Updated translations via Crowdin 2019-11-06 06:44:54 +00:00
Lunny Xiao
8a84d82d53
Move repofiles webhooks to notification (#8807) 2019-11-06 14:43:03 +08:00
John Olheiser
36b8c081f6 Add migrate command to docs (#8842)
* Add migrate command to docs

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

* Link to CLI

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

* Clarify idempotence

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

* Sneak in convert command

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-05 13:54:54 -05:00
techknowlogick
9395805512
update docs to latest version (#8845) 2019-11-05 13:54:20 -05:00
Lauris BH
45f219239e Fix to close opened io resources as soon as not needed (#8839)
* Fix to close opened io resources as soon as not needed

* Remove unneeded err checks
2019-11-05 20:54:47 +08:00
GiteaBot
79fd422a92 [skip ci] Updated translations via Crowdin 2019-11-05 12:09:43 +00:00
Lunny Xiao
aaeef295bb
Move pull webhook to notification (#8805)
* Move pull webhook to notification

* fix fmt
2019-11-05 19:04:08 +08:00
Lauris BH
05e7715c4b Update go-org to optimize code (#8824) 2019-11-05 16:39:03 +08:00
GiteaBot
2f4ef84cbf [skip ci] Updated translations via Crowdin 2019-11-05 06:52:00 +00:00
jaqra
c0f4675a68 Fix (open/closed) issue count when label excluded (#8815)
* Fix (open/closed) issue count when label excluded

* Use capital sql keywords
2019-11-05 01:48:51 -05:00
Lauris BH
a91679c9e3 Add additional periods to activity page (#8829) 2019-11-05 00:45:48 -05:00
6543
8d8aecd3cf README: Update Screenshots and Badges in ZH (#8813)
* use relative instead of absolute paths

* update badges of ZH readme

* update screenshots

* use <style> for table

* remove useles stype

* absolute paths for images
2019-11-04 19:12:58 -05:00
Lauris BH
86a44f6b48
Fix new user form for non-local users (#8826) 2019-11-04 21:10:37 +02:00
GiteaBot
3fb9e3afe3 [skip ci] Updated translations via Crowdin 2019-11-04 10:23:49 +00:00
Wenxuan Zhao
0471aae348 Fix: remove duplicated signed commit icons (#8820)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
2019-11-04 18:20:12 +08:00
GiteaBot
ee5249889d [skip ci] Updated translations via Crowdin 2019-11-04 04:52:17 +00:00
Ramon Fischer
2282c659dd Explicity indicate the socket unit to use the service unit "gitea.service" (#8804)
* rename socket file, make example more precise, use long parameter name

* correct path

* use the correct path to the configuration file according to the documentation

* rename the socket unit back to 'gitea.main.socket', explicitly indicate that the socket unit should use the service file 'gitea.service'
2019-11-04 12:42:30 +08:00
Lunny Xiao
a966a0298e Move more webhook codes from models to webhook module (#8802)
* Move more webhook codes from models to webhook module
2019-11-03 22:13:25 +00:00
Lunny Xiao
491887d441 Move actions to notification (#8785) 2019-11-03 20:59:09 +00:00
David Svantesson
7971b05d2b Fix API deadline removal (#8759)
* Handle deadline is zero (to remove deadline)

* Better API documentation for issue deadline.

* Add parameter to unset due date.

* Update pull edit API comment
2019-11-03 22:46:32 +08:00
mrsdizzie
dce22efbee Fix SSH2 conditonal in key parsing code (#8806)
Avoid out of bounds error by using strings.HasPrefix to check for
starting SSH2 text rather than assuming user input has at least 31
characters.

Add tests for bad input as well.

Fixes #8800
2019-11-03 19:08:18 +08:00
Lunny Xiao
022d2d8beb
Move push commits events to notification (#8783)
* Move push commits events to notification

* Update modules/notification/base/null.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-11-03 14:59:26 +08:00
6543
fe7a6d9bfc [Fix] Checkbox at RepoSettings Protected Branch (#8799)
* add missing "d"

* CI.redo()
2019-11-03 00:54:39 +00:00
GiteaBot
61a3eae923 [skip ci] Updated translations via Crowdin 2019-11-02 22:49:35 +00:00
6543
76185edd76 FIX download diff/patch from commit (#8792)
* send fix

* restart CI

* us Commit only when available

* CI.redo()

* more specific if statement

Co-Authored-By: mrsdizzie <info@mrsdizzie.com>
2019-11-02 18:47:25 -04:00
GiteaBot
729708e878 [skip ci] Updated translations via Crowdin 2019-11-02 15:29:18 +00:00
6543
5a187f4bcc Add API for Issue set Subscription (#8729)
* add issue subscriber API

* subscribers return []user.APIFormat

* add comments

* more meaningfull description

* without "reqToken()" api works ...
 * should be still secure beause ctx.user has to be there or nothing will hapen

* FIX: getIssueWatchers() get only aktive suscriber

* add return avter error on right position

* Revert "FIX: getIssueWatchers() get only aktive suscriber"

This reverts commit 5eca9291858a821981992b0aaa38cef610d84bca.

* Update routers/api/v1/repo/issue.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* test go linter again

* update swagger

* GetIssueWatchers -> GetIssueSubscribers

part one

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* GetIssueWatchers -> GetIssueSubscribers
part two

* Revert "test go linter again"

This reverts commit bab12356227e44334de113b76f12099de0b8aaa6.

* change description for unsubscribe too

* golangci-lint timeout avter 5min

* move issueSubscription to seperate file

* dont create black entitys

* use IsWatching until refactoring

* Update License Info

* better swagger description

* Update .golangci.yml

because functions moved from issue.go to issue_subscription.go

* add IssueWatchList type

* batch tasks

* use e Engien

* add error handling

* error should be the last type when returning multiple items

* short version

* reurn empy UserList instead of nil
2019-11-02 23:27:49 +08:00
GiteaBot
dd9cb32bff [skip ci] Updated translations via Crowdin 2019-11-02 13:40:49 +00:00
Lunny Xiao
21dfe1b256
fix 500 when edit hook (#8782) 2019-11-02 21:38:11 +08:00
David Svantesson
232340f5e3 Prevent upload (overwrite) of lfs locked file (#8769)
* Check if file is locked on upload file commit.

* Better user message if file is locked.

* Check lfs lock before creating temporary repository. fix some errors.

* move lines

* Add comment that enabled setting is checked.
2019-11-02 15:37:05 +08:00
zeripath
9d663dfde6 On windows set core.longpaths true (#8776) 2019-11-02 13:40:49 +08:00