Mixer moves into the terminal's Web3 page as a sub-page
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09a5cae69c
commit
be18078f69
4 files changed
+17
-8
No files matched your search
@@ -13,7 +13,7 @@ namespace Decentralized
|
||||
public static class TerminalWindow
|
||||
{
|
||||
public const string Id = "pd_terminal";
|
||||
private enum Page { Home, Bank, Poinbase, Web3, Mixer, Report }
|
||||
private enum Page { Home, Bank, Poinbase, Web3, Report }
|
||||
|
||||
private static Page _page = Page.Home;
|
||||
private static string _amount = "";
|
||||
@@ -28,7 +28,6 @@ namespace Decentralized
|
||||
b.BeginRow();
|
||||
foreach (Page p in Enum.GetValues(typeof(Page)))
|
||||
{
|
||||
if (p == Page.Mixer && !Unlock.MixerUnlocked) continue;
|
||||
var page = p;
|
||||
string name = L.T("tab." + p.ToString().ToLowerInvariant());
|
||||
b.AddButton(page == _page ? $"[{name}]" : name, () => { _page = page; _message = null; Open(); });
|
||||
@@ -42,7 +41,6 @@ namespace Decentralized
|
||||
case Page.Bank: BankPage(b); break;
|
||||
case Page.Poinbase: ExchangePage(b, Venue.Exchange); break;
|
||||
case Page.Web3: Web3Page(b); break;
|
||||
case Page.Mixer: MixerPage(b); break;
|
||||
default: ReportPage(b); break;
|
||||
}
|
||||
b.End();
|
||||
@@ -237,6 +235,14 @@ namespace Decentralized
|
||||
private static void Web3Page(CustomUIBuilder b)
|
||||
{
|
||||
var w = Session.Data.Hot;
|
||||
if (Unlock.MixerUnlocked)
|
||||
{
|
||||
b.BeginRow();
|
||||
b.AddButton(_web3Mixer ? L.T("web3.sub.trade") : $"[{L.T("web3.sub.trade")}]", () => { _web3Mixer = false; _message = null; Open(); });
|
||||
b.AddButton(_web3Mixer ? $"[{L.T("web3.sub.mixer")}]" : L.T("web3.sub.mixer"), () => { _web3Mixer = true; _message = null; Open(); });
|
||||
b.End();
|
||||
if (_web3Mixer) { MixerPage(b); return; }
|
||||
}
|
||||
Columns(b, l =>
|
||||
{
|
||||
l.AddHeader(L.T("web3.wallet.h"));
|
||||
@@ -254,6 +260,7 @@ namespace Decentralized
|
||||
});
|
||||
}
|
||||
|
||||
private static bool _web3Mixer;
|
||||
private static string _mixAsset = Assets.PSC;
|
||||
private static int _mixRounds = 2;
|
||||
private static readonly float[] MixW = { 70f, 100f, 100f, 80f };
|
||||
|
||||
Reference in new issue
Block a user