diff --git a/client/webserver/http.go b/client/webserver/http.go index 883ade7d08..9b08c12fe1 100644 --- a/client/webserver/http.go +++ b/client/webserver/http.go @@ -13,7 +13,6 @@ import ( "time" "decred.org/dcrdex/client/core" - "decred.org/dcrdex/dex" "decred.org/dcrdex/dex/encode" "decred.org/dcrdex/dex/order" ) @@ -76,10 +75,7 @@ func (s *WebServer) handleLogin(w http.ResponseWriter, r *http.Request) { // registerTmplData is template data for the /register page. type registerTmplData struct { CommonArguments - InitStep bool - WalletStep bool - OpenStep bool - DEXStep bool + Initialized bool } // handleRegister is the handler for the '/register' page request. @@ -93,23 +89,7 @@ func (s *WebServer) handleRegister(w http.ResponseWriter, r *http.Request) { data := ®isterTmplData{ CommonArguments: *cArgs, - } - - // TODO: rework register page for paying with other assets. - feeAssetID, _ := dex.BipSymbolID("dcr") - feeWalletStatus := s.core.WalletState(feeAssetID) - feeWalletExists := feeWalletStatus != nil - feeWalletOpen := feeWalletExists && feeWalletStatus.Open - - switch { - case !cArgs.UserInfo.Initialized: - data.InitStep = true - case !feeWalletExists: - data.WalletStep = true - case !feeWalletOpen: - data.OpenStep = true - default: - data.DEXStep = true + Initialized: cArgs.UserInfo.Initialized, } s.sendTemplate(w, "register", data) diff --git a/client/webserver/locales/en-us.go b/client/webserver/locales/en-us.go index 973a908914..61f3b78bf4 100644 --- a/client/webserver/locales/en-us.go +++ b/client/webserver/locales/en-us.go @@ -27,8 +27,9 @@ var EnUS = map[string]string{ "Submit": "Submit", "Confirm Registration": "Confirm Registration", "app_pw_reg": "Enter your app password to confirm DEX registration.", - "reg_confirm_submit": `When you submit this form, DCR will be spent from your Decred wallet to pay registration fees.`, // TODO for multi-asset reg + "reg_confirm_submit": `When you submit this form, funds will be spent from your chosen wallet to pay the registration fee.`, "provided_markets": "This DEX provides the following markets:", + "accepted_fee_assets": "This DEX accepts the following fees:", "base_header": "Base", "quote_header": "Quote", "lot_size_header": "Lot Size", @@ -131,8 +132,6 @@ var EnUS = map[string]string{ "Set App Password": "Set App Password", "reg_set_app_pw_msg": "Set your app password. This password will protect your DEX account keys and connected wallets.", "Password Again": "Password Again", - "reg_dcr_required": "Your Decred wallet is required to pay registration fees.", // TODO - "reg_dcr_unlocked": "Unlock your Decred wallet to pay registration fees.", // TODO "Add a DEX": "Add a DEX", "reg_ssl_needed": "Looks like we don't have an SSL certificate for this DEX. Add the server's certificate to continue.", "Dark Mode": "Dark Mode", @@ -174,4 +173,8 @@ var EnUS = map[string]string{ "ready": "ready", "off": "off", "Export Trades": "Export Trades", + "asset_header": "Asset", + "fee_price_header": "Fee", + "fee_confs_header": "Confs", + "SetupWallet": "Setup Wallet", } diff --git a/client/webserver/locales/pt-br.go b/client/webserver/locales/pt-br.go index b6824e0499..a3e29c558c 100644 --- a/client/webserver/locales/pt-br.go +++ b/client/webserver/locales/pt-br.go @@ -27,8 +27,9 @@ var PtBr = map[string]string{ "Submit": "Enviar", "Confirm Registration": "Confirma Registro", "app_pw_reg": "Informe sua senha do app para confirmar seu registro na DEX.", - "reg_confirm_submit": `Quando vc enviar esse formulário, DCR será gasto de sua carteira decred para pagar a taxa de registro.`, + "reg_confirm_submit": `Quando vc enviar esse formulário, DCR será gasto de sua carteira decred para pagar a taxa de registro.`, // update "provided_markets": "Essa DEX provê os seguintes mercados:", + "accepted_fee_assets": "This DEX accepts the following fees:", "base_header": "Base", "quote_header": "Quote", "lot_size_header": "Tamanho do Lote", @@ -131,8 +132,6 @@ var PtBr = map[string]string{ "Set App Password": "Definir senha de aplicativo", "reg_set_app_pw_msg": "Definir senha de aplicativo. Esta senha protegerá sua conta DEX e chaves e carteiras conectadas.", "Password Again": "Senha Novamente", - "reg_dcr_required": "Sua carteira decred é necessária para pagar a taxa de registro.", - "reg_dcr_unlocked": "Desbloqueie sua carteira decred para pagamento da taxa.", "Add a DEX": "Adicionar uma DEX", "reg_ssl_needed": "Parece que não temos um certificado SSL para esta DEX. Adicione o certificado do servidor para podermos continuar.", "Dark Mode": "Modo Dark", @@ -174,4 +173,8 @@ var PtBr = map[string]string{ "ready": "destrancado", "off": "desligado", "Export Trades": "Exportar Trocas", + "asset_header": "Asset", + "fee_price_header": "Fee", + "fee_confs_header": "Confs", + "SetupWallet": "Setup Wallet", } diff --git a/client/webserver/locales/zh-cn.go b/client/webserver/locales/zh-cn.go index 1b7337cd1c..ec789b36b8 100644 --- a/client/webserver/locales/zh-cn.go +++ b/client/webserver/locales/zh-cn.go @@ -27,10 +27,11 @@ var ZhCN = map[string]string{ "Submit": "提交", "Confirm Registration": "确认注册", "app_pw_reg": "输入应用程序密码以确认注册DEX。", - "reg_confirm_submit": `当您发送此表格时, DCR将从您指定的钱包中支出,以支付注册费。`, - "provided_markets": "当前DEX提供以下市场:", // alt. DEX提供以下市场 - "base_header": "Base", // no good translation - "quote_header": "Quote", // no good translation + "reg_confirm_submit": `当您发送此表格时, DCR将从您指定的钱包中支出,以支付注册费。`, // update + "provided_markets": "当前DEX提供以下市场:", // alt. DEX提供以下市场 + "accepted_fee_assets": "This DEX accepts the following fees:", // xxx translate + "base_header": "Base", // no good translation + "quote_header": "Quote", // no good translation "lot_size_header": "批量", "lot_size_headsup": "所有交易都是批量值的倍数。", "Password": "密码", @@ -131,8 +132,6 @@ var ZhCN = map[string]string{ "Set App Password": "设置应用密码", "reg_set_app_pw_msg": "设置应用密码。这个密码将保护你的 DEX 账户和连接的密钥和钱包。", "Password Again": "再次输入密码", - "reg_dcr_required": "你的 decred 钱包需要支付注册费。", - "reg_dcr_unlocked": "解锁你的 decred 钱包以支付费用。", "Add a DEX": "添加一个 DEX", "reg_ssl_needed": "我们似乎没有此 DEX 的 SSL 证书。添加服务器证书以便我们可以继续。", "Dark Mode": "暗模式", @@ -174,4 +173,9 @@ var ZhCN = map[string]string{ "ready": "准备就绪", "off": "关闭", "Export Trades": "导出交易", + + "asset_header": "Asset", // xxx translation + "fee_price_header": "Fee", // xxx translation + "fee_confs_header": "Confs", // xxx translation + "SetupWallet": "Setup Wallet", // xxx translation } diff --git a/client/webserver/site/src/css/forms.scss b/client/webserver/site/src/css/forms.scss index e04c84f403..c4b2d6d4ed 100644 --- a/client/webserver/site/src/css/forms.scss +++ b/client/webserver/site/src/css/forms.scss @@ -19,4 +19,22 @@ table.marketstable { width: 33.3%; padding: 3px 0; } + + button { + padding: 4px 12px; + } + + tr.clickable { + cursor: pointer; + opacity: 0.75; + } + + tr.clickable:hover { + opacity: 1; + } + + tr.clickable.selected { + opacity: 1; + border: 1px solid #686767; + } } diff --git a/client/webserver/site/src/html/forms.tmpl b/client/webserver/site/src/html/forms.tmpl index f50d046413..3ce540512c 100644 --- a/client/webserver/site/src/html/forms.tmpl +++ b/client/webserver/site/src/html/forms.tmpl @@ -38,34 +38,18 @@
[[[asset_header]]] | +[[[fee_price_header]]] | +[[[fee_confs_header]]] | ++ |
---|---|---|---|
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+ + + + | +
Asset | +Fee | +Confs | ++ |
---|---|---|---|
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+ + + + | +
Asset | +Fee | +Confs | ++ |
---|---|---|---|
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+ + + + | +
Asset | +Fee | +Confs | ++ |
---|---|---|---|
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+ + + + | +