diff --git a/.github/workflows/preview-theme.yml b/.github/workflows/preview-theme.yml index 6db3aeea938ed..595ca5f9303c7 100644 --- a/.github/workflows/preview-theme.yml +++ b/.github/workflows/preview-theme.yml @@ -1,5 +1,7 @@ name: Theme preview on: + # Temporary disabled due to paused themes addition. + # See: https://github.com/anuraghazra/github-readme-stats/issues/3404 # pull_request_target: # types: [opened, edited, reopened, synchronize] # branches: diff --git a/.github/workflows/stale-theme-pr-closer.yml b/.github/workflows/stale-theme-pr-closer.yml index 81c8ee22f0901..6837717c5c9fe 100644 --- a/.github/workflows/stale-theme-pr-closer.yml +++ b/.github/workflows/stale-theme-pr-closer.yml @@ -1,5 +1,7 @@ name: Close stale theme pull requests that have the 'invalid' label. on: + # Temporary disabled due to paused themes addition. + # See: https://github.com/anuraghazra/github-readme-stats/issues/3404 # schedule: # # ┌───────────── minute (0 - 59) # # │ ┌───────────── hour (0 - 23) diff --git a/src/cards/stats.js b/src/cards/stats.js index 06aa86d63a1dd..44f787c5882a2 100644 --- a/src/cards/stats.js +++ b/src/cards/stats.js @@ -32,6 +32,7 @@ const LONG_LOCALES = [ "fil", "fi", "fr", + "hu", "id", "ml", "my", diff --git a/src/common/access.js b/src/common/access.js index 891518329454b..25777356b55c5 100644 --- a/src/common/access.js +++ b/src/common/access.js @@ -12,7 +12,7 @@ const BLACKLISTED_MESSAGE = "This username is blacklisted"; * Guards access using whitelist/blacklist. * * @param {Object} args The parameters object. - * @param {Object} args.res The response object. + * @param {any} args.res The response object. * @param {string} args.id Resource identifier (username or gist id). * @param {"username"|"gist"|"wakatime"} args.type The type of identifier. * @param {{ title_color?: string, text_color?: string, bg_color?: string, border_color?: string, theme?: string }} args.colors Color options for the error card. diff --git a/src/common/color.js b/src/common/color.js index 759a07ca25c7b..a372f24401a9a 100644 --- a/src/common/color.js +++ b/src/common/color.js @@ -1,3 +1,5 @@ +// @ts-check + import { themes } from "../../themes/index.js"; /** @@ -69,7 +71,6 @@ const fallbackColor = (color, fallbackColor) => { * @param {string=} args.border_color Card border color. * @param {string=} args.ring_color Card ring color. * @param {string=} args.theme Card theme. - * @param {string=} args.fallbackTheme Fallback theme. * @returns {CardColors} Card colors. */ const getCardColors = ({ @@ -80,11 +81,13 @@ const getCardColors = ({ border_color, ring_color, theme, - fallbackTheme = "default", }) => { - const defaultTheme = themes[fallbackTheme]; + const defaultTheme = themes["default"]; const isThemeProvided = theme !== null && theme !== undefined; + + // @ts-ignore const selectedTheme = isThemeProvided ? themes[theme] : defaultTheme; + const defaultBorderColor = "border_color" in selectedTheme ? selectedTheme.border_color