From 6746889fe833d1dd8703c519af148272e416a5c0 Mon Sep 17 00:00:00 2001 From: mbehzad Date: Fri, 27 Oct 2017 12:03:13 +0200 Subject: [PATCH] minor improvement: hides the navigation arrow to the next/previous build when it is currently at the last/first build. --- build/css/style.css | 7 +++++++ client/views/cards/Cards.jsx | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/build/css/style.css b/build/css/style.css index 42a259e..fd12054 100644 --- a/build/css/style.css +++ b/build/css/style.css @@ -353,6 +353,13 @@ a:hover { cursor: pointer; } +/* hide the arrow but allow it to take its space in the layout */ +.arrow.inactive { + opacity: 0; + pointer-events: none; + cursor: default; +} + /* SPINNER */ .loader, .loader:after { diff --git a/client/views/cards/Cards.jsx b/client/views/cards/Cards.jsx index f4a6194..ffd6034 100644 --- a/client/views/cards/Cards.jsx +++ b/client/views/cards/Cards.jsx @@ -55,7 +55,15 @@ class Cards extends React.Component { if (totalSize.toString().length > 3 && totalSize.toString().length < 7) totalSize = `${Math.floor(totalSize / 1000)}KB`; if (totalSize.toString().length > 6) totalSize = `${(totalSize / 1000000).toFixed(2)}MB`; - const indexData = {index + 1}; + // arrows to the next/prev build, + // hide arrow(s) if it is currently at the last/first build therefore no navigation posibility + const indexData = ( + + + {index + 1} + + + ); const cardData = [totalSize, chunksTotal, modulesTotal, assetsTotal, errorsTotal, indexData];