forgejo-federation/web_src/js/components
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
..
.eslintrc.yaml Update eslints for Vue 3 (#23935) 2023-04-05 16:59:40 -04:00
ActionRunStatus.vue Attach a tooltip to the action status icon (#24614) 2023-05-09 21:39:16 +02:00
ActivityHeatmap.vue Localize activity heatmap (except tooltip) (#24131) 2023-04-17 14:26:01 -04:00
ContextPopup.vue Modify luminance calculation and extract related functions into single files (#24586) 2023-05-10 11:19:03 +00:00
DashboardRepoList.vue Add org visibility label to non-organization's dashboard (#24558) 2023-05-07 08:33:43 +08:00
DiffFileList.vue Use data-tooltip-content for tippy tooltip (#23649) 2023-03-24 18:35:38 +08:00
DiffFileTree.vue Update the value of the diffEnd when click Show More btn in the DiffFileTree (#24069) 2023-04-12 15:11:23 +02:00
DiffFileTreeItem.vue Use reactive store to share data between components (#23996) 2023-04-11 20:44:26 -04:00
PullRequestMergeForm.vue Refactor branch/tag selector to Vue SFC (#23421) 2023-03-14 17:51:20 +08:00
RepoActionView.test.js Improve action log display with control chars (#23820) 2023-04-01 20:57:05 +08:00
RepoActionView.vue Make the actions control button look like an actual button (#24611) 2023-05-10 08:09:23 +00:00
RepoActivityTopAuthors.vue Refactor dashboard repo list to Vue SFC (#23405) 2023-03-14 12:09:06 +08:00
RepoBranchTagSelector.vue Make Issue/PR/projects more compact, misc CSS tweaks (#24459) 2023-05-03 17:58:59 -04:00