From 97da408abce2cbf5eb66a55ce89270f733db67f0 Mon Sep 17 00:00:00 2001 From: Stefan Schiessl Date: Wed, 17 Jul 2019 13:07:19 +0200 Subject: [PATCH] add different levels and add alert as well (5,10) Signed-off-by: Stefan Schiessl --- app/assets/stylesheets/themes/_theme-template.scss | 1 + app/components/Blockchain/Asset.jsx | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/themes/_theme-template.scss b/app/assets/stylesheets/themes/_theme-template.scss index d4856babba..482c1fa1bd 100644 --- a/app/assets/stylesheets/themes/_theme-template.scss +++ b/app/assets/stylesheets/themes/_theme-template.scss @@ -415,6 +415,7 @@ color: $warning-color; } .txtlabel.cancel, + .txtlabel.alert, .label.alert { color: $alert-color; } diff --git a/app/components/Blockchain/Asset.jsx b/app/components/Blockchain/Asset.jsx index 7713b4b3c2..fffe4a5873 100644 --- a/app/components/Blockchain/Asset.jsx +++ b/app/components/Blockchain/Asset.jsx @@ -1505,11 +1505,12 @@ class Asset extends React.Component { {this.formattedPrice(item, true)}( 1 || median_offset < -1 - ? "txtlabel warning" - : "txtlabel success" + Math.abs(median_offset) > 10 + ? "txtlabel alert" + : Math.abs(median_offset) > 5 + ? "txtlabel warning" + : "txtlabel success" } - style={{fontSize: "90%"}} > {median_offset}%