opt: card size

This commit is contained in:
Memory 2025-09-27 09:37:22 +08:00 committed by GitHub
parent 848f6277cb
commit 74b65430be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 19 additions and 13 deletions

View File

@ -138,3 +138,9 @@
background: #c0c1c58f; background: #c0c1c58f;
} }
} }
.sider-card-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

View File

@ -218,7 +218,7 @@ const ConnCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold sider-card-title ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.connections')} {t('sider.cards.connections')}
</h3> </h3>

View File

@ -102,7 +102,7 @@ const DNSCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold sider-card-title ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.dns')} {t('sider.cards.dns')}
</h3> </h3>

View File

@ -84,7 +84,7 @@ const LogCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.logs')} {t('sider.cards.logs')}
</h3> </h3>

View File

@ -158,7 +158,7 @@ const MihomoCoreCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.core')} {t('sider.cards.core')}
</h3> </h3>

View File

@ -83,7 +83,7 @@ const OverrideCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.override')} {t('sider.cards.override')}
</h3> </h3>

View File

@ -238,7 +238,7 @@ const ProfileCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold sider-card-title ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.profiles')} {t('sider.cards.profiles')}
</h3> </h3>

View File

@ -103,7 +103,7 @@ const ProxyCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold sider-card-title ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('proxies.card.title')} {t('proxies.card.title')}
</h3> </h3>

View File

@ -84,7 +84,7 @@ const ResourceCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.resources')} {t('sider.cards.resources')}
</h3> </h3>

View File

@ -104,7 +104,7 @@ const RuleCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.rules')} {t('sider.cards.rules')}
</h3> </h3>

View File

@ -102,7 +102,7 @@ const SniffCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.sniff')} {t('sider.cards.sniff')}
</h3> </h3>

View File

@ -84,7 +84,7 @@ const SubStoreCard: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold text-ellipsis whitespace-nowrap overflow-hidden ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.substore')} {t('sider.cards.substore')}
</h3> </h3>

View File

@ -116,7 +116,7 @@ const SysproxySwitcher: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold sider-card-title ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.systemProxy')} {t('sider.cards.systemProxy')}
</h3> </h3>

View File

@ -150,7 +150,7 @@ const TunSwitcher: React.FC<Props> = (props) => {
</CardBody> </CardBody>
<CardFooter className="pt-1"> <CardFooter className="pt-1">
<h3 <h3
className={`text-md font-bold ${match ? 'text-primary-foreground' : 'text-foreground'}`} className={`text-md font-bold sider-card-title ${match ? 'text-primary-foreground' : 'text-foreground'}`}
> >
{t('sider.cards.tun')} {t('sider.cards.tun')}
</h3> </h3>