diff --git a/src/_store/networks.module.js b/src/_store/networks.module.js index 9458862..ed2beaa 100644 --- a/src/_store/networks.module.js +++ b/src/_store/networks.module.js @@ -22,7 +22,8 @@ const state = { networkNodes: null, deletedNetwork: null, networkKeysRequested: null, - networkKeys: null + networkKeys: null, + restoreKey: null }; const actions = { @@ -221,13 +222,15 @@ const mutations = { state.error = error; }, - restoreNetworkRequest(state, id) { + restoreNetworkRequest(state, networkId) { state.loading.restoring = true; + state.restoreKey = null; }, - restoreNetworkSuccess(state, id) { + restoreNetworkSuccess(state, restoreNodeNotification) { + state.restoreKey = restoreNodeNotification.restoreKey; state.loading.restoring = false; }, - restoreNetworkFailure(state, { id, error }) { + restoreNetworkFailure(state, { restoreNodeNotification, error }) { state.loading.restoring = false; state.error = error; }, diff --git a/src/account/NetworkPage.vue b/src/account/NetworkPage.vue index a532dcb..a34ea9f 100644 --- a/src/account/NetworkPage.vue +++ b/src/account/NetworkPage.vue @@ -97,10 +97,15 @@
- - +
+ {{ messages.restore_key_label }} {{ restoreKey }} +
+
+ + +
{{ messages.button_description_restore }}
@@ -153,7 +158,7 @@ computed: { ...mapState('networks', [ 'network', 'newNodeNotification', 'networkStatuses', 'networkNodes', 'networkKeysRequested', - 'deletedNetwork', 'networkKeys', 'loading' + 'deletedNetwork', 'networkKeys', 'loading', 'restoreKey' ]), ...mapState('system', ['messages', 'configs']), showSetupHelp () {