fix(serverListIndicators): desktop refresh (#215)
Some checks are pending
Test / Test (push) Waiting to run

* Fixes For customizationSectionBackground

* fix(serverListIndicators): desktop refresh

---------

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
panbread 2025-04-04 11:44:05 +04:00 committed by GitHub
parent 4f35e58a13
commit f2247a3e2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 28 deletions

View file

@ -74,10 +74,9 @@ function FriendsIndicator() {
</path>
</svg>
}
<span id="vc-friendcount-text">{onlineFriendsCount}</span>
{!!settings.store.useCompact &&
<span id="vc-friendcount-text-compact">Friends</span>
}
<span id="vc-friendcount-text">{onlineFriendsCount}
{!!settings.store.useCompact && <span id="vc-friendcount-text-compact">Friends</span>}
</span>
</div>
);
}
@ -109,10 +108,9 @@ function ServersIndicator() {
</path>
</svg>
}
<span id="vc-guildcount-text">{guildCount}</span>
{!!settings.store.useCompact &&
<span id="vc-guildcount-text-compact">Servers</span>
}
<span id="vc-guildcount-text">{guildCount}
{!!settings.store.useCompact && <span id="vc-guildcount-text-compact">Servers</span>}
</span>
</div>
);
}
@ -155,13 +153,11 @@ export default definePlugin({
text = `${onlineFriendsCount} Friends`;
break;
case IndicatorType.SERVER:
text = `${onlineFriendsCount} Friends, ${guildCount} Servers`;
text = `${guildCount} Servers`;
break;
}
let cl;
if (useCompact) cl = classNameFactory("vc-indicators-compact");
else cl = classNameFactory("vc-indicators");
const cl = useCompact ? classNameFactory("vc-indicators-compact") : classNameFactory("vc-indicators");
return <ErrorBoundary noop>
<div id={cl("-container")}>

View file

@ -4,7 +4,7 @@
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 8px;
margin-bottom: -1px;
}
#vc-indicators-indicator-items {
@ -12,13 +12,35 @@
flex-direction: column;
align-items: center;
justify-content: center;
background-color: var(--background-primary);
height: 48px;
width: 48px;
border-radius: 100%;
border-radius: 24%;
height: var(--guildbar-avatar-size);
width: var(--guildbar-avatar-size);
background-color: var(--background-surface-higher);
transition: border-radius 0.15s ease-out, background-color 0.15s ease-out;
}
#vc-indicators-indicator-items::before {
position: absolute;
content: "";
display: block;
/* stylelint-disable-next-line length-zero-no-unit */
width: 0px;
/* stylelint-disable-next-line length-zero-no-unit */
height: 0px;
opacity: 0;
border-radius: 0 4px 4px 0;
left: -4px;
background-color: var(--header-primary);
transition: height 0.15s ease-out, width 0.15s ease-out,
opacity 0.15s ease-out;
}
#vc-indicators-indicator-items:hover::before {
width: 8px;
height: 20px;
opacity: 1;
}
#vc-indicators-compact-indicator-items {
display: flex;
flex-direction: column;
@ -27,7 +49,6 @@
}
#vc-indicators-indicator-items:hover {
border-radius: 34%;
background-color: var(--brand-500);
}
@ -35,7 +56,7 @@
#vc-guildcount {
display: flex;
align-items: center;
justify-content: center;
justify-content: space-evenly;
font-size: 12px;
font-weight: 600;
width: 100%;
@ -44,13 +65,6 @@
#vc-friendcount-icon,
#vc-guildcount-icon {
padding-right: 2px;
width: 14px;
height: 14px;
}
#vc-indicators-compact-container #vc-friendcount-text-compact,
#vc-indicators-compact-container #vc-guildcount-text-compact {
display: block;
padding-left: 4px;
width: var(--size-12);
height: var(--size-12);
}