Porównaj commity

...

6 Commity

Autor SHA1 Wiadomość Data
NEETzsche 235463a6fc Merge branch 'neetzsche/fix-poll-bug' into 'main'
Fix poll percentage bug

See merge request soapbox-pub/soapbox!2917
2024-04-19 22:50:19 +00:00
marcin mikołajczak b8093ace04 Merge branch 'black-mode' into 'main'
Black theme: set counter ring color

See merge request soapbox-pub/soapbox!2998
2024-04-18 22:10:54 +00:00
marcin mikołajczak 1b73a1fbc3 Black theme: set counter ring color
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-18 23:51:04 +02:00
Alex Gleason 87d04e6a0c Merge branch 'fix-badge-crash' into 'main'
Badge: fix page crash when color isn't defined

Closes #1650

See merge request soapbox-pub/soapbox!2996
2024-04-16 20:53:29 +00:00
Alex Gleason b86da5f426
Badge: fix page crash when color isn't defined
Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1650
2024-04-16 15:35:50 -05:00
NEETzsche 39222e0716 Fix poll percentage bug 2024-01-10 21:48:46 -07:00
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -13,7 +13,9 @@ const Badge: React.FC<IBadge> = ({ title, slug, color }) => {
const fallback = !['patron', 'admin', 'moderator', 'opaque', 'badge:donor'].includes(slug);
const isDark = useMemo(() => {
const hsl = hexToHsl(color!);
if (!color) return false;
const hsl = hexToHsl(color);
if (hsl && hsl.l > 50) return false;

Wyświetl plik

@ -111,7 +111,7 @@ const PollOption: React.FC<IPollOption> = (props): JSX.Element | null => {
if (!poll) return null;
const pollVotesCount = poll.voters_count || poll.votes_count;
const pollVotesCount = poll.votes_count || poll.voters_count;
const percent = pollVotesCount === 0 ? 0 : (option.votes_count / pollVotesCount) * 100;
const voted = poll.own_votes?.includes(index);
const message = intl.formatMessage(messages.votes, { votes: option.votes_count });

Wyświetl plik

@ -12,7 +12,7 @@ interface ICounter {
/** A simple counter for notifications, etc. */
const Counter: React.FC<ICounter> = ({ count, countMax }) => {
return (
<span className='flex h-5 min-w-[20px] max-w-[26px] items-center justify-center rounded-full bg-secondary-500 text-xs font-medium text-white ring-2 ring-white dark:ring-gray-800'>
<span className='flex h-5 min-w-[20px] max-w-[26px] items-center justify-center rounded-full bg-secondary-500 text-xs font-medium text-white ring-2 ring-white black:ring-black dark:ring-gray-800'>
{shortNumberFormat(count, countMax)}
</span>
);