Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
fix: improve futbin data display
Browse files Browse the repository at this point in the history
fixes #230 and #224
  • Loading branch information
Mardaneus86 committed Oct 5, 2020
1 parent 141c31b commit 578b745
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
21 changes: 12 additions & 9 deletions app/futbin/futbin-prices.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export class FutbinPrices extends BaseScript {
case 'UTSquadSplitViewController':
case 'UTSquadsHubViewController':
case 'UTSBCSquadSplitViewController':
target.prepend(`
target.append(`
<div class="ut-squad-slot-pedestal-view no-state futbin">
<span class="coins value" title="Last update: ${futbinData[playerId].prices[platform].updated || 'never'}">${futbinData[playerId].prices[platform].LCPrice || '---'}</span>
</div>`);
Expand All @@ -321,8 +321,9 @@ export class FutbinPrices extends BaseScript {
target.append(`
<div class="auctionValue futbin">
<span class="label">${futbinText}</span>
<span class="coins value">${futbinData[playerId].prices[platform].LCPrice || '---'}</span>
<span class="time" style="color: #acacc4;">${futbinData[playerId].prices[platform].updated || 'never'}</span>
<span class="coins value">${futbinData[playerId].prices[platform].LCPrice || '---'}
<span class="time" style="color: #acacc4;"> (${futbinData[playerId].prices[platform].updated || 'never'})</span>
</span>
</div>`);
break;
case 'UTTransferListSplitViewController':
Expand All @@ -333,20 +334,22 @@ export class FutbinPrices extends BaseScript {
$('.secondary.player-stats-data-component').css('float', 'left');
targetForButton = target.find('.auction');
targetForButton.show();
targetForButton.prepend(`
targetForButton.append(`
<div class="auctionValue futbin">
<span class="label">${futbinText}</span>
<span class="coins value">${futbinData[playerId].prices[platform].LCPrice || '---'}</span>
<span class="time" style="color: #acacc4;">${futbinData[playerId].prices[platform].updated || 'never'}</span>
<span class="coins value">${futbinData[playerId].prices[platform].LCPrice || '---'}
<span class="time" style="color: #acacc4;"> (${futbinData[playerId].prices[platform].updated || 'never'})</span>
</span>
</div>`);
break;
case 'SearchResults':
targetForButton = target.find('.auctionValue').parent();
targetForButton.prepend(`
targetForButton.append(`
<div class="auctionValue futbin">
<span class="label">${futbinText}</span>
<span class="coins value">${futbinData[playerId].prices[platform].LCPrice || '---'}</span>
<span class="time" style="color: #acacc4;">${futbinData[playerId].prices[platform].updated || 'never'}</span>
<span class="coins value">${futbinData[playerId].prices[platform].LCPrice || '---'}
<span class="time" style="color: #acacc4;"> (${futbinData[playerId].prices[platform].updated || 'never'})</span>
</span>
</div>`);
break;
default:
Expand Down
29 changes: 18 additions & 11 deletions app/futbin/style/futbin-prices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,19 @@
.MyClubResults .listFUTItem .auction .auctionValue.futbin {
display: block;
}
.listFUTItem .auction .auction-state {
width: 25%;
float: right;
}

.listFUTItem .auction {
display: block;
}
top: 5%;

.listFUTItem .auction .auctionValue {
width: 24%;
float: left;
padding-right: 1%;
.futbin .coins.value .time {
display: inline;
font-size: 1em;
}
}
.ut-navigation-container-view.ui-layout-right .listFUTItem .auction {
top: 30%;
}

.futbinupdate {
font-size: 14px;
clear: both;
Expand All @@ -55,15 +54,23 @@
background-color: #7ffe94;
color: #434853;
}
.ut-club-search-results-view .listFUTItem .auction {
.auction-state, .auctionValue {
display: none;

&.futbin {
display: block;
}
}
}
.player-picks-modal .time {
display: block;
}
.ut-squad-slot-pedestal-view.futbin {
min-width: 58px;
flex: none;
width: auto;
bottom: -2.2em;
bottom: -2.6em;
white-space: nowrap;

.coins.value {
Expand Down

0 comments on commit 578b745

Please sign in to comment.