mirror of
https://github.com/seigler/dash-platform-console
synced 2025-07-26 17:16:10 +00:00
Add account disconnection on init error
This commit is contained in:
parent
6c1dccdeb4
commit
8db5bb1728
2 changed files with 18 additions and 6 deletions
|
@ -108,6 +108,7 @@ export default new Vuex.Store({
|
||||||
console.error(e);
|
console.error(e);
|
||||||
commit('setError', e);
|
commit('setError', e);
|
||||||
commit('setSyncing', false);
|
commit('setSyncing', false);
|
||||||
|
demoSDK.account.disconnect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,10 +123,11 @@ export default new Vuex.Store({
|
||||||
getters: {
|
getters: {
|
||||||
identityLists(state) {
|
identityLists(state) {
|
||||||
const { identities } = state;
|
const { identities } = state;
|
||||||
return Object.keys(identityTypes).map(typeName => ({
|
const lists = Object.keys(identityTypes).map(typeName => ({
|
||||||
type: identityTypes[typeName],
|
type: identityTypes[typeName],
|
||||||
items: identities[typeName],
|
items: identities[typeName],
|
||||||
}));
|
}));
|
||||||
|
return lists;
|
||||||
},
|
},
|
||||||
userIdentitiesWithNames(state) {
|
userIdentitiesWithNames(state) {
|
||||||
const { user } = state.identities;
|
const { user } = state.identities;
|
||||||
|
@ -141,6 +143,15 @@ export default new Vuex.Store({
|
||||||
contract: state.contracts[identity.id],
|
contract: state.contracts[identity.id],
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
errorDetails(state) {
|
||||||
|
return state.errorDetails;
|
||||||
|
},
|
||||||
|
isSyncing(state) {
|
||||||
|
return state.isSyncing;
|
||||||
|
},
|
||||||
|
isError(state) {
|
||||||
|
return state.isError;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: [createPersistedState()],
|
plugins: [createPersistedState()],
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<v-container>
|
<v-container>
|
||||||
|
|
||||||
<v-row>
|
<v-row v-show="isError">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
Error occurred
|
Error occurred
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
Text is here
|
{{errorDetails ? errorDetails.message : ''}}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row>
|
<v-row v-show="isSyncing">
|
||||||
<v-card>
|
<v-card loading="primary">
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
Wallet is syncing
|
Wallet is syncing
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
@ -23,7 +23,8 @@
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row>
|
<v-row v-show="!isSyncing && !isError">
|
||||||
|
{{identityLists}}
|
||||||
<v-col
|
<v-col
|
||||||
v-for="list in identityLists"
|
v-for="list in identityLists"
|
||||||
:key="list.type.value"
|
:key="list.type.value"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue