Skip to content

Commit

Permalink
UserVoiceShow: Fix setting name
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckyz committed Sep 19, 2024
1 parent c7e5295 commit b875ebf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/plugins/userVoiceShow/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function VoiceChannelTooltip({ channel }: VoiceChannelTooltipProps) {
<UserSummaryItem
users={users}
renderIcon={false}
max={7}
max={14}
size={18}
/>
</div>
Expand Down Expand Up @@ -159,6 +159,7 @@ export const VoiceChannelIndicator = ErrorBoundary.wrap(({ userId }: VoiceChanne
<Tooltip
text={<VoiceChannelTooltip channel={channel} />}
tooltipClassName={cl("tooltip-container")}
tooltipContentClassName={cl("tooltip-content")}
>
{props =>
isLocked ?
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/userVoiceShow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const settings = definePluginSettings({
default: true,
restartNeeded: true
},
showInVoiceMemberList: {
showInMemberList: {
type: OptionType.BOOLEAN,
description: "Show a user's Voice Channel indicator in the member and DMs list",
default: true,
Expand Down Expand Up @@ -82,12 +82,12 @@ export default definePlugin({
match: /\.subtext,children:.+?}\)\]}\)(?=])/,
replace: "$&,$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id})"
},
predicate: () => settings.store.showInVoiceMemberList
predicate: () => settings.store.showInMemberList
}
],

start() {
if (settings.store.showInVoiceMemberList) {
if (settings.store.showInMemberList) {
addDecorator("UserVoiceShow", ({ user }) => user == null ? null : <VoiceChannelIndicator userId={user.id} />);
}
},
Expand Down
10 changes: 7 additions & 3 deletions src/plugins/userVoiceShow/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
}

.vc-uvs-tooltip-container {
max-width: 200px;
max-width: 300px;
}

.vc-uvs-tooltip-content {
display: flex;
flex-direction: column;
gap: 6px;
}

.vc-uvs-guild-name {
Expand All @@ -31,7 +37,5 @@

.vc-uvs-vc-members {
display: flex;
margin: 8px 0;
flex-direction: row;
gap: 6px;
}

0 comments on commit b875ebf

Please sign in to comment.