Commit Graph

985 Commits

Author SHA1 Message Date
Lunny Xiao 6ed22ffd16 Add merged commit id on pull view when it's merged (#8062) 2019-09-03 09:29:36 +03:00
Mura Li 032c90e7c5 Add tooltip for the visibility checkbox in /repo/create (#8025)
* Add tooltip for the visibility checkbox in /repo/create

* Change the tooltip wording

* Update options/locale/locale_en-US.ini

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-09-02 18:29:04 -04:00
jaqra 13388258a4 Changed black to white for (read) number label on issue list (#8000)
* Changed black color to blue for read number label on issue list page

* Change color to white
2019-08-28 12:20:52 +02:00
Lunny Xiao 5616356a0b keep blame view buttons sequence consistent with normal view when view a file (#8007) 2019-08-27 22:23:18 -04:00
6543 5409dec8fd [Branch View] show "New Pull Request" Button only if posible (#7977)
* add check Commits Ahead is gt 0

* code format
to start drone-ci test again
and formate code is also nice :)
2019-08-26 13:47:41 +03:00
Gary Kim 5f7fccaf55 Revert RenderCommitMessageLink part of #7659 (#7923)
RenderCommitMessageLink may have the
potential for issues and is overall
not very intuitive for the user in its
current state.

This commit will revert the usage
of RenderCommitMessageLink that was
added in #7659 to work on addressing
some of those issues to and merge this
feature again in a more polished state.

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-08-20 22:08:16 +01:00
Gary Kim 852876a982 Provide links in commit summaries in commits table/view list (#7659)
* Provide links in commit summaries in commits table/view list

Signed-off-by: Gary Kim <gary@garykim.dev>

* Check that hashes are commits before making them links

Signed-off-by: Gary Kim <gary@garykim.dev>

* Revert "Check that hashes are commits before making them links"

This reverts commit a88564b8bc.

* Add Commit Message Links to Files List

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-08-20 20:40:06 +08:00
Mario Lubenka 08c63190c6 Evaluate emojis in commit messages in list view (#7906)
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-08-18 18:53:50 +03:00
zeripath bee1227b2f
Extract the username and password from the mirror url (#7651)
* Explode out mirror username and password

* Update models/repo_mirror.go

* Just roundtrip the password

* remove unused declaration

* Update templates/repo/settings/options.tmpl
2019-08-16 22:56:57 +01:00
Norwin 867f46f78e Detect delimiter in CSV rendering (#7869)
* detect csv delimiter in csv rendering

fixes #7868

* make linter happy

* fix failing testcase & use ints where possible

* expose markup type to template

previously all markup had the .markdown class, which is incorrect,
as it applies markdown CSS & JS logic to CSV rendering

* fix build (missing `make css`)

* ignore quoted csv content for delimiter scoring

also fix html generation
2019-08-16 01:09:50 +03:00
Gary Kim 2ed21e7e09 Prevent Commit Status and Message From Overflowing On Branch Page (#7800)
* Prevent Commit Status From Overflowing On Branch Page

It is possible for the commit ci status
on the branches page for a repository to
become an ellipsis due to overflowing.

This commit will fix that issue by
using flex.

Signed-off-by: Gary Kim <gary@garykim.dev>

* Fix multiple overflowing issues in commits table

It was possible that the commit message would
overflow hiding the expand commits button
and commit status. This change ensures that
the correct elements overflow without hiding
anything else.

This change also reverts using flex in the
commits list because it was causing issues
in Blink based browsers.

Signed-off-by: Gary Kim <gary@garykim.dev>

* Remove unnecessary html element and fix indentation issues
2019-08-09 20:57:29 +08:00
jaqra 7b2a39c78b Apply emoji on commit graph page (#7743) 2019-08-04 22:49:29 +08:00
6543 d974c139b4 sugestion to use range .Branches (#7674)
d57973a804
2019-07-30 23:02:58 +08:00
6543 23e8cff08c hide delete/restor button on archived repos (#7658)
close issue #7653
2019-07-29 13:00:43 +08:00
6543 31a1fe175f [Branch View] add download button (#7604)
* add download-button info message

* add overflow-visible css for table colum class

* right colum is always there

* add download button for default branch

* add download button for all other branchs

* resize table colum so two buttons fit in

* code indent avter rebase

* show commit divergence corect
https://github.com/go-gitea/gitea/issues/7625

* changes because of merge master into ...

* optimize if statement for protected branches

* dont downloat a deleted branch - fix error 404
2019-07-29 10:27:05 +08:00
6543 a19138c1d3 [Branch View] Protection Symbole (delete dublicate) (#7624)
* delet protectin symbol on "action column"

* code format
2019-07-27 22:11:14 +08:00
6543 0b1a4c38d9 [Branch View] Delete Table Header (#7622)
* add class trom table header to table body

* remove table header
2019-07-26 12:21:14 +01:00
6543 bebc6a3c77 [Branch View] icons to buttons (#7602)
* add restore-button info message

* branch deltete undo icon to button

* branch deltete icon to button
2019-07-26 01:01:25 +01:00
silverwind bcbc9f33d7 Fix file header overflow in file and blame views (#7562) 2019-07-23 10:12:09 +08:00
Gary Kim 3cba42c43d Make default branch name link to default branch (#7519)
The default branch's name on the branches page
for a repo was previously simply text and did
not link anywhere.

The name is now a link to the default branch
just like the non-default branch names.

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-07-18 12:39:51 -04:00
Gary Kim c8aa46d27b Add Extra Info to Branches Page (#7461)
* Add branch protection information to branches page

This change will add a tag on the ui that indicates
whether a branch is protected on the repository
branches page.

Signed-off-by: Gary Kim <gary@garykim.dev>

* Add last commit information to repo branches page

This change adds the ID and commit message of the last
commit on a branch to the branches page for repositories.

Signed-off-by: Gary Kim <gary@garykim.dev>

* Make branch page commit message truncate in css rather then template

The truncating of commit messages shown under branches
in the repository branches page has been moved to using
css rather then the Go template as the template was causing
some issues when the commit messaged had a link when rendered.

This commit also makes the commit message paragraph itself
use flex in order to make managing its elements easier.

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-07-17 16:02:41 -04:00
Richard Mahn 5d3e351864 Fixes #7474 - Handles all redirects for Web UI File CRUD (#7478)
* Fixes #7474 - Handles all redirects for Web UI File CRUD

* Fixes lint errors

* Typo fix

* Adds unit tests for a few helper functions

* Fixes per review

* Fix for new branch creation and to unit test

* Fixes the template used for errors on delete
2019-07-17 14:40:28 -04:00
silverwind 2a1ec31988 Diff: Fix indentation on unhighlighted code (#7435)
There was a missing space before the `nohighlight` class which made the
previous class concatenate wrongly as `wrapnohighlight` in the template.
2019-07-12 16:22:52 +01:00
Gary Kim 072bdfa3f5 Only show "New Pull Request" button if repo allows pulls (#7426)
Signed-off-by: Gary Kim <gary@garykim.dev>
2019-07-11 16:21:16 -04:00
Cherrg a7b1ba0e3d wiki history improvements (#7391)
* add history comments to detect page delete

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix too much history entries
- caused by --follow flag
  - if files with same contents exists

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* style imprevements wiki
- history - wrap long author names

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-07-11 22:45:10 +08:00
Cherrg 3c3f74988a ui fixes - compare view and archieved repo issues (#7345)
* add 'repo archived - comment/pull not possible' message

affects #7304

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* add navbar to compare view

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* remove wrong if else

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-07-08 20:18:09 +01:00
Cherrg e5b247ea8e wiki - page revisions list (#7369)
fix #7

* add wiki page revision list

* mobile improvements

* css improvements for long usernames

* split renderWikiPage into 3 functions

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-07-08 11:20:22 +03:00
mrsdizzie 1f1ecda541 Display original author and URL information when showing migrated issues/comments (#7352)
* Store original author info for migrated issues and comments

Keep original author name for displaying in Gitea interface and also
store original author user ID for potential future use in linking
accounts from old location.

* Add original_url for repo

Store the original URL for a migrated repo

Clean up migrations/tests

* fix migration

* fix golangci-lint

* make 'make revive' happy also

* Modify templates to use OriginalAuthor if set

Use the original author name in templates if it is set rather than the
user who migrated/currently owns the issues

* formatting fixes

* make generate-swagger

* Use default avatar for imported comments

* Remove no longer used IgnoreIssueAuthor option

* Add OriginalAuthorID to swagger also
2019-07-08 10:14:12 +08:00
Cherrg 362100023c ui - issue view - fix icon position (#7354)
* issue view - fix icon position

- move style from template to css
- add bullets to: key, circle-slash, comment

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* add border to symbols

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix circle slash position

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix top margin

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* changed mixed space/tab indent to tabindent only

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-07-06 18:03:00 -04:00
Cherrg 5b92bc1bec ui - cut timeline length with last element on issue view (#7355)
* cut timeline length with last element on issue view

fix #7304

- lightly enlight dark theme issue timeline color

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* remove new container

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-07-06 22:37:46 +01:00
Lunny Xiao 1772c6b94d fix pull view ui merge section (#7335)
* fix pull view ui merge section

* fix tests

* fix tests
2019-07-01 00:08:43 -04:00
Lunny Xiao ff85dd3e12 Add commit statuses reports on pull request view (#6845)
* Add commit statuses reports on pull view

* Add some translations

* improve the UI

* fix fmt

* fix tests

* add a new test git repo to fix tests

* fix bug when headRepo or headBranch missing

* fix tests

* fix tests

* fix consistency

* fix tests

* fix tests

* change the test repo

* fix tests

* fix tests

* fix migration

* keep db size consistency

* fix translation

* change commit hash status table unique index

* remove unused table

* use char instead varchar

* make hashCommitStatusContext private

* split merge section with status check on pull view ui

* fix tests; fix arc-green theme on pull ui
2019-06-30 08:57:59 +01:00
Cherrg 711f6dc9b0 Fix 7303 - remove unnessesary buttons on archived repos (#7326)
* archived repo - remove
- open/close button on issue list
- assigne person on issue list

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* archived repo - remove
- comment field on issue view
- lock/unlock issue conversation button from sidebar on issue view

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* archived repo - add 'compare commits' button to pull request

+ remove new pull request button from compare view

as the route is still working, and there is no need to be hidden

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-06-29 10:18:49 +01:00
Mario Lubenka 7c0f2b9843 Show Pull Request button or status of latest PR in branch list (#6990)
* Show Pull Request button or status of latest PR in branch list

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show pull request button on deleted branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show commit divergence on deleted branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use XORMs Get instead of limit

* Links pull request ID and use smaller labels for displaying the pull request status

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Handle error when getting latest pull request

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Indent template

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check error when loading issue

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-06-27 22:15:30 +08:00
silverwind da23041257 fix extra newlines when copying from diff in Firefox (#7288)
* fix extra newlines when copying from diff

See https://bugzilla.mozilla.org/show_bug.cgi?id=1273836

Basically, the <pre><code> seems to add a forced newline that is not
possible to get rid of via CSS, so I replaced it with just a <code>.

Secondly, .lines-type-marker also forced a newline in the copied text,
but that was possible to get rid of via user-select.

Safari still has a extraneous newline in the copied text of unknown
origin, but this should not block stop this PR.

* simplify .line-type-marker

* fix selector

* remove erronous ^^^

* Fix empty split diff

* Fix arc-theme-green

* fix add comment

* ensure line-num is copied too

* Update templates/repo/diff/box.tmpl

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

* attempt to fix safari via removing <code>

* remove useless whitespace at the end of 'class'

* remove inter-tag whitespace for code <td>s

* more inter-tag removal

* final inter-tag removal

* attempt to fix empty line copy

* move and comment getLineContent

* fix golint

* make background grey for missing added code
2019-06-26 22:35:07 +01:00
zeripath 5908bb1030
Make diff line-marker non-selectable (#7279)
* Make diff line-marker non-selectable
* Move to use data-* as per @mrsdizzie
* fix missing line nums
* Add a minimum-width to force right-align of the line num
* Move line-type-marker into separate column
2019-06-24 21:23:52 +01:00
silverwind 9ce4d89e99 UI: Fix overflow issues in repo (#7190)
- Fix layout overflow in repo file list.
- Fix invisible status icon in file view and commit list. In file view,
  the icon was moved to the left because I could not figure out a proper
  fix because of HTML tables.
- Added title attribute to commit messages.
- Fixed two CSS linter warnings in existing CSS.
- Fixed CI variable check in 'make css'.

Fixes: https://github.com/go-gitea/gitea/issues/7180
2019-06-14 09:32:13 +08:00
Mario Lubenka 311ce2d1d0 Compare branches, commits and tags with each other (#6991)
* Supports tags when comparing commits or branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Hide headline when only comparing and don't load unused data

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Merges compare logics to allow comparing branches, commits and tags with eachother

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Display branch or tag instead of commit when used for comparing

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Show pull request form after click on button

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Transfers relevant pull.go changes from master to compare.go

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Fixes error when comparing forks against a commit or tag

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes console.log from JavaScript file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Show icon next to commit reference when comparing branch or tag

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Updates css file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Fixes import order

* Renames template variable

* Update routers/repo/compare.go

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

* Update from master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Allow short-shas in compare

* Renames prInfo to compareInfo

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check PR permissions only if compare is pull request

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adjusts comment

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use compareInfo instead of prInfo
2019-06-07 16:29:29 -04:00
Sergey Dryabzhinsky 3fd18838aa Repository avatars (#6986)
* Repository avatars

- first variant of code from old work for gogs
- add migration 87
- add new option in app.ini
- add en-US locale string
- add new class in repository.less

* Add changed index.css, remove unused template name

* Update en-us doc about configuration options

* Add comments to new functions, add new option to docker app.ini

* Add comment for lint

* Remove variable, not needed

* Fix formatting

* Update swagger api template

* Check if avatar exists

* Fix avatar link/path checks

* Typo

* TEXT column can't have a default value

* Fixes:

- remove old avatar file on upload
- use ID in name of avatar file - users may upload same files
- add simple tests

* Fix fmt check

* Generate PNG instead of "static" GIF

* More informative comment

* Fix error message

* Update avatar upload checks:

- add file size check
- add new option
- update config docs
- add new string to en-us locale

* Fixes:

- use FileHEader field for check file size
- add new test - upload big image

* Fix formatting

* Update comments

* Update log message

* Removed wrong style - not needed

* Use Sync2 to migrate

* Update repos list view

- bigger avatar
- fix html blocks alignment

* A little adjust avatar size

* Use small icons for explore/repo list

* Use new cool avatar preparation func by @lafriks

* Missing changes for new function

* Remove unused import, move imports

* Missed new option definition in app.ini

Add file size check in user/profile avatar upload

* Use smaller field length for Avatar

* Use session to update repo DB data, update DeleteAvatar - use session too

* Fix err variable definition

* As suggested @lafriks - return as soon as possible, code readability
2019-05-29 22:22:26 -04:00
Lunny Xiao f3d87da3e2 Revert "Bugfix: Align comment label and actions to the right (#7024)" (#7055)
This reverts commit 0c432d26fe.
2019-05-26 12:55:53 -04:00
Mario Lubenka 0c432d26fe Bugfix: Align comment label and actions to the right (#7024)
* Bugfix: Align comment label and actions to the right

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Restores relative position

* CSS autofixer
2019-05-25 16:37:44 +03:00
Vladimir Panteleev a98e085031 Show git-notes (#6984)
* Show git-notes

* Make git-notes heading text localizable

* Refactor git-notes data fetching to a separate function

* Display the author and time of git notes

* Move note bubble inside the commit bubble

* Revert "Move note bubble inside the commit bubble"

This reverts commit c0951fe0e3.

* Add test for git-notes

* testing ui

* Polish CSS

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-05-24 10:52:05 +03:00
techknowlogick 5fb1ad7011 Webhook Logs show proper HTTP Method, and allow change HTTP method in form (#6953)
* Fix #6951 - logs show proper HTTP Method, and allow change HTTP method
in form

* enforce POST method for webhook

* set default if method is empty
2019-05-15 20:01:53 +08:00
Xaver Maierhofer a92ab34493 Fix input size for dependency select (#6913) 2019-05-12 14:10:12 +03:00
Wim 4508380cf7 Show full name if DefaultShowFullName setting activated (#6710)
Adds a new key DEFAULT_SHOW_FULL_NAME (default false) to the [ui] section.
If enabled the full name will be shown (unless it's empty, then
the default username will be used)
2019-05-08 11:41:35 +03:00
Lunny Xiao 13cd28602e Change the color of issues/pulls list, merged is purple and closed is red (#6874) 2019-05-08 10:50:15 +03:00
Lunny Xiao 08069dc465
Improve migrations to support migrating milestones/labels/issues/comments/pullrequests (#6290)
* add migrations

* fix package dependency

* fix lints

* implements migrations except pull requests

* add releases

* migrating releases

* fix bug

* fix lint

* fix migrate releases

* fix tests

* add rollback

* pull request migtations

* fix import

* fix go module vendor

* add tests for upload to gitea

* more migrate options

* fix swagger-check

* fix misspell

* add options on migration UI

* fix log error

* improve UI options on migrating

* add support for username password when migrating from github

* fix tests

* remove comments and fix migrate limitation

* improve error handles

* migrate API will also support migrate milestones/labels/issues/pulls/releases

* fix tests and remove unused codes

* add DownloaderFactory and docs about how to create a new Downloader

* fix misspell

* fix migration docs

* Add hints about migrate options on migration page

* fix tests
2019-05-07 09:12:51 +08:00
Lauris BH d9d538c8a1
Refactor table width to have more info shown in file list (#6867)
* Refactor table width to have more info shown in file list

* Remove unnecesary semicolon

* Fix tests for changed html structure
2019-05-06 21:43:40 +03:00
mrsdizzie 00b883880d Don't post process commit summary in templates (#6842)
* Don't post process commit summary in templates

Don't run summary through render/post process to avoid it generating
links and breaking certain views where the summary is already expected
to be a link to the commit. For consistancy, disable processing of
summary in all locations.

Fixes #6809

* Do process title on diff page

On second thought, the title is often the only place a pull request
number will exists so do process it on the individual diff page. This
fixes the list view and still gives easy access to the PR link
2019-05-05 15:39:10 -04:00
Simon a2a006a5d5 Add GET requests to webhook (#6771)
* Add GET requests to webhook

* make fmt

* Handle invalid http method on webhook

* Uppercase http method in webhook

* Rename v85.go to v86.go

* make fmt
2019-05-05 14:09:02 -04:00