feat(channels): render TeamSpeak spacers across skins

This commit is contained in:
illusia committed 2026-10-24 18:16:01 +08:00
1 parent 4bff2133b6
commit b9fccb8757
21 files changed
+240 -17

No files matched your search

+1 -1
View File
@@ -144,7 +144,7 @@ const skinPluginContext = computed(() => ({
skin: { locale: language.value, messages: skinMessages.value },
session: {
status: { connected: true, connecting: false, channelId: selectedChannel.value.id, channelName: selectedChannel.value.name, userName: "illusia" },
channels: channels.map((channel, depth) => ({ id: channel.id, name: channel.name, parentId: "", depth, memberCount: channel.members.length, current: channel.id === selectedChannel.value.id })),
channels: channels.map((channel, depth) => ({ id: channel.id, name: channel.name, displayName: channel.name, isSpacer: false, spacerAlignment: "", spacerStyle: "", parentId: "", depth, memberCount: channel.members.length, current: channel.id === selectedChannel.value.id })),
members: selectedChannel.value.members.map((member) => ({
id: member.id,
name: member.name,
+6
View File
@@ -972,6 +972,7 @@ import SkinLoadRecoveryNotice from "../components/SkinLoadRecoveryNotice.vue";
import VoiceMemberCards from "../components/web-client/VoiceMemberCards.vue";
import VoicePerformancePanel from "../components/web-client/VoicePerformancePanel.vue";
import VoiceChannelTree from "../components/web-client/VoiceChannelTree.vue";
import { channelDisplayName, getChannelSpacer } from "../../../src/shared/channel-spacer.js";
import VoiceServerSwitcher from "../components/web-client/VoiceServerSwitcher.vue";
import VoiceServerHeader from "../components/web-client/VoiceServerHeader.vue";
import VoiceServerBanner from "../components/web-client/VoiceServerBanner.vue";
@@ -1649,9 +1650,14 @@ const skinPluginContext = computed(() => ({
},
channels: channelTree.value.map((item) => {
const members = skinPluginMembers.value.filter((member) => member.channelId === item.id);
const spacer = getChannelSpacer(item);
return {
id: item.id,
name: item.name,
displayName: channelDisplayName(item),
isSpacer: Boolean(spacer),
spacerAlignment: spacer?.alignment ?? "",
spacerStyle: spacer?.style ?? "",
parentId: item.parentID,
depth: item.depth,
memberCount: item.members.length,