169169 <b-col col cols =" 12" md =" 6" xl =" 4" >
170170 <card-widget header =" System" :loading =" isCheckingForUpdate || isUpdating" >
171171 <div class =" pt-2" >
172- <div class =" d-flex w-100 justify-content-between px-3 px-lg-4 mb-4 " >
172+ <div class =" d-flex w-100 justify-content-between px-3 px-lg-4 mb-1 " >
173173 <div class =" w-75" >
174174 <span class =" d-block" >Backup</span >
175175 <small class =" d-block" >
187187 tooltip =" Sorry, backup cannot be disabled for now"
188188 ></toggle-switch >
189189 </div >
190+ <div class =" px-3 px-lg-4 mb-4" v-if =" backupStatus.status" >
191+ <b-icon
192+ icon =" x-circle-fill"
193+ variant =" danger"
194+ class =" mr-1"
195+ v-if =" backupStatus.status === 'failed'"
196+ ></b-icon >
197+ <small style =" opacity : 0.4 " >
198+ Last backup
199+ <span v-if =" backupStatus.status === 'failed'" >failed</span >
200+ at {{ getReadableTime(backupStatus.timestamp) }}
201+ </small >
202+ </div >
203+ <div class =" mb-4" v-else ></div >
190204 </div >
191205 <div class =" pt-0" >
192206 <div class =" d-flex w-100 justify-content-between px-3 px-lg-4 mb-4" >
230244 </div >
231245 </div >
232246 <div class =" px-4 pb-4" >
233- <div class =" w-100 d-flex justify-content-between mb-2 " >
247+ <div class =" w-100 d-flex justify-content-between mb-1 " >
234248 <span class =" align-self-end" >Umbrel Version</span >
235249 <span class =" font-weight-normal mb-0" >{{ version }}</span >
236250 </div >
274288
275289<script >
276290import { mapState } from " vuex" ;
291+ import moment from " moment" ;
292+
277293import API from " @/helpers/api" ;
278294
279295import CardWidget from " @/components/CardWidget" ;
@@ -299,7 +315,8 @@ export default {
299315 version : state => state .system .version ,
300316 onionAddress : state => state .system .onionAddress ,
301317 availableUpdate : state => state .system .availableUpdate ,
302- updateStatus : state => state .system .updateStatus
318+ updateStatus : state => state .system .updateStatus ,
319+ backupStatus : state => state .system .backupStatus
303320 }),
304321 isAllowedToChangePassword () {
305322 if (! this .currentPassword ) {
@@ -320,8 +337,12 @@ export default {
320337 created () {
321338 this .$store .dispatch (" system/getOnionAddress" );
322339 this .$store .dispatch (" system/getVersion" );
340+ this .$store .dispatch (" system/getBackupStatus" );
323341 },
324342 methods: {
343+ getReadableTime (timestamp ) {
344+ return moment (timestamp).format (" MMM D, h:mm:ss a" );
345+ },
325346 async changePassword () {
326347 // disable on testnet
327348 if (window .location .hostname === " testnet.getumbrel.com" ) {
0 commit comments