diff --git a/app/helpers/theme_helper.rb b/app/helpers/theme_helper.rb index 5ccb139a..4e99b6e7 100644 --- a/app/helpers/theme_helper.rb +++ b/app/helpers/theme_helper.rb @@ -20,6 +20,7 @@ module ThemeHelper 'body_text' => 'body-text', 'input_color' => 'input-bg', 'input_text' => 'input-text', + 'input_placeholder' => 'input-placeholder', 'muted_text' => 'muted-text' }.freeze @@ -33,7 +34,7 @@ module ThemeHelper theme.attributes.each do |k, v| next unless ATTRIBUTE_MAP.key?(k) - if k.include? 'text' + if k.include? 'text' or k.include? 'placeholder' hex = get_hex_color_from_theme_value(v) body += "\t--#{ATTRIBUTE_MAP[k]}: #{get_decimal_triplet_from_hex(hex)};\n" else diff --git a/app/javascript/retrospring/features/settings/theme.ts b/app/javascript/retrospring/features/settings/theme.ts index 541e5ea6..d2c4602b 100644 --- a/app/javascript/retrospring/features/settings/theme.ts +++ b/app/javascript/retrospring/features/settings/theme.ts @@ -36,6 +36,7 @@ const generateTheme = (payload: Record): void => { 'body_text': 'body-text', 'input_color': 'input-bg', 'input_text': 'input-text', + 'input_placeholder': 'input-placeholder', 'muted_text': 'muted-text' }; @@ -43,7 +44,7 @@ const generateTheme = (payload: Record): void => { (Object.keys(payload)).forEach((payloadKey) => { if (themeAttributeMap[payloadKey]) { - if (themeAttributeMap[payloadKey].includes('text')) { + if (themeAttributeMap[payloadKey].includes('text') || themeAttributeMap[payloadKey].includes('placeholder')) { const hex = getHexColorFromThemeValue(payload[payloadKey]); body += `--${themeAttributeMap[payloadKey]}: ${getDecimalTripletsFromHex(hex)};\n`; } @@ -111,4 +112,4 @@ export function themeSubmitHandler(): void { Array.from(document.querySelectorAll('#update .color')).forEach((color: HTMLInputElement) => { color.value = String(parseInt(color.value.substr(1, 6), 16)); }); -} \ No newline at end of file +}