Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: make epoch reporting a little less scary #3049

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading