From 38844e0869bff0a08f8810c97cb3f5cb07df9a8e Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 9 Jul 2023 12:17:22 +0200 Subject: Always pass 6-digit hex color to monaco (#25780) Monaco can not deal with color formats other than 6-digit hex, so we convert the colors for it via new [`tinycolor2`](https://github.com/bgrins/TinyColor) dependency (5kB minzipped). Also, with the addition of the module, we can replace the existing `hexToRGBColor` usage, I verified it is compatible with the current tests before removing the function. Fixes: https://github.com/go-gitea/gitea/issues/25770 --- web_src/js/components/ContextPopup.vue | 5 +++-- web_src/js/features/codeeditor.js | 36 ++++++++++++++++++---------------- web_src/js/features/repo-projects.js | 5 +++-- web_src/js/utils/color.js | 21 -------------------- web_src/js/utils/color.test.js | 14 +------------ 5 files changed, 26 insertions(+), 55 deletions(-) (limited to 'web_src/js') diff --git a/web_src/js/components/ContextPopup.vue b/web_src/js/components/ContextPopup.vue index 420c271fcc..b6852655f6 100644 --- a/web_src/js/components/ContextPopup.vue +++ b/web_src/js/components/ContextPopup.vue @@ -26,7 +26,8 @@