Browse Source

Add missing stuff for restore UI (#11)

Clear restore key on page destroy

Do not show stop action on already stopped bubble

Rename isWaitingRestoring

Use ctime instead of creationTime in backup objects

Co-authored-by: Kristijan Mitrovic <kmitrovic@itekako.com>
Reviewed-on: https://git.bubblev.org/bubblev/bubble-web/pulls/11
feature/upgrade_jar
Kristijan Mitrovic 4 years ago
committed by jonathan
parent
commit
0e85fa8804
5 changed files with 18 additions and 15 deletions
  1. +1
    -1
      src/_store/account.module.js
  2. +1
    -1
      src/_store/system.module.js
  3. +14
    -11
      src/account/NetworkPage.vue
  4. +1
    -1
      src/app/App.vue
  5. +1
    -1
      src/auth/RestorePage.vue

+ 1
- 1
src/_store/account.module.js View File

@@ -118,7 +118,7 @@ const actions = {
.then(
ok => {
commit('restoreSuccess');
systemConfigs.isWaitingRestoring = false;
systemConfigs.awaitingRestore = false;
},
error => commit('restoreFailure', error)
);


+ 1
- 1
src/_store/system.module.js View File

@@ -21,7 +21,7 @@ const state = {
launchLock: null,
promoCodePolicy: null,
requireSendMetrics: null,
isWaitingRestoring: false,
awaitingRestore: false,
support: {},
securityLevels: null
},


+ 14
- 11
src/account/NetworkPage.vue View File

@@ -119,17 +119,19 @@
<div v-if="errors.has('node')" class="invalid-feedback d-block">{{ errors.first('node') }}</div>
<div v-if="errors.has('accountPlan')" class="invalid-feedback d-block">{{ errors.first('accountPlan') }}</div>

<div v-if="network.state !== 'stopping' && backups && backups.length > 0" style="border: 2px solid #000;">
<button @click="stopNet()" class="btn btn-danger" :disabled="loading && loading.stopping">
{{messages.link_network_action_stop}}
</button>
<img v-show="loading && loading.stopping" :src="loadingImgSrc" />
{{messages.link_network_action_stop_description}}
<span v-if="network.state !== 'stopping' && network.state !== 'stopped' && backups && backups.length > 0">
<div style="border: 2px solid #000;">
<button @click="stopNet()" class="btn btn-danger" :disabled="loading && loading.stopping">
{{messages.link_network_action_stop}}
</button>
<img v-show="loading && loading.stopping" :src="loadingImgSrc" />
{{messages.link_network_action_stop_description}}

<!-- the next condition is to prevent this info shown twice on this page -->
<span v-if="!isSelfNetAndRunning" v-html="latestBackupInfoHtml"></span>
</div>
<br/>
<!-- the next condition is to prevent this info shown twice on this page -->
<span v-if="!isSelfNetAndRunning" v-html="latestBackupInfoHtml"></span>
</div>
<br/>
</span>
<div style="border: 2px solid #000;">
<button @click="deleteNet()" class="btn btn-danger" :disabled="loading && loading.deleting">
{{messages.link_network_action_delete}}
@@ -203,7 +205,7 @@
let lastBackup = this.backups[0];
return '<hr/>' + this.messages.label_latest_backup
+ " " + lastBackup.label + " <i>" + lastBackup.status + "</i> "
+ this.messages.date_format_app_data_epoch_time.parseDateMessage(lastBackup.creationTime,
+ this.messages.date_format_app_data_epoch_time.parseDateMessage(lastBackup.ctime,
this.messages);
}
},
@@ -339,6 +341,7 @@
beforeDestroy () {
this.clearRefresherInterval(this.refresher);
this.clearRefresherInterval(this.stopRefresher);
this.restoreKey = null;
},
watch: {
network (net) {


+ 1
- 1
src/app/App.vue View File

@@ -92,7 +92,7 @@ export default {
},
locales () { return this.configs.locales; },
path () { return this.$route.path; },
isInRestoringMode () { return this.configs ? this.configs.isWaitingRestoring : undefined; }
isInRestoringMode () { return this.configs ? this.configs.awaitingRestore : undefined; }
},
methods: {
...mapActions({ clearAlert: 'alert/clear' }),


+ 1
- 1
src/auth/RestorePage.vue View File

@@ -5,7 +5,7 @@

<div v-if="!configs"><img :src="loadingImgSrc" /></div>

<div v-else-if="!configs.isWaitingRestoring" class="alert alert-info">
<div v-else-if="!configs.awaitingRestore" class="alert alert-info">
{{ messages.message_restore_not_applicable }}<hr/>
<a href="/">{{ messages.message_back_to_root }}</a>
</div>


Loading…
Cancel
Save