fix: update text wrapping in ServerCard and ServerCardInline components for improved readability

This commit is contained in:
hamster1963
2025-05-04 18:10:22 +08:00
parent 65858e73db
commit 15a47fb2d4
2 changed files with 4 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ export default function ServerCard({ now, serverInfo }: { now: number; serverInf
{showFlag ? <ServerFlag country_code={country_code} /> : null}
</div>
<div className="relative flex flex-col">
<p className={cn("break-all font-bold tracking-tight", showFlag ? "text-xs " : "text-sm")}>{name}</p>
<p className={cn("break-normal font-bold tracking-tight", showFlag ? "text-xs " : "text-sm")}>{name}</p>
<div
className={cn("hidden lg:block", {
"lg:hidden": fixedTopServerName,
@@ -173,7 +173,7 @@ export default function ServerCard({ now, serverInfo }: { now: number; serverInf
{showFlag ? <ServerFlag country_code={country_code} /> : null}
</div>
<div className="relative flex flex-col">
<p className={cn("break-all font-bold tracking-tight max-w-[108px]", showFlag ? "text-xs" : "text-sm")}>{name}</p>
<p className={cn("break-normal font-bold tracking-tight max-w-[108px]", showFlag ? "text-xs" : "text-sm")}>{name}</p>
<div
className={cn("hidden lg:block", {
"lg:hidden": fixedTopServerName,

View File

@@ -48,7 +48,7 @@ export default function ServerCardInline({ now, serverInfo }: { now: number; ser
{showFlag ? <ServerFlag country_code={country_code} /> : null}
</div>
<div className="relative w-28 flex flex-col">
<p className={cn("break-all font-bold tracking-tight", showFlag ? "text-xs " : "text-sm")}>{name}</p>
<p className={cn("break-normal font-bold tracking-tight", showFlag ? "text-xs " : "text-sm")}>{name}</p>
{parsedData?.billingDataMod && <BillingInfo parsedData={parsedData} />}
</div>
</section>
@@ -132,7 +132,7 @@ export default function ServerCardInline({ now, serverInfo }: { now: number; ser
{showFlag ? <ServerFlag country_code={country_code} /> : null}
</div>
<div className="relative flex flex-col">
<p className={cn("break-all font-bold w-28 tracking-tight", showFlag ? "text-xs" : "text-sm")}>{name}</p>
<p className={cn("break-normal font-bold w-28 tracking-tight", showFlag ? "text-xs" : "text-sm")}>{name}</p>
{parsedData?.billingDataMod && <BillingInfo parsedData={parsedData} />}
</div>
</section>