diff options
author | Suvarna Sivadas <31803071+Suvarna221B@users.noreply.github.com> | 2021-10-25 20:28:00 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 20:28:00 +0530 |
commit | ef0c253f87f9fa11382eeaa913e5e676afde7be5 (patch) | |
tree | f5e3cfd038347466c9d96d530dabfcffcb569c99 | |
parent | 5.6.3-nightly.42 [skip ci] (diff) | |
download | ferdium-app-ef0c253f87f9fa11382eeaa913e5e676afde7be5.tar.gz ferdium-app-ef0c253f87f9fa11382eeaa913e5e676afde7be5.tar.zst ferdium-app-ef0c253f87f9fa11382eeaa913e5e676afde7be5.zip |
Show error indicator when the service fails to load (#2124)
Co-authored-by: Johan K Mathew <johankmathew@gmail.com>
-rw-r--r-- | src/components/services/tabs/TabItem.js | 9 | ||||
-rw-r--r-- | src/styles/tabs.scss | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index ed8430b89..455d2549a 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -331,6 +331,13 @@ class TabItem extends Component { | |||
331 | ); | 331 | ); |
332 | } | 332 | } |
333 | 333 | ||
334 | let errorBadge = null; | ||
335 | if ( service.isError ) { | ||
336 | errorBadge=( | ||
337 | <i className = " mdi mdi-exclamation tab-item__error-icon"/> | ||
338 | ) | ||
339 | } | ||
340 | |||
334 | return ( | 341 | return ( |
335 | <li | 342 | <li |
336 | className={classnames({ | 343 | className={classnames({ |
@@ -349,8 +356,10 @@ class TabItem extends Component { | |||
349 | : '' | 356 | : '' |
350 | }`} | 357 | }`} |
351 | > | 358 | > |
359 | |||
352 | <img src={service.icon} className="tab-item__icon" alt="" /> | 360 | <img src={service.icon} className="tab-item__icon" alt="" /> |
353 | {notificationBadge} | 361 | {notificationBadge} |
362 | {errorBadge} | ||
354 | {IS_SERVICE_DEBUGGING_ENABLED && ( | 363 | {IS_SERVICE_DEBUGGING_ENABLED && ( |
355 | <> | 364 | <> |
356 | <div | 365 | <div |
diff --git a/src/styles/tabs.scss b/src/styles/tabs.scss index 16318b9f6..b7f1a9e11 100644 --- a/src/styles/tabs.scss +++ b/src/styles/tabs.scss | |||
@@ -136,4 +136,13 @@ | |||
136 | &.is-reordering { | 136 | &.is-reordering { |
137 | z-index: 99999; | 137 | z-index: 99999; |
138 | } | 138 | } |
139 | |||
140 | .tab-item__error-icon{ | ||
141 | font-size: 1.9em; | ||
142 | color: red; | ||
143 | position: absolute; | ||
144 | top: 6px; | ||
145 | right: 0px; | ||
146 | transform: scaleX(1.5); | ||
147 | } | ||
139 | } | 148 | } |