From 3f7ab3057c3da349dd6c1bdcb5c9a2c2235376d3 Mon Sep 17 00:00:00 2001 From: Kristijan Mitrovic Date: Wed, 1 Jul 2020 14:56:22 +0200 Subject: [PATCH] Show backup info in proper places only --- src/account/NetworkPage.vue | 46 +++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/src/account/NetworkPage.vue b/src/account/NetworkPage.vue index 2bd42e7..e4b7ccb 100644 --- a/src/account/NetworkPage.vue +++ b/src/account/NetworkPage.vue @@ -93,7 +93,7 @@ -
+
+ + + + +
+ +
@@ -166,22 +175,8 @@ {{messages.link_network_action_stop_description}} -
- {{ messages.label_latest_backup }} - - {{ messages.label_no_latest_backup }} - - {{ messages.label_latest_backup }} {{ backups[0].label }} {{ backups[0].status }} - {{ messages.date_format_app_data_epoch_time.parseDateMessage(backups[0]['creationTime'], messages) }} - - - - -
- -
+ +
@@ -241,6 +236,23 @@ let lastBackupStatus = this.backups[0].status; return lastBackupStatus !== 'queued' && lastBackupStatus !== 'backup_in_progress'; + }, + latestBackupInfoHtml: function() { + if (this.backups === null) { + return '
' + this.messages.label_latest_backup + ''; + } else if (this.backups.length === 0) { + return '
' + this.messages.label_no_latest_backup; + } else { + let lastBackup = this.backups[0]; + return '
' + this.messages.label_latest_backup + + " " + lastBackup.label + " " + lastBackup.status + " " + + this.messages.date_format_app_data_epoch_time.parseDateMessage(lastBackup.creationTime, + this.messages); + } + }, + isSelfNetAndRunning: function() { + return this.network.state === 'running' + && this.configs.networkUuid && this.network.uuid === this.configs.networkUuid; } }, methods: {