mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Highlight language change in composer
This commit is contained in:
parent
ef874dd347
commit
15551ec3c9
1 changed files with 6 additions and 1 deletions
|
@ -141,6 +141,7 @@ function Compose({
|
|||
const [language, setLanguage] = useState(
|
||||
store.session.get('currentLanguage') || DEFAULT_LANG,
|
||||
);
|
||||
const prevLanguage = useRef(language);
|
||||
const [mediaAttachments, setMediaAttachments] = useState([]);
|
||||
const [poll, setPoll] = useState(null);
|
||||
|
||||
|
@ -1032,7 +1033,11 @@ function Compose({
|
|||
{uiState !== 'loading' && (
|
||||
<CharCountMeter maxCharacters={maxCharacters} />
|
||||
)}
|
||||
<label class="toolbar-button">
|
||||
<label
|
||||
class={`toolbar-button ${
|
||||
language !== prevLanguage.current ? 'highlight' : ''
|
||||
}`}
|
||||
>
|
||||
<span class="icon-text">
|
||||
{supportedLanguagesMap[language]?.native}
|
||||
</span>
|
||||
|
|
Loading…
Add table
Reference in a new issue