use ceil instead of floor on cooldown box for tosya

This commit is contained in:
HF 2020-05-13 04:55:32 +02:00
parent cb2076eb48
commit 897b56a9b9
3 changed files with 7 additions and 6 deletions

View File

@ -14,10 +14,8 @@ import type { State } from '../reducers';
const CoolDownBox = ({ coolDown }) => (
<div
className="cooldownbox"
style={{
display: (coolDown >= 1000) ? 'block' : 'none',
}}
className={(coolDown && coolDown >= 300)
? 'cooldownbox show' : 'cooldownbox'}
>
{coolDown && durationToString(coolDown, true)}
</div>

View File

@ -163,7 +163,7 @@ export function durationToString(
ms: number,
smallest: boolean = false,
): string {
const seconds = Math.floor(ms / 1000);
const seconds = Math.ceil(ms / 1000);
let timestring: string;
if (seconds < 60 && smallest) {
timestring = seconds;

View File

@ -469,7 +469,7 @@ tr:nth-child(even) {
opacity: 0;
}
.notifybox.show {
.notifybox.show, .cooldownbox.show {
visibility: visible;
opacity: 1;
}
@ -494,6 +494,9 @@ tr:nth-child(even) {
margin-left: auto;
margin-right: auto;
z-index: 2;
transition: visibility 0.3s, opacity 0.3s linear;
visibility: hidden;
opacity: 0;
}
.actionbuttons {