Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions modules/lyrics-plus/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@
}

.lyrics-tabBar-headerItem {
-webkit-app-region: no-drag;
display: inline-block;
pointer-events: auto;
}
Expand Down Expand Up @@ -348,8 +347,20 @@
content: "• ";
}

.lyrics-plus-topbar-content {
align-self: start;
grid-area: 1 / 1 / -1 / -1;
padding: 16px 24px 0;
pointer-events: none;
z-index: 2;
}

#lyrics-fullscreen-container .lyrics-plus-topbar-content,
.lyrics-lyricsContainer-LyricsContainer.fad-enabled .lyrics-plus-topbar-content {
display: none;
}

.lyrics-tabBar-nav {
-webkit-app-region: drag;
pointer-events: none;
width: 100%;
}
Expand Down
17 changes: 4 additions & 13 deletions modules/lyrics-plus/tab-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,10 @@ export const TopBarContent = ({ links, activeLink, lockLink, switchCallback, loc
);
};

export const TabBarContext = ({ children }: { children?: ReactTypes.ReactNode }) => {
const content = react.createElement(
"div",
{
className: "main-topBar-topbarContent lyrics-plus-topbar-content",
},
children,
);
// The classic app portaled the mode switcher into the client top bar. v3 has
// no such wrapper, so fall back to rendering it inline within the route.
const target = document.querySelector(".main-topBar-topbarContentWrapper");
return target ? client.reactDOM.createPortal(content, target) : content;
};
// The classic app portaled the mode switcher into the client top bar, but the
// lyrics container paints over that bar, so it always renders inline instead.
export const TabBarContext = ({ children }: { children?: ReactTypes.ReactNode }) =>
react.createElement("div", { className: "lyrics-plus-topbar-content" }, children);

export const TabBar = react.memo(
({
Expand Down
Loading