1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-01 17:05:48 +00:00
Commit Graph

190 Commits

Author SHA1 Message Date
zeripath
680dfab2ee
Fix Create new branch (#11294)
Fix #11212

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-04 16:55:52 -04:00
zeripath
ce66ca7f9f
Restore checkbox rendering and prevent poor sanitization of spans (#11277)
* Add test

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

* Restore checkbox rendering and prevent poor sanitization of spans

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

* Also fix preview context

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

* Also fix preview context

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-03 17:17:24 -03:00
mrsdizzie
4ed7d2a2bb
Remove last traces of has-emoji class (#11263)
Now that emojify.js has been removed, get rid of all instances of has-emoji class that was only used for that. Support for rendering shortcodes should remain in all of these places so it should still work the same.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-01 20:58:45 +03:00
silverwind
310699bca7
Patch fomantic-ui to workaround build issue (#11244)
* Patch fomantic-ui to workaround build issue

Better workaround than https://github.com/go-gitea/gitea/issues/10653
for https://github.com/fomantic/Fomantic-UI/issues/1356. It does not
seem like we're getting a new Fomantic-UI release anytime soon, so
this patches it after node_modules installation.

Fixes: https://github.com/go-gitea/gitea/issues/11243
Fixes: https://github.com/go-gitea/gitea/issues/10679

* copy instead of patch

* update package-lock.json

* Update Makefile

Co-Authored-By: Sorien <Sorien@users.noreply.github.com>

* Update web_src/fomantic/css.js

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

Co-authored-by: Sorien <Sorien@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-30 07:26:37 +01:00
zeripath
cbf5dffaf2
Fix submit review form (#11252)
* Fix submit review form

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

* placate lint

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

* try something different

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

* Update web_src/less/_base.less

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-30 09:59:47 +08:00
mrsdizzie
4563eb873d
Support unicode emojis and remove emojify.js (#11032)
* Support unicode emojis and remove emojify.js

This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (😄)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: https://github.com/go-gitea/gitea/issues/9182
Fixes: https://github.com/go-gitea/gitea/issues/8974
Fixes: https://github.com/go-gitea/gitea/issues/8953
Fixes: https://github.com/go-gitea/gitea/issues/6628
Fixes: https://github.com/go-gitea/gitea/issues/5130

* add new shared function emojiHTML

* don't increase emoji size in issue title

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

Co-Authored-By: 6543 <6543@obermui.de>

* Support for emoji rendering in various templates

* Render code and review comments as they should be

* Better way to handle mail subjects

* insert unicode from tribute selection

* Add template helper for plain text when needed

* Use existing replace function I forgot about

* Don't include emoji greater than Unicode Version 12

Only include emoji and aliases in JSON

* Update build/generate-emoji.go

* Tweak regex slightly to really match everything including random invisible characters. Run tests for every emoji we have

* final updates

* code review

* code review

* hard code gitea custom emoji to match previous behavior

* Update .eslintrc

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

* disable preempt

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-28 15:05:39 -03:00
zeripath
b10c416f9e
Use AJAX for notifications table (#10961)
* Use AJAX for notifications table

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

* move to separate js

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

* placate golangci-lint

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

* Add autoupdating notification count

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

* Fix wipeall

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

* placate tests

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

* Try hidden

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

* Try hide and hidden

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

* More auto-update improvements

Only run checker on pages that have a count
Change starting checker to 10s with a back-off to 60s if there is no change

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

* string comparison!

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

* as per @silverwind

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

* add configurability as per @6543

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

* Add documentation as per @6543

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

* Use CSRF header not query

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

* Further JS improvements

Fix @etzelia update notification table request
Fix @silverwind comments

Co-Authored-By: silverwind <me@silverwind.io>
Signed-off-by: Andrew Thornton <art27@cantab.net>

* Simplify the notification count fns

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

Co-authored-by: silverwind <me@silverwind.io>
2020-04-24 00:57:38 -03:00
zeripath
067eff8eba
Ensure that relative paths in edit preview work (#11143)
Fix #10131

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-20 13:32:44 +03:00
silverwind
842bba94ac
Fix max-width of selection dropdowns (#11144)
Fix a regression added by
https://github.com/go-gitea/gitea/pull/10897/files.
2020-04-20 01:24:46 +03:00
Jordan
5c092eb0ef
Add support for migrating from Gitlab (#9084)
* First stab at a Gitlab migrations interface.

* Modify JS to show migration for Gitlab

* Properly strip out #gitlab tag from repo name

* Working Gitlab migrations!
Still need to figure out how to hide tokens/etc from showing up in opts.CloneAddr

* Try #2 at trying to hide credentials.
CloneAddr was being used as OriginalURL.
Now passing OriginalURL through from the form and saving it.

* Add go-gitlab dependency

* Vendor go-gitlab

* Use gitlab.BasicAuthClient
Correct CloneURL.
This should be functioning!
Previous commits fixed "Migrated from"
from including the migration credentials.

* Replaced repoPath with repoID globally.
RepoID is grabbed in NewGitlabDownloader

* Logging touchup

* Properly set private repo status.
Properly set milestone deadline time.
Consistently use Gitlab username for 'Name'.

* Add go-gitlab vendor cache

* Fix PR migrations:
- Count of issues is kept to set a non-conflicting PR.ID
- Bool is used to tell whether to fetch Issue or PR comments

* Ensure merged PRs are closed and set with the proper time

* Remove copyright and some commented code

* Rip out '#gitlab' based self-hosted Gitlab support

* Hide given credentials for migrated repos.

CloneAddr was being saved as OriginalURL.

Now passing OriginalURL through from the form and
saving it in it's place

* Use asset.URL directly, no point in parsing.
Opened PRs should fall through to false.

* Fix importing Milestones.
Allow importing using Personal Tokens or anonymous access.

* Fix Gitlab Milestone migration if DueDate isn't set

* Empty Milestone due dates properly return nil, not zero time

* Add GITLAB_READ_TOKEN to drone unit-test step

* Add working gitlab_test.go.
A Personal Access Token, given in env variable GITLAB_READ_TOKEN
is required to run the test.

* Fix linting issues

* Add modified JS files

* Remove pre-build JS files

* Only merged PRs are marged as merged/closed

* Test topics

* Skip test if gitlab is inaccessible

* Grab personal token from username, not password.
Matches Github migration implementation

* Add SetContext() to GitlabDownloader.

* Checking Updated field in Issues.

* Actually fetch Issue Updated time from Gitlab

* Add Gitlab migration GetReviews() stub

* Fix Patch and Clone URLs

* check Updated too

* fix mod

* make vendor with go1.14

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-04-19 23:44:11 +08:00
Sorien
0ef11ff2c9
consolidate author name across timeline (#11053)
* consolidate author name across timeline

* Sync with master

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-19 03:15:07 +03:00
silverwind
b57a735e77
Upgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055)
- Removed jQuery-Migrate as it seems to no longer be needed.
- Removed a dead code section.
- Fixed some deprecations detected by jQuery-Migrate.

Ref: https://jquery.com/upgrade-guide/3.5/
Ref: https://github.com/gogs/gogs/search?q=repo-name-change-prompt
Ref: https://github.com/go-gitea/gitea/search?q=repo-name-change-prompt
Fixes: https://github.com/go-gitea/gitea/issues/9372

Co-authored-by: zeripath <art27@cantab.net>
2020-04-18 18:46:29 -04:00
赵智超
1b86f174ce
Add a way to mark Conversation (code comment) resolved (#11037)
* Add a way to mark Conversation (code comment) resolved

mark Conversation is a way to mark a Conversation is stale
or be solved. when it's marked as stale, will be hided like
stale. all Pull Request writer , Offical Reviewers and poster
can add or remove Conversation resolved mark.

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

* fix lint

* Apply suggestions from code review

* Add ResolveDoer
* fix ui

Co-Authored-By: Lauris BH <lauris@nix.lv>
Co-Authored-By: 6543 <6543@obermui.de>

* change IsResolved to an function
Add permission check in UpdateResolveConversation

* Apply suggestions from code review

* change return error for permisson check
* add default message for deleted user
* get issue message from comment
* add migration for ``ResolveDoerID`` column

another  change:
* block mark pending review as resolved because it's not necessary

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

* change button color

* resolve button size

* fix code style

* remove unusefull code

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

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-18 10:50:25 -03:00
zeripath
731bdef4be
Refresh codemirror on show pull comment tab (#11100)
Fix #10975

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

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-18 01:19:19 -03:00
赵智超
6e4baee91d
ui: fix status label on branches list vertical alignment (#11109)
change status icon for merged PR to git-merge

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-04-17 12:35:12 -04:00
CirnoT
8cdb6662c8
Align review-item svg octicons (#11065) 2020-04-15 15:41:55 -03:00
silverwind
063b1d260f
Fix language label vertical alignment (#11061)
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-13 17:00:32 -03:00
silverwind
27e3cddfbe
Move syntax highlighting to web worker (#11017)
This should eliminate page freezes when loading big files/diff.
`highlightBlock` is needed to preserve existing nodes when highlighting
and for that, highlight.js needs access to the DOM API so I added a DOM
implementation to make it work, which adds around 300kB to the output
file size of the lazy-loaded `highlight.js`.

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-13 16:02:31 +03:00
赵智超
cc07b9ca37
Fix CreateComment for SQLite and JS click event on Request Review (#11040)
* fix some bug about Request review

* fix ``CreateComment`` wrong using ,it will not work when use Sqlite
* fix wrong js click event code , it will send wrong data when it has
many choices

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

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>

* add getReviewerByIssueIDAndUserID
fix wrong conditions check in initIssueComments after #10972

* call CI again

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-11 01:44:50 -03:00
Sorien
c97e988380
Prettify Timeline (#10972)
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
2020-04-11 01:01:41 +03:00
silverwind
8bef490f2f
Match arc-green code tag color to code blocks (#11023)
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-09 15:03:14 -04:00
L0veSunshine
08208cdfb8
Fix forked repo has no icon and language stat. (#10791)
* Update header.tmpl

* Update _repository.less

* Update pull.go

* Update indexer.go

* Update pull.go

* Update pull.go

* Update indexer.go

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

* fix forked repo doesn't have language stat

Thanks the advice from lunny and 6543.

* fix forked repo doesn't have language stat

Modified as suggested by 6543.

* fix forked repo doesn't have language stat

simplify the function.

* fix forked repo doesn't have language stat

update the indexer after the loop

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-08 15:13:04 +03:00
silverwind
d6741de934
tweak code tags in markdown (#11000)
- remove whitespace before and after
- increase horizontal padding
- make blocks more apparant on arc-green
2020-04-07 12:03:49 +01:00
Michael Kuhn
ecb176851b
Fix Ctrl-Enter shortcut for issues (#10986)
The js-quick-submit class needs to be applied to SimpleMDE's input
field, which is currently only done for wiki pages.

Fixes #10937

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-07 00:51:21 -03:00
赵智超
ef89e75d0e
add request review from specific reviewers feature in pull request (#10756)
* add request review feature in pull request

add a way to notify specific reviewers to review like github , by add  or delet a  special type
review . The acton is  is similar to Assign ,  so many code reuse the function and items of
Assignee, but the meaning and result is different.

The Permission style is is similar to github, that only writer can add a review request from Reviewers,
but the poster can recall and remove a review request after a reviwer has revied even if he don't have
Write Premission. only manager , the poster and reviewer of a request review can remove it.

The reviewers can be requested to review contain all readers for private repo , for public, contain
all writers and watchers.

The offical Review Request will block merge if Reject can block it.

an other change: add ui otify for Assignees.

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>

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

* new change

* add placeholder string

* do some changes follow #10238 to add review requests num on lists also
change icon for review requests to eye

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-06 19:33:34 +03:00
Gary Kim
561e7a9a59
Migrate ActivityHeatmap to Vue SFC (#10953)
* Migrate ActivityHeatmap to Vue SFC

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

* Readd vue compiler alias

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

* Remove unneeded use of v-html

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

Co-authored-by: zeripath <art27@cantab.net>
2020-04-06 09:31:11 +08:00
silverwind
6cf71ee0e8
Fix scrollbar issues in dropdowns (#10897)
* Fix scrollbar issues in dropdowns

Fixes: https://github.com/go-gitea/gitea/pull/10835

* remove wrapping

* grammar

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-04 18:29:15 -03:00
mrsdizzie
a0cc4b3d08
Adjust label padding (#10957)
* Adjust label padding

* fix less complaint

* Make top/bottom padding a bit smaller to create better label look
2020-04-04 14:39:57 -05:00
j.yao.SUSE
3723b0647f
[UI] language status icon size (#10749)
* language status icon size

change the repository language status icon size

* Update _base.less

* fix: eslint rule  length-zero-no-unit

* [ui] .color-icon change size ti 14px

* Update web_src/less/_base.less

* Update web_src/less/_base.less

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-02 14:18:35 +03:00
mrsdizzie
8d99ee2773
Add Organization Wide Labels (#10814)
* Add organization wide labels

Implement organization wide labels similar to organization wide
webhooks. This lets you create individual labels for organizations that can be used
for all repos under that organization (so being able to reuse the same
label across multiple repos).

This makes it possible for small organizations with many repos to use
labels effectively.

Fixes #7406

* Add migration

* remove comments

* fix tests

* Update options/locale/locale_en-US.ini

Removed unused translation string

* show org labels in issue search label filter

* Use more clear var name

* rename migration after merge from master

* comment typo

* update migration again after rebase with master

* check for orgID <=0 per guillep2k review

* fmt

* Apply suggestions from code review

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

* remove unused code

* Make sure RepoID is 0 when searching orgID per code review

* more changes/code review requests

* More descriptive translation var per code review

* func description/delete comment when issue label deleted instead of hiding it

* remove comment

* only use issues in that repo when calculating number of open issues for org label on repo label page

* Add integration test for IssuesSearch API with labels

* remove unused function

* Update models/issue_label.go

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

* Use subquery in GetLabelIDsInReposByNames

* Fix tests to use correct orgID

* fix more tests

* IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well

* update comment for clarity

* Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition

* Don't sort repos by date in IssuesSearch API

After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures:

SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45

Returns different results for MySQL than other engines. However, the similar query:

SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30

Returns the same results.

This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function.

* linter is back!

* code review

* remove now unused option

* Fix newline at end of files

* more unused code

* update to master

* check for matching ids before query

* Update models/issue_label.go

Co-Authored-By: 6543 <6543@obermui.de>

* Update models/issue_label.go

* update comments

* Update routers/org/setting.go

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 01:14:46 -03:00
silverwind
b1c331c845
Fix repo summary height (#10825)
Extracted the style that keeps the animation of the language bar in
check.

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-03-25 22:58:25 +00:00
Alexander Scheel
61830ace0b
Fix tab indentation in code view (#10671)
Resolves: #5596

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-03-25 13:33:03 +00:00
Lauris BH
e5a008f7b2
Add nowrap to language bar items (#10755) 2020-03-20 10:10:02 +08:00
silverwind
85fb33a65f
move jquery-datetimepicker to npm/webpack (#10713)
- update to latest version and move to npm
- adapt for api changes and css class rename
- add specificity to arc-green rules as dependency css now loads later
- use imports-loader to make it load correctly
- fix some wrong paths in librejs

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-17 15:08:15 -04:00
Lauris BH
ca181100ca
FIx hiding of fields in authorization source page (#10734) 2020-03-17 10:12:44 +02:00
John Olheiser
c7f3d1627f
Prevent default for linkAction (#10742)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-03-16 16:13:41 -05:00
Alex
460e42391e
Update border-color of language bar icon (#10723)
* Update color of border of color-icon

* Update web_src/less/_base.less

Co-Authored-By: 6543 <6543@obermui.de>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
2020-03-14 01:19:09 +02:00
silverwind
e03d627769
Misc JS linting and naming tweaks (#10652)
- lowercase all js filenames except Vue components
- enable new lint rules, mostly focused on shorter code
- autofix new lint violations
- apply misc transformations indexOf -> includes and onevent-> addEventListener

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-03-11 21:34:54 +02:00
Alexander Scheel
b8551f8532
Fix task-list checkbox styling (#10668)
* Fix task-list checkbox styling

The pandoc renderer will append the class "task-list" to the ul element
wrapping a li with one or more check-boxes. This allows us to select for
them, removing their list-style-type property. However, goldmark and the
gfm spec doesn't specify the "task-list" class name, so we can't use
that to fix the issue there.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Update to goldmark v1.1.25

This version adds the missing space after a checkbox.

Resolves: #9656

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

Co-authored-by: zeripath <art27@cantab.net>
2020-03-08 21:17:03 +02:00
silverwind
9d3e69e867
Move dropzone.js to npm/webpack (#10645)
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0
- make `csrf` available on window.config
2020-03-07 21:06:15 +00:00
6543
57c7a7aa72
Ensure Update button is enabled even when CI has failed (#10640)
* ignore pull status

* fix css

* fix css
2020-03-07 03:24:42 +02:00
John Olheiser
0e2217bd2d
Logout POST action (#10582)
* Change logout to POST

* Update for redirect

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-03-02 22:50:31 -06:00
techknowlogick
bea497ff96
nextcloud oauth (#10562)
Fix #7078
2020-03-02 22:11:45 -05:00
guillep2k
5e1438ba92
Admin page for managing user e-mail activation (#10557)
* Implement mail activation admin panel

* Add export comments

* Fix another export comment

* again...

* And again!

* Apply suggestions by @lunny

* Add UI for user activated emails

* Make new activation UI work

* Fix lint

* Prevent admin from self-deactivate; add modal

Co-authored-by: zeripath <art27@cantab.net>
2020-03-02 15:25:36 -03:00
silverwind
e0ecddc11b
Prevent accidential selection of language stats bar (#10537) 2020-02-29 00:59:29 +08:00
zeripath
efec0d393b
Fix the signing icon in the view_list.tmpl page (#10511)
* Fix the view_list.tmpl page

* fix-centerlock

* Update web_src/less/_base.less

as per @silverwind

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

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-02-27 23:03:17 -03:00
zeripath
90919bb37e
Show Signer in commit lists and add basic trust (#10425)
* Show Signer in commit lists and add basic trust

Show the avatar of the signer in the commit list pages as we do not
enforce that the signer is an author or committer. This makes it
clearer who has signed the commit.

Also display commits signed by non-members differently from
members and in particular make it clear when a non-member signer
is different from the committer to help reduce the risk of
spoofing.

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

* ensure orange text and background is available

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

* Update gpg_key.go

* Update models/gpg_key.go

* Apply suggestions from code review

* Require team collaborators to have access to UnitTypeCode

* as per @6543

* fix position of sha as per @silverwind

* as per @guillep2k
2020-02-27 16:20:55 -03:00
silverwind
ef798d4b84
Tweak language stats bar (#10487)
- Ensure bar does not overflow parent
- Remove unneccessary borders/background
- Fix shaky animation caused by JS animation miscalculation by setting
  fixed height on the summary box. Box itself is still shaky during
  animation, but better it then the whole page.

Fixes: https://github.com/go-gitea/gitea/issues/10474
2020-02-26 22:44:14 +02:00
John Olheiser
bcd16cec63
Fix admin notices (#10480)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-02-26 10:25:54 -06:00
John Olheiser
e5944a9521
Change admin dashboard to POST (#10465)
* Add form and convert to POST

* Redirect for flash

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-02-25 16:54:13 -06:00
John Olheiser
c161bb013e
Change action GETs to POST (#10462)
* Change action GETs to POST

* submite = submit + smite

* No more # href

* Fix test

* Match other tests

* Explicit csrf

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

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-02-25 14:28:47 -06:00
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
4e912d2ed8
Disallow leading zeroes in Less (#10407) 2020-02-23 13:48:27 -03:00
silverwind
0bba3f9cf6
Various dark theme fixes (#10416)
- beatify simplemde, remove header hover effect (does not play well with
  border colors), remove double border separators
- fix colored outline buttons
- fix disabled style
- fix positive messages
- fix markdown header border and quote block
- adjust footer color
- adjust file icons and release list timeline
2020-02-22 22:32:15 -06:00
John Olheiser
f4370639be
Fix profile page CSS (#10406)
* Fix profile page

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

* Remove redundant CSS

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

* Fix .username and change em to rem

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-02-22 16:06:07 +02: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
silverwind
4efc365c02
fix input[type=file] on dark theme (#10382) 2020-02-20 16:36:47 -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
zeripath
9f1f2e6675
Set max-width on review-box comment box (#10348) 2020-02-18 23:07:00 +00:00
John Olheiser
29efa9c3fb
Fix status check enable (#10341)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-02-18 12:58:16 -06: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
Antoine GIRARD
cdda5c4b90
ui: better mobile review-box sizing (#10297) 2020-02-16 22:44:52 +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
silverwind
ea7ad382e7
fix margin on attached segments with headers (#10235)
Fixes: https://github.com/go-gitea/gitea/issues/10210

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-11 22:38:32 -05: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
6c823c7560
fix filter label emoji width (#10241) 2020-02-11 22:25:41 +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
jaqra
7d8a2d05cf
Allow emoji on popup label (#10166)
* allow emoji on popup label

* Make emojify work

* Remove unnecessary class

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

Co-authored-by: silverwind <me@silverwind.io>
2020-02-08 12:48:17 +01: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
6543
11789aebb0
Fix code-expansion arc-green theme bug (#10180)
* fix code-expansion theme bug

* working solution without important

* no new color

* the midle
2020-02-07 20:19:50 +01:00
silverwind
fdf6d25915
Reorganize frontend files and tooling (#10168)
- move "vendor" files to js/vendor and less/vendor
- move swagger to js/standalone (meant for standalone pages)
- move gitgraph to features and streamline its loading
- add linting configs to webpack dependencies in make
- set ignored files for eslint/stylelint directly in their configs

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-07 18:09:30 +01:00
John Olheiser
cf33a18a5c
Fix commit view (#10169)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-02-07 18:38:50 +08:00
John Olheiser
d32b65ab68
Fix topics dropdown (#10167)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-02-07 07:46:09 +02: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
zeripath
b4914249ee
Update aria-fixed semantic-dropdown to fomantic master (#10096)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-02-02 17:28:00 -05:00
zeripath
f8f6adc2a6
Add button to revert SimpleMDE to plain textarea (#10099) 2020-02-01 17:06:57 +00:00
silverwind
35ada598cc
move jquery.are-you-sure to npm/webpack (#10063) 2020-01-29 21:16:55 +00: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
silverwind
1019913eab move CSS build to webpack (#9983)
- added new 'make webpack' target
- deprecated 'make js' and 'make css'
- extend webpack config to load the less files
- updated docs

I had to rename the source file of `arc-green.less` to avoid generating
a useless JS entrypoint via webpack-fix-style-only-entries which would
not work with different source/destination filenames. I hear that there
should be cleaner solutions possible once we upgrade to Webpack 5.

Co-authored-by: zeripath <art27@cantab.net>
2020-01-28 07:30:39 +00: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
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
silverwind
2982afe6b4 move jquery and jquery-migrate to npm/webpack (#9813)
Currently, this needs to be its own chunk because fomantic depends
on jQuery being present. The next step is to move fomantic to webpack
too after which we can combine the index,fomantic and jquery files into
one.

jquery-migrate is still neccessary because our ancient version of Dropzone
seems to break without it. I imagine it can be removed after a Dropzone
upgrade.
2020-01-21 19:32:33 +02:00
Lunny Xiao
5cf241b312
Use npm to manage fomantic and only build needed components (#9561)
* Use npm to manage fomantic

* Only build needed semantic components

* Fix make

* Don't import fonts from google sites since we have loaded

* [misc] devendor fomantic-ui and rebuild upon src or config changes only

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* Change sort alphabetically of semantic components

* Fix trailing slash

* fix makefile

* Remove dependency to gulp from package.json

* Fix something

* Simplife the makefile

* add missed fomantic compnent

Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2020-01-21 13:17:58 +08:00
Lauris BH
81cfe243f9
Add top author stats to activity page (#9615) 2020-01-20 12:07:30 +02:00
John Olheiser
7d7ab1eeae Issue/PR Context Popups (#9822)
* Add data-index attribute to issue anchors

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

* Init JS

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

* Add required data to anchor

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

* Finish popup

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

* Revert changes to html.go

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

* Better octicon contexts

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

* Split out popup function for re-use

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

* Style changes, test fixes, and cross-reference support

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

* Prefer em to px

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

* Move label margin to base CSS

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

* Move JS to separate file.

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

* Move JS to features and fix module

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

* Remove query-string and hash

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

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-01-19 23:39:21 -05:00
Lunny Xiao
f540d0ac87
Fix issues/pulls dependencies problems (#9842)
* Fix issues/pulls dependencies problems

* fix swagger and api param name

* fix js
2020-01-19 14:43:38 +08:00
6543
36943e56d6 Add "Update Branch" button to Pull Requests (#9784)
* add Divergence

* add Update Button

* first working version

* re-use code

* split raw merge commands and db-change functions (notify, cache, ...)

* use rawMerge (remove redundant code)

* own function to get Diverging of PRs

* use FlashError

* correct Error Msg

* hook is triggerd ... so remove comment

* add "branch2" to "user2/repo1" because it unit-test "TestPullView_ReviewerMissed" use it but dont exist jet :/

* move GetPerm to IsUserAllowedToUpdate

* add Flash Success MSG

* imprufe code
- remove useless js chage

* fix-lint

* TEST: add PullRequest ID:5
Repo: user2/repo1
Base: branch1
Head: pr-to-update

* correct comments

* make PR5 outdated

* fix Tests

* WIP: add pull update test

* update revs

* update locales

* working TEST

* update UI

* misspell

* change style

* add 1s delay so rev exist

* move row up (before merge row)

* fix lint nit

* UI remove divider

* Update style

* nits

* do it right

* introduce IsSameRepo

* remove useless check

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-17 08:03:40 +02:00
zeripath
66ee9b87f9 Add require signed commit for protected branch (#9708)
* Add require signed commit for protected branch

* Fix fmt

* Make editor show if they will be signed

* bugfix

* Add basic merge check and better information for CRUD

* linting comment

* Add descriptors to merge signing

* Slight refactor

* Slight improvement to appearances

* Handle Merge API

* manage CRUD API

* Move error to error.go

* Remove fix to delete.go

* prep for merge

* need to tolerate \r\n in message

* check protected branch before trying to load it

* Apply suggestions from code review

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

* fix commit-reader

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-01-15 09:32:57 +01:00
John Olheiser
d89022c202 Fix SimpleMDE quote reply (#9757)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: zeripath <art27@cantab.net>
2020-01-14 21:47:38 +01:00
silverwind
f00961abe7 move swagger-ui to webpack/npm (#9714)
Created a second webpack output file for swagger-ui which is loaded on
the /api/swagger route. One notable difference is the absence of the
swagger favicon that was previously used which is now the gitea icon. I
see no easy way to restore that favicon, so I decided to not keep it.
2020-01-14 13:02:08 -05:00
silverwind
86464de0c1 silence fomantic error regarding tabs (#9713)
Fomantic expects all tabs to have a target element with content as
defined by the data-tab attribute. All our usage of the tab module seems
to use <a> element tabs that link to new pages so these content elements
are never present and fomantic complains about that in the console with
an "Activated tab cannot be found" error. This silences that error.
2020-01-12 03:57:32 +01:00