hide-voters-for-reader

This commit is contained in:
Untone 2024-02-16 13:59:32 +03:00
parent 4d0291bd9f
commit cb2781bad8
3 changed files with 8 additions and 6 deletions

View File

@ -329,6 +329,7 @@
"Show more": "Show more", "Show more": "Show more",
"Show table of contents": "Show table of contents", "Show table of contents": "Show table of contents",
"Show": "Show", "Show": "Show",
"Sign in to see the voters": "Sign in to see the voters",
"Site search": "Site search", "Site search": "Site search",
"Slug": "Slug", "Slug": "Slug",
"Social networks": "Social networks", "Social networks": "Social networks",

View File

@ -351,6 +351,7 @@
"Show more": "Читать дальше", "Show more": "Читать дальше",
"Show table of contents": "Показать главление", "Show table of contents": "Показать главление",
"Show": "Показать", "Show": "Показать",
"Sign in to see the voters": "Войдите, чтобы видеть кто голосует",
"Site search": "Поиск по сайту", "Site search": "Поиск по сайту",
"Slug": "Постоянная ссылка", "Slug": "Постоянная ссылка",
"Social networks": "Социальные сети", "Social networks": "Социальные сети",

View File

@ -150,14 +150,14 @@ export const RatingControl = (props: RatingControlProps) => {
/> />
</Show> </Show>
</button> </button>
<Popup trigger={getTrigger()} variant="tiny"> <Popup trigger={getTrigger()} variant="tiny">
<Show when={author()} fallback={t('Sign in to see the voters')}>
<VotersList <VotersList
reactions={ratings()} reactions={ratings()}
fallbackMessage={isLoading() ? t('Loading') : t('No one rated yet')} fallbackMessage={isLoading() ? t('Loading') : t('No one rated yet')}
/> />
</Show>
</Popup> </Popup>
<button <button
onClick={() => handleRatingChange(ReactionKind.Like)} onClick={() => handleRatingChange(ReactionKind.Like)}
disabled={isLoading()} disabled={isLoading()}