@@ -124,28 +124,70 @@ function ScreenStatus({ screen, handleInput = () => {}, mode = "default" }) {
124124 ) ;
125125 }
126126
127+ if (
128+ status . releaseTimestamp === null ||
129+ status . releaseVersion === null ||
130+ status . latestRequestDateTime === null
131+ ) {
132+ return (
133+ < FontAwesomeIcon
134+ icon = { faInfoCircle }
135+ className = "text-warning"
136+ title = { t ( "no-info" ) }
137+ />
138+ ) ;
139+ }
140+
127141 const latestRequest = dayjs ( status . latestRequestDateTime ) ;
128- const inOneHour = dayjs ( ) . add ( 1 , "hours" ) ;
142+ const oneHourAgo = dayjs ( ) . subtract ( 1 , "hours" ) ;
143+
144+ if ( status ?. clientMeta ?. tokenExpired ) {
145+ return (
146+ < FontAwesomeIcon
147+ icon = { faExclamationCircle }
148+ className = "text-danger"
149+ title = { t ( "token-expired" ) }
150+ />
151+ ) ;
152+ }
129153
130- if ( status ?. clientMeta ?. tokenExpired || latestRequest > inOneHour ) {
154+ if ( latestRequest < oneHourAgo ) {
131155 return (
132- < FontAwesomeIcon icon = { faExclamationCircle } className = "text-danger" />
156+ < FontAwesomeIcon
157+ icon = { faExclamationCircle }
158+ className = "text-danger"
159+ title = { t ( "no-communication-since" , {
160+ ts : latestRequest . format ( "D/M YYYY HH:mm" ) ,
161+ } ) }
162+ />
133163 ) ;
134164 }
135165
136166 if ( clientRelease ) {
137167 if ( status ?. releaseVersion !== clientRelease ?. releaseVersion ) {
138- return < FontAwesomeIcon icon = { faInfoCircle } className = "text-warning" /> ;
168+ return (
169+ < FontAwesomeIcon
170+ icon = { faInfoCircle }
171+ className = "text-warning"
172+ title = { t ( "release-warning" ) }
173+ />
174+ ) ;
139175 }
140176
141177 if ( status ?. releaseTimestamp !== clientRelease ?. releaseTimestamp ) {
142- return < FontAwesomeIcon icon = { faInfoCircle } className = "text-warning" /> ;
178+ return (
179+ < FontAwesomeIcon
180+ icon = { faInfoCircle }
181+ className = "text-warning"
182+ title = { t ( "release-warning" ) }
183+ />
184+ ) ;
143185 }
144186 }
145187
146188 return (
147189 < div >
148- < FontAwesomeIcon icon = { faCheckCircle } className = "text-success" />
190+ < FontAwesomeIcon icon = { faCheckCircle } className = "text-success" title = { t ( 'ok' ) } />
149191 </ div >
150192 ) ;
151193 }
@@ -209,14 +251,14 @@ function ScreenStatus({ screen, handleInput = () => {}, mode = "default" }) {
209251 { status ?. latestRequestDateTime && (
210252 < li >
211253 { t ( "latest-request" ) } :{ " " }
212- { dayjs ( status ? .latestRequestDateTime ) . format (
254+ { dayjs ( status . latestRequestDateTime ) . format (
213255 "D/M YYYY HH:mm"
214256 ) }
215257 </ li >
216258 ) }
217259 { status ?. releaseVersion && (
218260 < li >
219- { t ( "release-version" ) } : { status ? .releaseVersion }
261+ { t ( "release-version" ) } : { status . releaseVersion }
220262 { notRunningLatestRelease && (
221263 < >
222264 { " " }
@@ -228,7 +270,7 @@ function ScreenStatus({ screen, handleInput = () => {}, mode = "default" }) {
228270 { status ?. releaseTimestamp && (
229271 < li >
230272 { t ( "release-timestamp" ) } :{ " " }
231- { dayjs ( status ? .releaseTimestamp * 1000 ) . format (
273+ { dayjs ( status . releaseTimestamp * 1000 ) . format (
232274 "D/M YYYY HH:mm"
233275 ) }
234276 { notRunningLatestRelease && (
0 commit comments