Browse Source

[https://github.com/tracim/tracim/issues/809] added lang label on header

Skylsmoi 6 years ago
parent
commit
8c0af6cdf3

+ 3 - 1
frontend/src/component/Header/MenuActionListItem/DropdownLang.jsx View File

4
 require('./DropdownLang.styl')
4
 require('./DropdownLang.styl')
5
 
5
 
6
 const DropdownLang = props => {
6
 const DropdownLang = props => {
7
+  const activeLang = props.langList.find(l => l.id === props.idLangActive)
7
   return (
8
   return (
8
     <li className='header__menu__rightside__itemlanguage'>
9
     <li className='header__menu__rightside__itemlanguage'>
9
       <div className='header__menu__rightside__itemlanguage__languagedropdown dropdown'>
10
       <div className='header__menu__rightside__itemlanguage__languagedropdown dropdown'>
15
           aria-haspopup='true'
16
           aria-haspopup='true'
16
           aria-expanded='false'
17
           aria-expanded='false'
17
         >
18
         >
18
-          <img className='languagedropdown__btnlanguage__imgselected' src={props.langList.find(l => l.id === props.idLangActive).icon} />
19
+          <img className='languagedropdown__btnlanguage__imgselected' src={activeLang.icon} />
20
+          { activeLang.label }
19
         </button>
21
         </button>
20
         <div className='languagedropdown__subdropdown dropdown-menu' aria-labelledby='headerDropdownMenuButton'>
22
         <div className='languagedropdown__subdropdown dropdown-menu' aria-labelledby='headerDropdownMenuButton'>
21
           { props.langList.filter(l => l.id !== props.idLangActive).map(l =>
23
           { props.langList.filter(l => l.id !== props.idLangActive).map(l =>

+ 1 - 0
frontend/src/component/Header/MenuActionListItem/DropdownLang.styl View File

12
       margin-right 10px
12
       margin-right 10px
13
       width 20px
13
       width 20px
14
       height 15px
14
       height 15px
15
+      vertical-align middle
15
   &__subdropdown
16
   &__subdropdown
16
     padding 0
17
     padding 0
17
     min-width 0
18
     min-width 0