feat: hide wakatime languages (#1212)

* feat: added option to hide languages

* feat: recalculate percentages for hidden languages

* refactor: reverted langs_count and did some formatting

* doc: added hide to readme

* feat: make languages var mutable and improve filter logic

Co-authored-by: Adrian Kunz <clashsoft@hotmail.com>

* refactor: improve code and added tests

Co-authored-by: Adrian Kunz <clashsoft@hotmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
This commit is contained in:
Julian Holfeld
2021-08-27 21:05:10 +02:00
committed by GitHub
parent 8f316346c1
commit 1a3edcaae0
8 changed files with 82 additions and 37 deletions
+3
View File
@@ -3,6 +3,7 @@ const {
renderError,
parseBoolean,
clampValue,
parseArray,
CONSTANTS,
isLocaleAvailable,
} = require("../src/common/utils");
@@ -26,6 +27,7 @@ module.exports = async (req, res) => {
locale,
layout,
langs_count,
hide,
api_domain,
range,
border_radius,
@@ -58,6 +60,7 @@ module.exports = async (req, res) => {
custom_title,
hide_title: parseBoolean(hide_title),
hide_border: parseBoolean(hide_border),
hide: parseArray(hide),
line_height,
title_color,
icon_color,