Skip to content

Commit

Permalink
deliver #181 visualize level of a pokemon
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnymac committed Jan 14, 2017
1 parent d5724bf commit 5368ad8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/screens/Settings/components/ModalBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const specieSortByOptions = [
'name',
'nickname',
'cp',
'level',
'iv',
]

Expand Down
16 changes: 16 additions & 0 deletions app/screens/Table/components/Pokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {

import renderModal from '../../Detail'
import Tooltip from '../../Tooltip'
import utils from '../../../utils'

const favoriteGlyph = 'fa fa-star favorite-yellow'
const emptyFavoriteGlyph = 'fa fa-star-o'
Expand Down Expand Up @@ -106,6 +107,17 @@ const Pokemon = React.createClass({
>
CP
</th>
<th
className={this.getSortDirectionClassName('level')}
tabIndex="0"
rowSpan="1"
colSpan="1"
aria-controls="pokemon-data"
aria-label="Level: activate to sort column ascending"
onClick={this.handleSortPokemon.bind(this, 'level')}
>
Level
</th>
<th
className={this.getSortDirectionClassName('iv')}
tabIndex="0"
Expand Down Expand Up @@ -154,6 +166,7 @@ const Pokemon = React.createClass({
{`Stamina: ${pokemon.stamina}`}
</span>)
const isChecked = pokemonState[String(pokemon.id)].check
const level = utils.getLevelFromCpMultiplier(pokemon.cp_multiplier + pokemon.additional_cp_multiplier)

return (
<tr key={pokemon.id}>
Expand Down Expand Up @@ -210,6 +223,9 @@ const Pokemon = React.createClass({
{pokemon.cp}
</Tooltip>
</td>
<td>
{level}
</td>
<td>
<Tooltip
placement="right"
Expand Down

0 comments on commit 5368ad8

Please sign in to comment.