Commit Graph

1235 Commits

Author SHA1 Message Date
6543 1984b6a11b
Milestone Issue/Pull List: Add octicons type (#12499)
* add octicons based on issue type (pull|issue)

* handle IsRead again

* short code

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-17 15:11:42 -04:00
Lanre Adelowo 4027c5dd7c
Kanban board (#8346)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
Co-authored-by: Kerry <flatline-studios@users.noreply.github.com>
Co-authored-by: Jaqra <jaqra@hotmail.com>
Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com>
Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com>
Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-16 23:07:38 -04:00
zeripath 96add8c319
Do not show arrows on comment diffs on pull comment pages (#12434)
* Do not show arrows on comment diffs on pull comment pages

Prior to this PR it was possible that an expansion arrow could be displayed
on comment diffs displayed on the comments pages of pulls

These arrows would not successfully work because they were not attached to
a commit id - nor can they necessarily be.

This PR prevents these from being shown.

Fix #10851

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

* as per @silverwind

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

* one more indentation fix

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

* one more indentation fix

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-08-08 09:22:34 +08:00
zeripath 2c1ae6c82d
Render the git graph on the server (#12333)
Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation.

* This implementation provides a 16 limited color selection
* The uniqued color numbers are also provided
* And there is also a monochrome version
*In addition is a hover highlight that allows users to highlight commits on the same flow.

Closes #12209

Signed-off-by: Andrew Thornton art27@cantab.net
Co-authored-by: silverwind <me@silverwind.io>
2020-08-06 09:04:08 +01:00
techknowlogick 6ab4d76ced
Match GH with Commit page (#12425)
Co-authored-by: zeripath <art27@cantab.net>
2020-08-05 09:32:13 +08:00
zeripath 33391e04fe
Prevent empty div when editing comment (#12404)
* Prevent empty div when editing comment

The template for attachments needs to remove whitespace and return empty when there are no attachments.

Fix #10220
2020-08-04 22:30:02 +01:00
silverwind e61c09ed73
Add loading spinners and mermaid error handling (#12358)
- Add loading spinners on editor and mermaid renderers
- Add error handling and inline error box for mermaid
- Fix Mermaid rendering by using the .init api
2020-08-04 20:56:37 +01:00
zeripath 15300699c4
Fix milestone links (#12405)
The milestone pages links should direct to the milestone pages

Fix #10215

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-08-02 09:18:09 +01:00
Gary Wang f2a6cd6401
Fix clone panel in wiki position not always align right (#12326)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-29 12:30:37 -04:00
silverwind 859094ef0a
Disable search box autofocus on issue/pr pages (#12229)
Various pages like the issue list autofocus their search box which I find rather intrusive because more often than not I don't want to type into the search box, it's distracting if the focus jumps after page load. Disable this behaviour.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-26 22:43:14 -04:00
silverwind 0e24af6951
Update Octicons to v10 (#12240)
* Update Octicons to v10

Besides a few renames, these icons are no longer present in v10 that we've
used, so had to change:

file-symlink-directory -> file-submodule
internal-repo -> repo
repo-force-push -> repo-push
repo-template-private -> repo-template

Fixes: https://github.com/go-gitea/gitea/issues/11889
Ref: https://github.com/primer/octicons/releases/tag/v10.0.0

* add custom sliders svg for removed octicon-settings

* apply suggestion

* fix triangles and use play on admin dashboard

* add custom mirror svg

* add missing build files

* unify custom svgs

* move to octicon-repo-clone to gitea-mirror

* use octicon-x on conflicts

* tweak timeline icons

* tweak comment buttons

* update settings icon to octicons v1

* switch to octicon-mirror and octicon-tools

* replace two wiki buttons with octicons

* remove whitespace in svg sources

* Fix filepath basename on Windows for SVG bindata (#12241)

* move octicons to devDependencies

* move back to dependencies

* move svgo to devDependencies again

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-17 18:15:12 +03:00
赵智超 0122cf9cdc
[ui] Link to pr list page on sidebar when view pr (#12256)
Fix #12254

Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-16 11:07:13 -04:00
silverwind 84a419de98
Replace code fold icons with octicons (#12222)
- replace font-awesome icons with octicons
- clean up js and css surrounding the code expansion and file folding
- fix hover color on arc-green
- tweak diff line number colors

Co-authored-by: zeripath <art27@cantab.net>
2020-07-13 16:21:19 +03:00
mrsdizzie a6168fa25d
Make copy/paste work for source code (#12191)
* Make copy/paste work for source code

Fix regression casued by #12047 so copy/paste works properly in all browsers.

Fixes #12184

Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore.

* use pseudo-element to prevent copying of comment + symbol even when not visually selected

* remove added newline here should not be necessary anymore

* make sure empty line is newline so there is something to select and copy
2020-07-08 22:02:38 +01:00
Andreas Shimokawa 510e4bd245
templates/repo/empty.tmpl : fix repo setup instructions (#12122)
Co-authored-by: codeberg <codeberg@codeberg.org>
2020-07-03 17:22:14 -04:00
zeripath 482ba937ed
Provide option to unlink a fork (#11858)
* Provide option to unlink a fork

Fix #4566

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

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>

* Add check that user can create repo

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

* as per @cirnoT

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

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-07-02 15:09:09 +01:00
mrsdizzie af7ffaa279
Server-side syntax highlighting for all code (#12047)
* Server-side syntax hilighting for all code

This PR does a few things:

* Remove all traces of highlight.js
* Use chroma library to provide fast syntax hilighting directly on the server
* Provide syntax hilighting for diffs
* Re-style both unified and split diffs views
* Add custom syntax hilighting styling for both regular and arc-green

Fixes #7729
Fixes #10157
Fixes #11825
Fixes #7728
Fixes #3872
Fixes #3682

And perhaps gets closer to #9553

* fix line marker

* fix repo search

* Fix single line select

* properly load settings

* npm uninstall highlight.js

* review suggestion

* code review

* forgot to call function

* fix test

* Apply suggestions from code review

suggestions from @silverwind thanks

Co-authored-by: silverwind <me@silverwind.io>

* code review

* copy/paste error

* Use const for highlight size limit

* Update web_src/less/_repository.less

Co-authored-by: Lauris BH <lauris@nix.lv>

* update size limit to 1MB and other styling tweaks

* fix highlighting for certain diff sections

* fix test

* add worker back as suggested

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-01 00:34:03 +03:00
Cirno the Strongest b918609acc
Use custom SVGs for commit signing lock icon (#12017)
* Use custom SVGs for commit signing lock icon

* missing spans

* editorconfig

* xmlns and remove aria-hidden

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-28 00:05:50 -04:00
mrsdizzie 4b66d9ad98
Show description on individual milestone view (#12055)
Fixes #12043

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-25 21:21:13 -04:00
Cirno the Strongest 0ea479561d
Add org avatar on top of internal repo icon (#11895)
* Add org avatar on top of internal repo icon

* add color for arc-green

* use wrapper div to avoid negative margins

* rename class and move div

* move div to icon tmpl

* remove unnecessary margin for lock octicon

* fix label align together with #11891

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-26 03:07:15 +03:00
Cirno the Strongest 6764daf7e5
Use Fomantic's fluid padded for blame full width (#12023)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-25 14:58:12 -04:00
Cirno the Strongest d9aa007a9e
Use label to describe repository type (#11891)
* Use label instead of icon to describe repository type when repo avatar is set

* header_icon is not longer duplicated; move out of separate template

* handle archived case too

* use everywhere

* public template -> template

* bring back separate icon in better form

* definitely was overthinking this

* 32

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-22 16:20:51 -04:00
Cirno the Strongest daf62841f6
Fix sticky diff stats container (#12002)
* Fix sticky diff stats container

* Use pure CSS sticky instead of Fomantic's JS

* add border color to arc-green

* add slight padding on sides

* make linter happy

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-22 15:02:27 -04:00
Cirno the Strongest 180286da0c
Fix missing styling for dropdown icon on review button (#11998)
* Fix missing styling for dropdown icon on review button

* Remove unnecessary span element

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-22 03:02:22 +03:00
Cirno the Strongest c1a2887c02
Use octicons for all repo header buttons (#11890)
* Use octicons for all repo header buttons

* ensure margin isn't set on any other svg outside repo buttons

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-22 02:18:42 +03:00
zeripath a07cc0df76
Handle multiple merges in gitgraph.js (#11996)
* Handle multiple merges in gitgraph.js

There is a bug in web_src/js/vendor/gitgraph.js whereby it fails to
handle multiple merges in a single commit correctly. This PR adds
changes to make this work.

Fix #11981

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

* Update web_src/js/vendor/gitgraph.js
2020-06-20 22:29:44 +03:00
Cirno the Strongest 6c81b738f7
Update Fomantic-UI to 2.8.6 and remove old workarounds (#11933)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-17 21:20:07 -04:00
techknowlogick 6bf78d2b57
Global default branch setting (#11918)
* Global default branch setting

* add to app.ini example per @silverwind

* update per @lunny

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2020-06-17 16:53:55 -04:00
Cirno the Strongest 61cd0ce866
Fix double divider on issue sidebar (#11919) 2020-06-17 10:12:06 -04:00
6543 f399cd326b
UI: Fix wrong closing tag (#11910)
* rm wrong closing tag

* Update templates/repo/sub_menu.tmpl

Co-authored-by: John Olheiser <john.olheiser@gmail.com>

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2020-06-16 11:27:20 -04:00
Cirno the Strongest 80a3745fc8
Make repository size unclickable on repo summary bar (#11887)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 21:45:17 -04:00
Cirno the Strongest c8780984f8
Rework blame template and styling (#11885)
* Rework blame template and styling

* cleanup template and add missing NumLines

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 14:39:39 -04:00
Cirno the Strongest 5f47835f4c
Better align items using flex within review request box (#11879)
* Better align items using flex within review request box

* use justify-content

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-15 03:37:00 -04:00
赵智超 48842ed108
ui: Show update branch item in merge box when it's necessary (#11761)
* ui: Show update branch item in merge box when it's necessary

As title, should show it without care about whether
this pr can be merged.

fix #10959

Signed-off-by: a1012112796 <1012112796@qq.com>

* fix ui

* Fix ui, thanks to @silverwind.

Co-authored-by: silverwind <me@silverwind.io>

* fix lint

* Update templates/repo/issue/view_content/pull.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Apply review suggestion

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-13 14:49:59 -04:00
Cirno the Strongest b6adf80a80
Fix repo internal icon when avatar is present (#11873)
* Fix repo internal icon when avatar is present

* fix tabs

* move repo icons in header to separate template
2020-06-13 00:24:41 +03:00
Cirno the Strongest 8770bceafa
Fix search form button overlap (#11840)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 23:35:03 -04:00
silverwind ca8ecf7ffc
Improve label edit buttons labels (#11841)
* Improve label edit buttons labels

Previously when editing the buttons in the "Edit Label" modal were a
strange "Update" and "No". Improved them to "Save" and "Cancel".

Also fixed indentation in the template file, recommended to view changes
with the "Hide whitespace changes" option enabled on GitHub.

* remove unnecessary button icon

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 17:06:20 -04:00
Cirno the Strongest b682a2c1b2
Show exact tag for commit on diff view (#11846)
* Show exact tag for commit on diff view

* Fix comment

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 15:42:55 -04:00
silverwind 628ee1d82e
Replace jquery-datetimepicker with native date input (#11684)
This removes the jQuery plugin as well as the associated config options.
Native input[type=date] does not require a language attribute as it is
localized by default, except for the placeholder attribute for which I
currently piggy-back the repo.issues.due_date_form localization option.

Implementation should pretty much match GH. Of note is that Safari does
not provide a UI for this input type, but I don't think providing one is
neccessary and GH did not bother either.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 14:35:27 -04:00
silverwind 19db3f4f0a
rework eslint config (#11615)
* rework eslint config

- use explicit config that only enables rules
- upgrade eslint to 7.1.0
- add new plugins with selected rules enabled
- fix discovered issues, remove global wipPrefixes

* remove if

* undo template change

* add disabled rules as well for easier config updating

* add missing disabled rule

* update eslint and plugins

* fix new violation

* remove deprecated rules

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-09 17:31:15 -04:00
John Olheiser aaff47ad75
Fix reply octicon (#11821)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-06-09 10:13:00 -05:00
Cirno the Strongest 880ae454db
Work around fomantic 2.8.5 bugs (#11767)
Work around fomantic 2.8.5 bugs 

Closes #11759

Related fomantic/Fomantic-UI#1372 and fomantic/Fomantic-UI#1473
2020-06-07 19:25:52 +01:00
Cirno the Strongest bbe13b60cd
Fix timezone on issue deadline (#11697)
* Fix timezone on issue deadline

* FormatDate

Co-authored-by: zeripath <art27@cantab.net>
2020-06-05 18:51:10 -04:00
John Olheiser ac07418011
Add compare link to releases (#11752)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-05 14:44:54 -04:00
Cirno the Strongest 5acba4609a
Add internal-repo octicon for public repos of private org (#11529)
* Show multiple octicons on repo list

* fix mixed spaces/tabs

* Internal repo octicon

* show internal icon in dashboard repolist

* swagger

* fix icon for normal repo on repo page

* don't expose owner visibility directly; provide internal in repo api

* fix icons for forks and mirrors

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-05 14:41:06 +03:00
赵智超 17f8de7a54
Fix to allow comment poster to edit or delete his own comments (#11671)
* bug: fix comment update permision check

No the ui only allow poster to update or delet comment, which
is not reasonable and different with handle logic, this pr
change it to allow poster of comment do it

ref code:
e8955173a9/routers/repo/issue.go (L1636)

e8955173a9/routers/repo/issue.go (L1681)

fix #11663

Signed-off-by: a1012112796 <1012112796@qq.com>

* simplify code

* fix sign in

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-05 13:10:10 +03:00
Cirno the Strongest 3ea5d864b9
Fix message wrapping on PR commit list (#11616)
* Fix message wrapping on PR commit list

* Update templates/repo/commits_list_small.tmpl

Co-authored-by: silverwind <me@silverwind.io>
2020-06-03 09:30:34 +01:00
赵智超 de0b2d4e32
bug: fix wrong poster message for code comment on Pull view (#11721)
As title, maybe fix one of issue in #11705

Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-03 02:09:03 -04:00
Cirno the Strongest 8e035f81c0
Fix styling for commiter on diff view (#11715)
* Fix styling for commiter on diff view

* Update options/locale/locale_en-US.ini

* Update templates/repo/commit_page.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Update templates/repo/commit_page.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-02 22:40:08 -04:00
John Olheiser a6fd2f23f7
Allow site admin to disable mirrors (#11740)
* Allow site admin to disable mirrors

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

* No need to run through Safe

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

* Clarify only disabling NEW mirrors

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

* Apply suggestions from @guillep2k

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-06-02 21:21:38 -04:00