From ba6ca3cd69118a764628cc4ee0269293aedc8ee0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 5 Mar 2019 03:51:18 +0100 Subject: [PATCH] Fix various issues in polls Port front-end changes from a198add83bb527c32fa0e01404338562b157da99 to glitch-soc --- app/javascript/flavours/glitch/components/poll.js | 5 +++-- app/javascript/flavours/glitch/styles/polls.scss | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js index e9124aefa7..182491af86 100644 --- a/app/javascript/flavours/glitch/components/poll.js +++ b/app/javascript/flavours/glitch/components/poll.js @@ -118,7 +118,7 @@ class Poll extends ImmutablePureComponent { /> {!showResults && } - {showResults && {Math.floor(percent)}%} + {showResults && {Math.round(percent)}%} {option.get('title')} @@ -146,7 +146,8 @@ class Poll extends ImmutablePureComponent {
{!showResults && } {showResults && !this.props.disabled && · } - · {timeRemaining} + + {poll.get('expires_at') && · {timeRemaining}}
); diff --git a/app/javascript/flavours/glitch/styles/polls.scss b/app/javascript/flavours/glitch/styles/polls.scss index f424965594..7c6e61d630 100644 --- a/app/javascript/flavours/glitch/styles/polls.scss +++ b/app/javascript/flavours/glitch/styles/polls.scss @@ -82,6 +82,7 @@ border: 0; color: $dark-text-color; text-decoration: underline; + font-size: inherit; &:hover, &:focus,