add colors on coin type

This commit is contained in:
liangping 2022-01-12 20:40:51 +08:00
parent a974b9929b
commit 41a9eb20a3

View File

@ -138,6 +138,21 @@
</validation-provider> </validation-provider>
</b-form-group> </b-form-group>
</b-col> </b-col>
<b-col
v-if="hdpath"
md="12"
>
<b-form-group
label="HD Path"
label-for="ir"
>
<b-form-input
id="ir"
:value="hdpath"
readonly
/>
</b-form-group>
</b-col>
<b-col <b-col
v-if="accounts" v-if="accounts"
md="12" md="12"
@ -191,12 +206,16 @@
variant="light-primary" variant="light-primary"
rounded="" rounded=""
/> />
{{ item.chain_name }} <span
v-b-tooltip.hover.v-primary
:title="`Coin Type: ${item.coin_type}`"
:class="hdpath.startsWith(`m/44'/${item.coin_type}`)?'text-success':'text-danger'"
> {{ item.chain_name }}</span>
</b-form-checkbox> </b-form-checkbox>
</b-col> </b-col>
</b-row> </b-row>
</div> </div>
<small class="text-danger">{{ errors[0] }}</small> <small class="text-success">{{ errors[0] }}</small>
</validation-provider> </validation-provider>
</b-form-group> </b-form-group>
</b-col> </b-col>
@ -214,7 +233,7 @@
class="mb-50" class="mb-50"
/> />
<h4 class="mb-0 ml-50"> <h4 class="mb-0 ml-50">
{{ name }} {{ name }} <small> {{ hdpath }}</small>
</h4> </h4>
</div> </div>
@ -274,6 +293,7 @@ import {
BInputGroup, BInputGroup,
BInputGroupPrepend, BInputGroupPrepend,
BFormRadioGroup, BFormRadioGroup,
VBTooltip,
} from 'bootstrap-vue' } from 'bootstrap-vue'
import { required } from '@validations' import { required } from '@validations'
import store from '@/store' import store from '@/store'
@ -302,6 +322,9 @@ export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
ToastificationContent, ToastificationContent,
}, },
directives: {
'b-tooltip': VBTooltip,
},
data() { data() {
return { return {
debug: '', debug: '',