diff --git a/src/App.jsx b/src/App.jsx index 573c24c..6669ff9 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -27,6 +27,7 @@ export default class App extends Component { runningTaskCount: 0, isFetching: false, repoDescription: "", + isRepositoryConnected: false }; this.fetchTaskSummary = this.fetchTaskSummary.bind(this); @@ -58,6 +59,7 @@ export default class App extends Component { if (result.data.description) { this.setState({ repoDescription: result.data.description, + isRepositoryConnected: result.data.connected }); } }).catch(error => { /* ignore */ }); @@ -80,6 +82,7 @@ export default class App extends Component { // this is invoked via AppContext whenever repository is connected, disconnected, etc. repositoryUpdated(isConnected) { + this.setState({ isRepositoryConnected: isConnected }) if (isConnected) { window.location.replace("/snapshots"); } else { @@ -94,7 +97,7 @@ export default class App extends Component { } render() { - const { uiPrefs, runningTaskCount } = this.state; + const { uiPrefs, runningTaskCount, isRepositoryConnected } = this.state; return ( @@ -105,14 +108,19 @@ export default class App extends Component { diff --git a/src/utils/uiutil.jsx b/src/utils/uiutil.jsx index 944b480..ddcee21 100644 --- a/src/utils/uiutil.jsx +++ b/src/utils/uiutil.jsx @@ -1,4 +1,4 @@ -import { faBan, faCheck, faChevronLeft, faCopy, faExclamationCircle, faExclamationTriangle, faFolderOpen, faRectangleXmark, faTerminal} from '@fortawesome/free-solid-svg-icons'; +import { faBan, faCheck, faChevronLeft, faCopy, faExclamationCircle, faExclamationTriangle, faFolderOpen, faTerminal, faXmark } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import axios from 'axios'; import React, { useState } from 'react'; @@ -274,12 +274,10 @@ export function taskStatusSymbol(task) { case "RUNNING": return <> Running for {dur} -   - - ; - + case "SUCCESS": return

Finished in {dur}

;