From 37c5362913494390b194840a3a06b73b68efef85 Mon Sep 17 00:00:00 2001 From: ZHU MINCHAO <48154958+MinchaoZhu@users.noreply.github.com> Date: Wed, 4 Nov 2026 09:59:45 +0800 Subject: [PATCH] ui: skin bank page with right-aligned table and touch ops --- src/Decentralized/TerminalWindow.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Decentralized/TerminalWindow.cs b/src/Decentralized/TerminalWindow.cs index f7dacb7..0776974 100644 --- a/src/Decentralized/TerminalWindow.cs +++ b/src/Decentralized/TerminalWindow.cs @@ -182,7 +182,7 @@ namespace Decentralized private static void BankPage(CustomUIBuilder b) { var ps = PlayerStore.Instance; - var w = new[] { 200f, 220f }; + var w = new[] { 180f, 220f }; Columns(b, l => { l.AddHeader(L.T("entry.bank")); @@ -194,8 +194,11 @@ namespace Decentralized r.AddHeader(L.T("bank.ops")); AmountRow(r); AmlPreview(r); + r.AddSpace(4f); + r.BeginRow(6f); r.AddButton(L.T("trade.deposit"), Deposit); r.AddButton(L.T("trade.withdraw"), Withdraw); + r.End(); }); } @@ -207,17 +210,17 @@ namespace Decentralized double rent = Session.Rent(); double recent = d.Exchange.History.Where(h => h.Key > day - Tuning.AmlWindowDays).Sum(h => h.Value); b.AddSeparator(); - b.AddLabel(L.T("aml.window", Tuning.AmlWindowDays, Fmt.Credits(recent), Fmt.Credits(Tuning.AmlCumRents * rent))); + b.AddLabel(L.T("aml.window", Tuning.AmlWindowDays, Fmt.Credits(recent), Fmt.Credits(Tuning.AmlCumRents * rent)), "aml_dim"); var pb = d.Poinbase; double total = pb.Value(Session.Price); double taintRatio = total > 0 ? pb.Taint / total : 0; - b.AddLabel(L.T("aml.taint", (int)Math.Round(taintRatio * 100))); + b.AddLabel(L.T("aml.taint", (int)Math.Round(taintRatio * 100)), taintRatio > 0.05 ? "aml_note" : "aml_dim"); if (double.TryParse((_amount ?? "").Trim(), NumberStyles.Float, CultureInfo.InvariantCulture, out double v) && v > 0) { double value = Math.Min(v, pb.Get(Assets.CRC)) * Session.Price(Assets.CRC); double taint = total > 0 ? pb.Taint * Math.Min(1, value / total) : 0; double chance = Exchange.HitChance(value, taint, recent, rent, pb.Flagged); - b.AddLabel(L.T("aml.chance", (int)Math.Round(chance * 100))); + b.AddLabel(L.T("aml.chance", (int)Math.Round(chance * 100)), chance > 0.1 ? "aml_chance_note" : "aml_chance_dim"); } }