Skip to content

Commit

Permalink
Merge pull request #34 from Mygod/break-shiny-total
Browse files Browse the repository at this point in the history
Break out shiny total into two columns
  • Loading branch information
versx authored Nov 10, 2020
2 parents 3699a8a + 75ccb0d commit 2efa271
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 3 additions & 5 deletions src/data/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,10 @@ async function getShinyRates(filter) {
pokemon: `<img src="${imageUrl}" style="width: 32px; height: 32px; object-fit: contain;" />&nbsp;${name}`,
rate: {
formatted: `1/${rate}`,
sort: rate
sort: -rate,
},
count: {
formatted: `${shiny.toLocaleString()}/${total.toLocaleString()}`,
sort: total
}
shiny: shiny,
total: total,
});
}
return data;
Expand Down
11 changes: 5 additions & 6 deletions src/views/pokemon.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
<th class="all">{{ID}}</th>
<th class="all">{{Pokemon}}</th>
<th class="all">{{Shiny Rate}}</th>
<th class="min-desktop">{{Shiny / Total}}</th>
<th>{{Shiny}}</th>
<th>{{Total}}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -508,13 +509,11 @@
_: "rate.formatted",
sort: "rate.sort"
} },
{ data: {
_: "count.formatted",
sort: "count.sort"
} },
{ "data": "shiny" },
{ "data": "total" },
],
"columnDefs": [
{ type: 'formatted-num', targets: [0, 2, 3] }
{ type: 'formatted-num', targets: [0, 2] }
],
"info": true,
"order": [[ 0, "asc" ]],
Expand Down
3 changes: 2 additions & 1 deletion static/locales/_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"Search by Pokemon name...": "Search by Pokemon name...",
"Type in a Pokemon name": "Type in a Pokemon name",
"Shiny Rate": "Shiny Rate",
"Shiny / Total": "Shiny / Total",
"Shiny": "Shiny",
"Total": "Total",
"Gyms Under Attack!": "Gyms Under Attack!",
"EX-Eligible Raids": "EX-Eligible Raids",
"Male Raids": "Male Raids",
Expand Down
3 changes: 2 additions & 1 deletion static/locales/_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"Search by Pokemon name...": "Search by Pokemon name...",
"Type in a Pokemon name": "Type in a Pokemon name",
"Shiny Rate": "Shiny Rate",
"Shiny / Total": "Shiny / Total",
"Shiny": "Shiny",
"Total": "Total",
"Gyms Under Attack!": "Gyms Under Attack!",
"EX-Eligible Raids": "EX-Eligible Raids",
"Male Raids": "Male Raids",
Expand Down
3 changes: 2 additions & 1 deletion static/locales/_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"Search by Pokemon name...": "Search by Pokemon name...",
"Type in a Pokemon name": "Type in a Pokemon name",
"Shiny Rate": "Shiny Rate",
"Shiny / Total": "Shiny / Total",
"Shiny": "Shiny",
"Total": "Total",
"Gyms Under Attack!": "Gyms Under Attack!",
"EX-Eligible Raids": "EX-Eligible Raids",
"Male Raids": "Male Raids",
Expand Down

0 comments on commit 2efa271

Please sign in to comment.