在登录页添加一个按钮来新建助记词,免得每次都翻文档找一个Mnemonic,但是还没有成功。
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
login: {
|
||||
title: 'TIC Node Console',
|
||||
inputLabel: '请输入密语,例如:Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, molestias, quisquam?',
|
||||
loginBtn: 'Sign in',
|
||||
errorMnemonic: 'Invalid secret word',
|
||||
loginBtn: 'Sign In',
|
||||
secwordBtn: 'Create Secword',
|
||||
errorMnemonic: 'Invalid Secret Word',
|
||||
},
|
||||
home: {
|
||||
titleOwner: 'Owner',
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
title: 'TIC Node 节点控制台',
|
||||
inputLabel: '请输入密语,例如:Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, molestias, quisquam?',
|
||||
loginBtn: '登录',
|
||||
secwordBtn: '新密语',
|
||||
errorMnemonic: '输入的密语无效',
|
||||
},
|
||||
home: {
|
||||
|
||||
@@ -4,3 +4,4 @@ export const secword2PubKey = secword => ticCrypto.seckey2pubkey(secword)
|
||||
export const secword2Address = secword => ticCrypto.secword2address(secword)
|
||||
export const isAddress = address => ticCrypto.isAddress(address)
|
||||
export const secword2Account = secword => ticCrypto.secword2account(secword)
|
||||
export const randomSecword = lang => ticCrypto.randomSecword(lang)
|
||||
|
||||
@@ -8,4 +8,5 @@ export default {
|
||||
secword2Address: async secword => instance.secword2Address(secword),
|
||||
isAddress: async address => instance.isAddress(address),
|
||||
secword2Account: async secword => instance.secword2Account(secword),
|
||||
randomSecword: async lang => instance.randomSecword(lang),
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import axios from 'axios'
|
||||
import app from './app'
|
||||
// import app from './app'
|
||||
|
||||
axios.defaults.baseURL = app.dev ? 'http://test-jp.bittic.net:6842/api/' : 'http://test-sg.bittic.net:6842/api/'
|
||||
// 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台,或者访问用户自己设置的主机。
|
||||
axios.defaults.baseURL = 'http://localhost:6842/api/'
|
||||
|
||||
@@ -46,5 +46,12 @@ export default {
|
||||
commit('updateError', i18n.t('login.errorMnemonic'))
|
||||
}
|
||||
},
|
||||
async createSecword({ state, commit }) {
|
||||
alert('entering createSecword')
|
||||
let secword = await ticApi.randomSecword('English')
|
||||
alert('after secword')
|
||||
console.info('secword=' + secword)
|
||||
alert('secword=' + secword)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
item-text="label"
|
||||
/>
|
||||
|
||||
<v-btn :loading="renewing" dark large color="transparent" @click="createSecword">
|
||||
{{ $t('login.secwordBtn') }}
|
||||
</v-btn>
|
||||
|
||||
<v-btn :loading="signing" dark large color="transparent" @click="login">
|
||||
{{ $t('login.loginBtn') }}
|
||||
</v-btn>
|
||||
@@ -65,6 +69,7 @@ export default {
|
||||
]),
|
||||
...mapActions([
|
||||
'login',
|
||||
'createSecword',
|
||||
]),
|
||||
...mapRootActions([
|
||||
'updateCurrentLang',
|
||||
|
||||
Reference in New Issue
Block a user