Skip to content

Commit

Permalink
make epoch reporting a little less scary (#3049)
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 authored Oct 30, 2024
1 parent 40d23e0 commit 5a3a7d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/webserver/site/src/html/forms.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -899,13 +899,13 @@
<div class="flex-stretch-column mt-2 px-3">
<div data-tmpl="buyOrdersReportBox" class="d-flex justify-content-between align-items-center d-hide">
<span data-tmpl="buyOrdersSuccess" class="text-buycolor">[[[buy_orders_success]]]</span>
<span data-tmpl="buyOrdersFailed" class="d-hide text-danger">[[[buy_orders_failed]]]</span>
<span data-tmpl="buyOrdersFailed" class="d-hide text-warning">[[[buy_orders_failed]]]</span>
<button data-tmpl="buyOrdersBttn" class="ico-open"></button>
</div>

<div data-tmpl="sellOrdersReportBox" class="d-flex justify-content-between align-items-center d-hide">
<span data-tmpl="sellOrdersSuccess" class="text-buycolor">[[[sell_orders_success]]]</span>
<span data-tmpl="sellOrdersFailed" class="d-hide text-danger">[[[sell_orders_failed]]]</span>
<span data-tmpl="sellOrdersFailed" class="d-hide text-warning">[[[sell_orders_failed]]]</span>
<button data-tmpl="sellOrdersBttn" class="ico-open"></button>
</div>

Expand Down
10 changes: 5 additions & 5 deletions client/webserver/site/src/js/mmutil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,10 +1059,10 @@ export class RunningMarketMakerDisplay {
rowTmpl.used.textContent = Doc.formatCoinValue(used, unitInfo)
const deficiency = safeSub(required, available)
rowTmpl.deficiency.textContent = Doc.formatCoinValue(deficiency, unitInfo)
if (deficiency > 0) rowTmpl.deficiency.classList.add('text-danger')
if (deficiency > 0) rowTmpl.deficiency.classList.add('text-warning')
const deficiencyWithPending = safeSub(deficiency, pending)
rowTmpl.deficiencyWithPending.textContent = Doc.formatCoinValue(deficiencyWithPending, unitInfo)
if (deficiencyWithPending > 0) rowTmpl.deficiencyWithPending.classList.add('text-danger')
if (deficiencyWithPending > 0) rowTmpl.deficiencyWithPending.classList.add('text-warning')
return [row, deficiency]
}
const setDeficiencyVisibility = (deficiency: boolean, rows: HTMLElement[]) => {
Expand Down Expand Up @@ -1129,9 +1129,9 @@ export class RunningMarketMakerDisplay {
rowTmpl.standingLots.textContent = String(placement.standingLots)
rowTmpl.orderedLots.textContent = String(placement.orderedLots)
if (placement.standingLots + placement.orderedLots < placement.lots) {
rowTmpl.lots.classList.add('text-danger')
rowTmpl.standingLots.classList.add('text-danger')
rowTmpl.orderedLots.classList.add('text-danger')
rowTmpl.lots.classList.add('text-warning')
rowTmpl.standingLots.classList.add('text-warning')
rowTmpl.orderedLots.classList.add('text-warning')
}
Doc.setVis(placement.counterTradeRate > 0, rowTmpl.counterTradeRate)
rowTmpl.counterTradeRate.textContent = Doc.formatRateFullPrecision(placement.counterTradeRate, baseUI, quoteUI, this.mkt.rateStep)
Expand Down

0 comments on commit 5a3a7d2

Please sign in to comment.