classic-ui/modules/account/components/Settings/Actions.vue

61 lines
1.4 KiB
Vue
Raw Normal View History

2022-04-22 06:05:56 +03:00
<template>
<div class="action">
<div class="action-item">
<b-icon icon="account-wallet" size="is-large" />
<div class="desc">
{{ isLoggedIn ? $t('account.wallet.disconnect') : $t('account.wallet.desc') }}
</div>
2022-05-16 15:08:17 +03:00
<b-button
v-if="isLoggedIn"
type="is-primary"
outlined
data-test="button_disconnect_account"
@mousedown.prevent
@click="onLogOut"
>
2022-04-22 06:05:56 +03:00
{{ $t('account.wallet.logout') }}
</b-button>
2022-05-16 15:08:17 +03:00
<connect-button
v-else
outlined
action-text="account.wallet.connectWeb3"
data-test="button_connect_web3"
/>
2022-04-22 06:05:56 +03:00
</div>
<div class="action-item">
<b-icon icon="account-rpc" size="is-large" />
<div class="desc">
{{ $t('account.wallet.rpcDesc') }}
</div>
2022-05-16 15:08:17 +03:00
<b-button type="is-primary" data-test="button_change_rpc" outlined @click="onSettings">{{
$t('account.wallet.changeRpc')
}}</b-button>
2022-04-22 06:05:56 +03:00
</div>
</div>
</template>
<script>
import { walletComputed, walletActions } from '../../injectors'
import { openSettingsModal } from '../../modals'
import { ConnectButton } from '@/components/web3Connect'
export default {
components: {
ConnectButton
},
computed: {
...walletComputed
},
methods: {
...walletActions,
onSettings() {
openSettingsModal({
parent: this,
netId: this.netId
})
}
}
}
</script>