Update static/js/07-team-channel-adapter.js

This commit is contained in:
dev 2026-10-31 08:47:44 +00:00
parent 368fd18aa7
commit cb078eacfd

View File

@ -114,25 +114,23 @@ Glow.decorateChannelSelector = () => {
Glow.updateTeamChannelHeader = () => { Glow.updateTeamChannelHeader = () => {
const team = Glow.state.activeTeam; const team = Glow.state.activeTeam;
const channel = Glow.state.activeChannel || Glow.state.activeRoom; const channel = Glow.state.activeChannel || Glow.state.activeRoom;
const view = Glow.state.activeView;
const isChannelView = if (view === "dm" || view === "dms" || view === "feed" || view === "pages" || view === "page" || view === "profile" || view === "settings" || view === "thread") {
Glow.state.activeView === "channel" ||
Glow.state.activeView === "room";
if (
Glow.state.activeView === "dm" ||
Glow.state.activeView === "dms"
) {
return; return;
} }
if (!isChannelView || !team || !channel || !Glow.els.headerTitle) { if (!(view === "channel" || view === "room")) {
return;
}
if (!team || !channel || !Glow.els.headerTitle) {
return; return;
} }
Glow.els.headerTitle.textContent = `# ${channel.name}`; Glow.els.headerTitle.textContent = `# ${channel.name}`;
Glow.els.headerSubtitle.textContent = Glow.els.headerSubtitle.textContent =
`${team.name} · ${channel.description || "Channel conversation"}`; `${team.name} · ${channel.description || "Channel conversation"}`;
}; };
Glow.applyComposerVisibility = () => { Glow.applyComposerVisibility = () => {
@ -347,7 +345,7 @@ Glow.manageTeamMembers = async team => {
row.className = "member-row"; row.className = "member-row";
const name = document.createElement("span"); const name = document.createElement("span");
name.textContent = `${member.username} · ${member.membership_role}`; name.textContent = `${member.username} · ${member.membership_role}`;
const actions = document.createElement("div"); const actions = document.createElement("div");
actions.className = "settings-actions"; actions.className = "settings-actions";
@ -678,4 +676,4 @@ if (!Glow.teamAdapter.chatBarVisibilityInstalled) {
}; };
} }
Glow.applyComposerVisibility(); Glow.applyComposerVisibility();