Skip to content
Permalink
Browse files

display multi users in explore

also multiple ranks
  • Loading branch information...
Manuel-777 committed Jun 16, 2019
1 parent a7d55d1 commit d1ad45330c8872dd3fb981c40fe7ed311645c40b
Showing with 19 additions and 9 deletions.
  1. +18 −8 window_main/explore.js
  2. +1 −1 window_main/index.css
@@ -624,7 +624,13 @@ function deckLoad(_deck, index) {
d = createDivision(["list_deck_name"], _deck.name);
flt.appendChild(d);

d = createDivision(["list_deck_name_it"], "by " + _deck.player);
let pname =
_deck.player.length > 1 ? `Various (${_deck.player.length})` : _deck.player;
d = createDivision(["list_deck_name_it"], "by " + pname);
if (pname !== _deck.player) {
d.style.textDecoration = "underline dotted";
d.title = _deck.player;
}
flt.appendChild(d);

_deck.colors.forEach(function(color) {
@@ -643,18 +649,22 @@ function deckLoad(_deck, index) {
flr.appendChild(d);

let rcont = createDivision(["flex_item"]);
rcont.style.marginRight = "16px";
rcont.style.marginLeft = "auto";

let eventName = createDivision(["list_deck_name_it"], db.events[_deck.event]);
rcont.appendChild(eventName);

var playerRank = createDivision(["ranks_16"]);
playerRank.style.marginTop = "4px";
playerRank.style.backgroundPosition =
get_rank_index_16(_deck.rank) * -16 + "px 0px";
playerRank.title = _deck.rank;
_deck.rank.forEach(_rank => {
let rankIcon = createDivision(["ranks_16"]);
rankIcon.style.marginTop = "4px";
rankIcon.style.backgroundPosition =
get_rank_index_16(_rank) * -16 + "px 0px";
rankIcon.title = _rank;

rcont.appendChild(rankIcon);
});

rcont.appendChild(eventName);
rcont.appendChild(playerRank);
flr.appendChild(rcont);

div.appendChild(fll);
@@ -768,7 +768,7 @@ a:hover {

.ranks_16 {
-webkit-app-region: no-drag;
margin-right: 16px;
margin-right: 4px;
align-self: center;
width: 16px;
height: 16px;

0 comments on commit d1ad453

Please sign in to comment.
You can’t perform that action at this time.