1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/web_src/js/features
Hester Gong ea7954f069
Modify luminance calculation and extract related functions into single files (#24586)
Close #24508

Main changes:
As discussed in the issue

1. Change luminance calculation function to use [Relative
Luminance](https://www.w3.org/WAI/GL/wiki/Relative_luminance)
2. Move the luminance related functions into color.go/color.js
3. Add tests for both the files (Not sure if test cases are too many
now)

Before (tests included by `UseLightTextOnBackground` are labels started
with `##`):
https://try.gitea.io/HesterG/testrepo/labels

After:
<img width="1307" alt="Screen Shot 2023-05-08 at 13 37 55"
src="https://user-images.githubusercontent.com/17645053/236742562-fdfc3a4d-2fab-466b-9613-96f2bf96b4bc.png">
<img width="1289" alt="Screen Shot 2023-05-08 at 13 38 06"
src="https://user-images.githubusercontent.com/17645053/236742570-022db68e-cec0-43bb-888a-fc54f5332cc3.png">
<img width="1299" alt="Screen Shot 2023-05-08 at 13 38 20"
src="https://user-images.githubusercontent.com/17645053/236742572-9af1de45-fb7f-460b-828d-ba25fae20f51.png">

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-10 11:19:03 +00:00
..
admin
comp Support markdown editor for issue template (#24400) 2023-05-08 22:22:52 +00:00
captcha.js
citation.js
clipboard.js
codeeditor.js Update JS dependencies, add new eslint rules (#24597) 2023-05-09 02:35:49 +00:00
colorpicker.js
common-global.js Update JS dependencies, add new eslint rules (#24597) 2023-05-09 02:35:49 +00:00
common-organization.js
contextpopup.js
copycontent.js
dropzone.js
emoji.js
eventsource.sharedworker.js
file-fold.js
heatmap.js
imagediff.js
install.js
notification.js
org-team.js
pull-view-file.js Update JS dependencies, add new eslint rules (#24597) 2023-05-09 02:35:49 +00:00
repo-branch.js Display warning when user try to rename default branch (#24512) 2023-05-04 22:54:38 +00:00
repo-code.js Update JS dependencies, add new eslint rules (#24597) 2023-05-09 02:35:49 +00:00
repo-code.test.js
repo-commit.js
repo-common.js
repo-diff-filetree.js
repo-diff.js
repo-editor.js
repo-findfile.js
repo-findfile.test.js
repo-graph.js
repo-home.js
repo-issue-content.js
repo-issue-list.js Improve issue list filter (#24425) 2023-04-30 11:51:20 -04:00
repo-issue-pr-form.js
repo-issue.js Support markdown editor for issue template (#24400) 2023-05-08 22:22:52 +00:00
repo-legacy.js Support markdown editor for issue template (#24400) 2023-05-08 22:22:52 +00:00
repo-migrate.js
repo-migration.js
repo-projects.js Modify luminance calculation and extract related functions into single files (#24586) 2023-05-10 11:19:03 +00:00
repo-release.js Update JS dependencies, add new eslint rules (#24597) 2023-05-09 02:35:49 +00:00
repo-settings.js Replace N/A with - everywhere (#24474) 2023-05-02 05:54:29 -04:00
repo-template.js
repo-unicode-escape.js
repo-wiki.js Fix EasyMDE toolbar (#24489) 2023-05-03 01:23:39 -04:00
serviceworker.js
sshkey-helper.js
stopwatch.js
tablesort.js
tribute.js
user-auth-webauthn.js
user-auth.js
user-settings.js