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 @@
- {{if .}} -
{{.}}
-
- {{end}}
{{template "walletConfigTemplates"}}

- {{if .}} - -
[[[w_password_helper]]]
- {{else}} - {{end}}
- {{if .}} - -
[[[app_password_helper]]]
- {{else}} - {{end}}
@@ -122,7 +106,7 @@
-
+
@@ -145,6 +129,43 @@ [[[app_pw_reg]]] [[[reg_confirm_submit]]]
+
+ [[[accepted_fee_assets]]] + + + + + + + + + + + + + + + + + +
[[[asset_header]]][[[fee_price_header]]][[[fee_confs_header]]]
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + +
+
[[[provided_markets]]] @@ -181,7 +202,7 @@
- +
diff --git a/client/webserver/site/src/html/register.tmpl b/client/webserver/site/src/html/register.tmpl index 277539d703..db8093aed2 100644 --- a/client/webserver/site/src/html/register.tmpl +++ b/client/webserver/site/src/html/register.tmpl @@ -4,7 +4,7 @@
{{- /* Set up the initial application password. Only shown if app is not already initialized. */ -}} -
+
[[[Set App Password]]]
[[[reg_set_app_pw_msg]]]
@@ -34,18 +34,13 @@
- {{- /* Set up the Decred wallet. Only shown if user has not connected their Decred wallet. */ -}} -
- {{template "newWalletForm" "[[[reg_dcr_required]]]"}} - - - {{- /* Unlock wallet. Only shown if not already unlocked. */ -}} -
- {{template "unlockWalletForm" "[[[reg_dcr_unlocked]]]"}} + {{- /* Form to set up a wallet. Shown on demand when a user clicks a setupWallet button. */ -}} + + {{template "newWalletForm" }} {{- /* DEX ADDRESS FORM */ -}} -
+ {{template "dexAddrForm"}} diff --git a/client/webserver/site/src/js/forms.js b/client/webserver/site/src/js/forms.js index fd8aafe941..76c0fe514b 100644 --- a/client/webserver/site/src/js/forms.js +++ b/client/webserver/site/src/js/forms.js @@ -11,17 +11,24 @@ let app *
element should be the second argument of the constructor. */ export class NewWalletForm { - constructor (application, form, success, pwCache) { + constructor (application, form, success, pwCache, closerFn) { this.form = form this.currentAsset = null this.pwCache = pwCache const fields = this.fields = Doc.parsePage(form, [ 'nwAssetLogo', 'nwAssetName', 'newWalletPass', 'nwAppPass', 'walletSettings', 'selectCfgFile', 'cfgFile', 'submitAdd', 'newWalletErr', - 'newWalletAppPWBox', 'nwRegMsg' + 'newWalletAppPWBox' ]) this.refresh() + if (closerFn) { + form.querySelectorAll('.form-closer').forEach(el => { + Doc.show(el) + Doc.bind(el, 'click', closerFn) + }) + } + // WalletConfigForm will set the global app variable. this.subform = new WalletConfigForm(application, fields.walletSettings, true) @@ -60,8 +67,9 @@ export class NewWalletForm { else Doc.show(this.fields.newWalletAppPWBox) } - async setAsset (asset) { + async setAsset (assetID) { const fields = this.fields + const asset = app.assets[assetID] if (this.currentAsset && this.currentAsset.id === asset.id) return this.currentAsset = asset fields.nwAssetLogo.src = Doc.logoPath(asset.symbol) @@ -93,10 +101,6 @@ export class NewWalletForm { } this.subform.setLoadedConfig(res.config) } - - setRegMsg (msg) { - this.fields.nwRegMsg.textContent = msg - } } /* @@ -298,10 +302,11 @@ export class WalletConfigForm { * ConfirmRegistrationForm should be used with the "confirmRegistrationForm" template. */ export class ConfirmRegistrationForm { - constructor (application, form, { getDexAddr, getCertFile }, success, insufficientFundsFail) { + constructor (application, form, { getDexAddr, getCertFile }, success, insufficientFundsFail, setupWalletFn) { this.fields = Doc.parsePage(form, [ - 'feeDisplay', 'marketRowTemplate', 'marketsTableRows', 'appPass', 'appPassBox', - 'appPassSpan', 'submitConfirm', 'regErr' + 'marketRowTemplate', 'marketsTableRows', 'appPass', 'appPassBox', + 'appPassSpan', 'submitConfirm', 'regErr', 'feeRowTemplate', + 'feeTableRows', 'setupWallet' ]) app = application this.getDexAddr = getDexAddr @@ -309,6 +314,8 @@ export class ConfirmRegistrationForm { this.success = success this.insufficientFundsFail = insufficientFundsFail this.form = form + this.setupWalletFn = setupWalletFn + this.feeAssetID = null bind(form, this.fields.submitConfirm, () => this.submitForm()) } @@ -316,12 +323,58 @@ export class ConfirmRegistrationForm { * setExchange populates the form with the details of an exchange. */ setExchange (xc) { + // store xc in case we need to refresh the data, like after setting up + // a new wallet. + this.xc = xc const fields = this.fields this.fees = xc.regFees - const dcr = this.fees.dcr // TODO: display all options and give choice - fields.feeDisplay.textContent = `${Doc.formatCoinValue(dcr.amount / 1e8)} ${app.assets[dcr.id].symbol.toUpperCase()}` - while (fields.marketsTableRows.firstChild) { - fields.marketsTableRows.removeChild(fields.marketsTableRows.firstChild) + Doc.empty(fields.marketsTableRows) + Doc.empty(fields.feeTableRows) + + for (const [symbol, fee] of Object.entries(xc.regFees)) { + // if asset fee is not supported by the client we can skip it. + if (app.user.assets[fee.id] === undefined) continue + const haveWallet = app.user.assets[fee.id].wallet + const tr = fields.feeRowTemplate.cloneNode(true) + Doc.bind(tr, 'click', () => { + this.feeAssetID = fee.id + // remove selected class from all others row. + const rows = Array.from(fields.feeTableRows.querySelectorAll('tr.selected')) + rows.forEach(row => row.classList.remove('selected')) + tr.classList.add('selected') + // if wallet is configured, we can active the register button. + // Otherwise we do not allow it. + if (haveWallet) { + this.fields.submitConfirm.classList.add('selected') + } else { + this.fields.submitConfirm.classList.remove('selected') + } + }) + Doc.tmplElement(tr, 'asseticon').src = Doc.logoPath(symbol) + Doc.tmplElement(tr, 'asset').innerText = symbol.toUpperCase() + Doc.tmplElement(tr, 'confs').innerText = fee.confs + Doc.tmplElement(tr, 'fee').innerText = fee.amount / 1e8 + + const setupWallet = Doc.tmplElement(tr, 'setupWallet') + const walletReady = Doc.tmplElement(tr, 'walletReady') + if (haveWallet) { + walletReady.innerText = intl.prep(intl.ID_WALLET_READY) + Doc.show(walletReady) + Doc.hide(setupWallet) + } else { + setupWallet.innerText = intl.prep(intl.ID_SETUP_WALLET) + Doc.bind(setupWallet, 'click', () => this.setupWalletFn(fee.id)) + Doc.hide(walletReady) + Doc.show(setupWallet) + } + fields.feeTableRows.appendChild(tr) + if (State.passwordIsCached()) { + Doc.hide(fields.appPassBox) + Doc.hide(fields.appPassSpan) + } else { + Doc.show(fields.appPassBox) + Doc.show(fields.appPassSpan) + } } const markets = Object.values(xc.markets) markets.sort((m1, m2) => { @@ -352,10 +405,20 @@ export class ConfirmRegistrationForm { */ async submitForm () { const fields = this.fields + // if button is selected it can be clickable. + if (!fields.submitConfirm.classList.contains('selected')) { + return + } + if (this.feeAssetID === null) { + fields.regErr.innerText = 'You must select a valid wallet for the fee payment' + Doc.show(fields.regErr) + return + } + const symbol = app.user.assets[this.feeAssetID].wallet.symbol Doc.hide(fields.regErr) + const feeAsset = this.fees[symbol] const cert = await this.getCertFile() const dexAddr = this.getDexAddr() - const feeAsset = this.fees.dcr // this.fees[fields.symbol] const registration = { addr: dexAddr, pass: fields.appPass.value, @@ -384,6 +447,10 @@ export class ConfirmRegistrationForm { loaded() this.success() } + + refresh () { + this.setExchange(this.xc) + } } export class UnlockWalletForm { diff --git a/client/webserver/site/src/js/locales.js b/client/webserver/site/src/js/locales.js index e02e8704f7..4ef34b41ec 100644 --- a/client/webserver/site/src/js/locales.js +++ b/client/webserver/site/src/js/locales.js @@ -39,6 +39,9 @@ export const ID_WAITING_FOR_CONFS = 'ID_WAITING_FOR_CONFS' export const ID_NONE_SELECTED = 'ID_NONE_SELECTED' // unused? export const ID_REGISTRATION_FEE_SUCCESS = 'ID_REGISTRATION_FEE_SUCCESS' export const ID_API_ERROR = 'ID_API_ERROR' +export const ID_CHOOSE_WALLET = 'ID_CHOOSE_WALLET' +export const ID_SETUP_WALLET = 'ID_SETUP_WALLET' +export const ID_WALLET_READY = 'ID_WALLET_READY' export const enUS = { [ID_NO_PASS_ERROR_MSG]: 'password cannot be empty', @@ -81,7 +84,9 @@ export const enUS = { [ID_WAITING_FOR_CONFS]: 'Waiting for confirmations...', [ID_NONE_SELECTED]: 'none selected', [ID_REGISTRATION_FEE_SUCCESS]: 'Registration fee payment successful!', - [ID_API_ERROR]: 'API error' + [ID_API_ERROR]: 'API error', + [ID_WALLET_READY]: 'Ready', + [ID_SETUP_WALLET]: 'Setup' } export const ptBR = { @@ -125,7 +130,9 @@ export const ptBR = { [ID_WAITING_FOR_CONFS]: 'Esperando confirmações...', [ID_NONE_SELECTED]: 'nenhuma selecionado', [ID_REGISTRATION_FEE_SUCCESS]: 'Sucesso no pagamento da taxa de registro!', - [ID_API_ERROR]: 'Erro de API' + [ID_API_ERROR]: 'Erro de API', + [ID_WALLET_READY]: 'Escolher', + [ID_SETUP_WALLET]: 'Configurar' } export const zhCN = { @@ -169,7 +176,9 @@ export const zhCN = { [ID_WAITING_FOR_CONFS]: 'Waiting for confirmations...', // TODO - shows when the registration fee transaction is waiting to be mined (needs confirmations) [ID_NONE_SELECTED]: 'none selected', // TODO - looks unused, but this indicates nothing is selected in some list [ID_REGISTRATION_FEE_SUCCESS]: 'Registration fee payment successful!', // TODO - When the registration fee transaction reaches the required number of confirmations, this is shown - [ID_API_ERROR]: '接口错误' + [ID_API_ERROR]: '接口错误', + [ID_WALLET_READY]: 'Choose Wallet', // xxx translate + [ID_SETUP_WALLET]: 'Setup' // xxx translate } const localesMap = { diff --git a/client/webserver/site/src/js/markets.js b/client/webserver/site/src/js/markets.js index 9e5692467c..e770550c76 100644 --- a/client/webserver/site/src/js/markets.js +++ b/client/webserver/site/src/js/markets.js @@ -1283,7 +1283,7 @@ export default class MarketsPage extends BasePage { showCreate (asset) { const page = this.page this.currentCreate = asset - this.walletForm.setAsset(asset) + this.walletForm.setAsset(asset.id) this.showForm(page.walletForm) this.walletForm.loadDefaults() } diff --git a/client/webserver/site/src/js/register.js b/client/webserver/site/src/js/register.js index e05eed237b..42d7e68b95 100644 --- a/client/webserver/site/src/js/register.js +++ b/client/webserver/site/src/js/register.js @@ -1,10 +1,9 @@ import Doc from './doc' import BasePage from './basepage' import { postJSON } from './http' -import { NewWalletForm, UnlockWalletForm, DEXAddressForm, ConfirmRegistrationForm, bind as bindForm } from './forms' +import { NewWalletForm, DEXAddressForm, ConfirmRegistrationForm, bind as bindForm } from './forms' import * as intl from './locales' -const DCR_ID = 42 const animationLength = 300 let app @@ -40,36 +39,12 @@ export default class RegistrationPage extends BasePage { Doc.hide(page.showSeedRestore) }) - // NEW DCR WALLET - // This form is only shown if there is no DCR wallet yet. this.walletForm = new NewWalletForm(app, page.newWalletForm, () => { - this.dexAddrForm.refresh() - this.changeForm(page.newWalletForm, page.dexAddrForm) - }, this.pwCache) - - // OPEN DCR WALLET - // This form is only shown if there is a wallet, but it's not open. - this.unlockForm = new UnlockWalletForm(app, page.unlockWalletForm, () => { - this.dexAddrForm.refresh() - this.changeForm(page.unlockWalletForm, page.dexAddrForm) - }, this.pwCache) - + this.confirmRegisterForm.refresh() + this.changeForm(page.newWalletForm, page.confirmRegForm) + }, this.pwCache, () => this.changeForm(page.newWalletForm, page.confirmRegForm)) // ADD DEX this.dexAddrForm = new DEXAddressForm(app, page.dexAddrForm, async (xc) => { - const fee = xc.feeAsset.amount // DCR, special - const balanceFeeRegistration = app.user.assets[DCR_ID].wallet.balance.available - if (balanceFeeRegistration < fee) { - const errorMsg = `Looks like there is not enough funds for - paying the registration fee. Amount needed: - ${Doc.formatCoinValue(fee / 1e8)} Amount available: - ${Doc.formatCoinValue(balanceFeeRegistration / 1e8)}. - - Deposit funds and try again.` - page.regFundsErr.textContent = errorMsg - Doc.show(page.regFundsErr) - await this.changeForm(page.dexAddrForm, page.failedRegForm) - return - } this.confirmRegisterForm.setExchange(xc) await this.changeForm(page.dexAddrForm, page.confirmRegForm) }, this.pwCache) @@ -82,7 +57,12 @@ export default class RegistrationPage extends BasePage { getDexAddr: () => this.getDexAddr() }, () => this.registerDEXSuccess(), - (msg) => this.registerDEXFundsFail(msg)) + (msg) => this.registerDEXFundsFail(msg), + (assetId) => { + this.walletForm.setAsset(assetId) + this.walletForm.loadDefaults() + this.changeForm(page.confirmRegForm, page.newWalletForm) + }) // Attempt to load the dcrwallet configuration from the default location. if (app.user.authed) this.auth() } @@ -94,9 +74,6 @@ export default class RegistrationPage extends BasePage { // auth should be called once user is known to be authed with the server. async auth () { await app.fetchUser() - this.walletForm.setAsset(app.assets[DCR_ID]) - this.unlockForm.setAsset(app.assets[DCR_ID]) - this.walletForm.loadDefaults() } /* Swap this currently displayed form1 for form2 with an animation. */ @@ -156,12 +133,12 @@ export default class RegistrationPage extends BasePage { Doc.show(page.appPWErrMsg) return } - if (seed) this.walletForm.setRegMsg('Your Decred wallet is required') this.pwCache.pw = pw this.auth() app.updateMenuItemsDisplay() this.walletForm.refresh() - await this.changeForm(page.appPWForm, page.newWalletForm) + this.dexAddrForm.refresh() + await this.changeForm(page.appPWForm, page.dexAddrForm) } /* gets the contents of the cert file */ diff --git a/client/webserver/site/src/js/wallets.js b/client/webserver/site/src/js/wallets.js index caac1d2a79..1d2831626f 100644 --- a/client/webserver/site/src/js/wallets.js +++ b/client/webserver/site/src/js/wallets.js @@ -239,10 +239,9 @@ export default class WalletsPage extends BasePage { async showNewWallet (assetID) { const page = this.page const box = page.walletForm - const asset = app.assets[assetID] await this.hideBox() this.walletAsset = this.lastFormAsset = assetID - this.walletForm.setAsset(asset) + this.walletForm.setAsset(assetID) this.animation = this.showBox(box) await this.walletForm.loadDefaults() } diff --git a/client/webserver/site/src/localized_html/en-US/forms.tmpl b/client/webserver/site/src/localized_html/en-US/forms.tmpl index 2454dc674a..520b8d52e9 100644 --- a/client/webserver/site/src/localized_html/en-US/forms.tmpl +++ b/client/webserver/site/src/localized_html/en-US/forms.tmpl @@ -38,34 +38,18 @@
- {{if .}} -
{{.}}
-
- {{end}}
{{template "walletConfigTemplates"}}

- {{if .}} - -
This is the password you have configured with your wallet software.
- {{else}} - {{end}}
- {{if .}} - -
Your app password is always required when performing sensitive wallet operations.
- {{else}} - {{end}}
@@ -122,7 +106,7 @@
-
+
@@ -143,7 +127,44 @@
Enter your app password to confirm DEX registration. - When you submit this form, DCR will be spent from your Decred wallet to pay registration fees. + When you submit this form, funds will be spent from your chosen wallet to pay the registration fee. +
+
+ This DEX accepts the following fees: +
+ + + + + + + + + + + + + + + + +
AssetFeeConfs
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + +
This DEX provides the following markets: @@ -181,7 +202,7 @@
- +
diff --git a/client/webserver/site/src/localized_html/en-US/register.tmpl b/client/webserver/site/src/localized_html/en-US/register.tmpl index 99fd512df0..485150287b 100644 --- a/client/webserver/site/src/localized_html/en-US/register.tmpl +++ b/client/webserver/site/src/localized_html/en-US/register.tmpl @@ -4,7 +4,7 @@
{{- /* Set up the initial application password. Only shown if app is not already initialized. */ -}} - +
Set App Password
Set your app password. This password will protect your DEX account keys and connected wallets.
@@ -34,18 +34,13 @@
- {{- /* Set up the Decred wallet. Only shown if user has not connected their Decred wallet. */ -}} -
- {{template "newWalletForm" "Your Decred wallet is required to pay registration fees."}} -
- - {{- /* Unlock wallet. Only shown if not already unlocked. */ -}} -
- {{template "unlockWalletForm" "Unlock your Decred wallet to pay registration fees."}} + {{- /* Form to set up a wallet. Shown on demand when a user clicks a setupWallet button. */ -}} + + {{template "newWalletForm" }}
{{- /* DEX ADDRESS FORM */ -}} -
+ {{template "dexAddrForm"}}
diff --git a/client/webserver/site/src/localized_html/pt-BR/forms.tmpl b/client/webserver/site/src/localized_html/pt-BR/forms.tmpl index 8daacf1af9..2d5d737c50 100644 --- a/client/webserver/site/src/localized_html/pt-BR/forms.tmpl +++ b/client/webserver/site/src/localized_html/pt-BR/forms.tmpl @@ -38,34 +38,18 @@
- {{if .}} -
{{.}}
-
- {{end}}
{{template "walletConfigTemplates"}}

- {{if .}} - -
Este é a senha que você configurou com o software de sua carteira.
- {{else}} - {{end}}
- {{if .}} - -
Sua senha do app é sempre necessária quando performando operações sensíveis da carteira.
- {{else}} - {{end}}
@@ -122,7 +106,7 @@
-
+
@@ -145,6 +129,43 @@ Informe sua senha do app para confirmar seu registro na DEX. Quando vc enviar esse formulário, DCR será gasto de sua carteira decred para pagar a taxa de registro.
+
+ This DEX accepts the following fees: + + + + + + + + + + + + + + + + + +
AssetFeeConfs
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + +
+
Essa DEX provê os seguintes mercados: @@ -181,7 +202,7 @@
- +
diff --git a/client/webserver/site/src/localized_html/pt-BR/register.tmpl b/client/webserver/site/src/localized_html/pt-BR/register.tmpl index d1fd460270..8768edb8b7 100644 --- a/client/webserver/site/src/localized_html/pt-BR/register.tmpl +++ b/client/webserver/site/src/localized_html/pt-BR/register.tmpl @@ -4,7 +4,7 @@
{{- /* Set up the initial application password. Only shown if app is not already initialized. */ -}} -
+
Definir senha de aplicativo
Definir senha de aplicativo. Esta senha protegerá sua conta DEX e chaves e carteiras conectadas.
@@ -34,18 +34,13 @@
- {{- /* Set up the Decred wallet. Only shown if user has not connected their Decred wallet. */ -}} -
- {{template "newWalletForm" "Sua carteira decred é necessária para pagar a taxa de registro."}} - - - {{- /* Unlock wallet. Only shown if not already unlocked. */ -}} -
- {{template "unlockWalletForm" "Desbloqueie sua carteira decred para pagamento da taxa."}} + {{- /* Form to set up a wallet. Shown on demand when a user clicks a setupWallet button. */ -}} + + {{template "newWalletForm" }} {{- /* DEX ADDRESS FORM */ -}} -
+ {{template "dexAddrForm"}} diff --git a/client/webserver/site/src/localized_html/zh-CN/forms.tmpl b/client/webserver/site/src/localized_html/zh-CN/forms.tmpl index aaebee4557..f2ec5aa19e 100644 --- a/client/webserver/site/src/localized_html/zh-CN/forms.tmpl +++ b/client/webserver/site/src/localized_html/zh-CN/forms.tmpl @@ -38,34 +38,18 @@
- {{if .}} -
{{.}}
-
- {{end}}
{{template "walletConfigTemplates"}}

- {{if .}} - -
这是您用钱包中的软件配置的密码。
- {{else}} - {{end}}
- {{if .}} - -
执行敏感投资操作时,需要输入您的应用程序密码。
- {{else}} - {{end}}
@@ -122,7 +106,7 @@
-
+
@@ -145,6 +129,43 @@ 输入应用程序密码以确认注册DEX。 当您发送此表格时, DCR将从您指定的钱包中支出,以支付注册费。
+
+ This DEX accepts the following fees: +
+ + + + + + + + + + + + + + + + +
AssetFeeConfs
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + +
+
当前DEX提供以下市场: @@ -181,7 +202,7 @@
- +
diff --git a/client/webserver/site/src/localized_html/zh-CN/register.tmpl b/client/webserver/site/src/localized_html/zh-CN/register.tmpl index 341dd00221..ad1418e0d1 100644 --- a/client/webserver/site/src/localized_html/zh-CN/register.tmpl +++ b/client/webserver/site/src/localized_html/zh-CN/register.tmpl @@ -4,7 +4,7 @@
{{- /* Set up the initial application password. Only shown if app is not already initialized. */ -}} -
+
设置应用密码
设置应用密码。这个密码将保护你的 DEX 账户和连接的密钥和钱包。
@@ -34,18 +34,13 @@
- {{- /* Set up the Decred wallet. Only shown if user has not connected their Decred wallet. */ -}} -
- {{template "newWalletForm" "你的 decred 钱包需要支付注册费。"}} - - - {{- /* Unlock wallet. Only shown if not already unlocked. */ -}} -
- {{template "unlockWalletForm" "解锁你的 decred 钱包以支付费用。"}} + {{- /* Form to set up a wallet. Shown on demand when a user clicks a setupWallet button. */ -}} + + {{template "newWalletForm" }} {{- /* DEX ADDRESS FORM */ -}} -
+ {{template "dexAddrForm"}}