mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Limit visible sources
This commit is contained in:
parent
59bc23bbd8
commit
3156baf78e
2 changed files with 19 additions and 11 deletions
|
@ -280,6 +280,7 @@
|
|||
"quit": "Fechar"
|
||||
},
|
||||
"game_card": {
|
||||
"available": "Disponível",
|
||||
"no_downloads": "Sem downloads disponíveis"
|
||||
},
|
||||
"binary_not_found_modal": {
|
||||
|
|
|
@ -44,6 +44,9 @@ export function GameCard({ game, ...props }: GameCardProps) {
|
|||
|
||||
const { numberFormatter } = useFormat();
|
||||
|
||||
const firstThreeRepackers = uniqueRepackers.slice(0, 3);
|
||||
const remainingCount = uniqueRepackers.length - 3;
|
||||
|
||||
return (
|
||||
<button
|
||||
{...props}
|
||||
|
@ -65,17 +68,21 @@ export function GameCard({ game, ...props }: GameCardProps) {
|
|||
<p className={styles.title}>{game.title}</p>
|
||||
</div>
|
||||
|
||||
{uniqueRepackers.length > 0 ? (
|
||||
<ul className={styles.downloadOptions}>
|
||||
{uniqueRepackers.map((repacker) => (
|
||||
<li key={repacker}>
|
||||
<Badge>{repacker}</Badge>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p className={styles.noDownloadsLabel}>{t("no_downloads")}</p>
|
||||
)}
|
||||
<div className={styles.downloadOptions}>
|
||||
{uniqueRepackers.length > 0 ? (
|
||||
<>
|
||||
{firstThreeRepackers.map((repacker) => (
|
||||
<Badge key={repacker}>{repacker}</Badge>
|
||||
))}
|
||||
{remainingCount > 0 && (
|
||||
<Badge>+{remainingCount} {t("available")}</Badge>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<p className={styles.noDownloadsLabel}>{t("no_downloads")}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={styles.specifics}>
|
||||
<div className={styles.specificsItem}>
|
||||
<DownloadIcon />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue