use ceil instead of floor on cooldown box for tosya
This commit is contained in:
parent
cb2076eb48
commit
897b56a9b9
|
@ -14,10 +14,8 @@ import type { State } from '../reducers';
|
||||||
|
|
||||||
const CoolDownBox = ({ coolDown }) => (
|
const CoolDownBox = ({ coolDown }) => (
|
||||||
<div
|
<div
|
||||||
className="cooldownbox"
|
className={(coolDown && coolDown >= 300)
|
||||||
style={{
|
? 'cooldownbox show' : 'cooldownbox'}
|
||||||
display: (coolDown >= 1000) ? 'block' : 'none',
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{coolDown && durationToString(coolDown, true)}
|
{coolDown && durationToString(coolDown, true)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -163,7 +163,7 @@ export function durationToString(
|
||||||
ms: number,
|
ms: number,
|
||||||
smallest: boolean = false,
|
smallest: boolean = false,
|
||||||
): string {
|
): string {
|
||||||
const seconds = Math.floor(ms / 1000);
|
const seconds = Math.ceil(ms / 1000);
|
||||||
let timestring: string;
|
let timestring: string;
|
||||||
if (seconds < 60 && smallest) {
|
if (seconds < 60 && smallest) {
|
||||||
timestring = seconds;
|
timestring = seconds;
|
||||||
|
|
|
@ -469,7 +469,7 @@ tr:nth-child(even) {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notifybox.show {
|
.notifybox.show, .cooldownbox.show {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -494,6 +494,9 @@ tr:nth-child(even) {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
transition: visibility 0.3s, opacity 0.3s linear;
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actionbuttons {
|
.actionbuttons {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user