mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
always put left separator on the first tab
This commit is contained in:
parent
4a366e3fba
commit
6f8f1a836a
@ -251,8 +251,19 @@ const Tab = memo(
|
||||
const separator = currentTabElement.querySelector(".separator") as HTMLElement;
|
||||
|
||||
if (!leftAdjacentElement.classList.contains("active")) {
|
||||
console.log("here!!!!!", currentTabElement, draggingId);
|
||||
separator.style.opacity = "1"; // Reset opacity for the current tab only if not active
|
||||
}
|
||||
|
||||
// If dragging tab is the first tab set opacity to 1
|
||||
if (draggingId === tabIds[0]) {
|
||||
const draggingTabElement = document.querySelector(
|
||||
`[data-tab-id="${draggingId}"]`
|
||||
) as HTMLElement;
|
||||
if (!draggingTabElement) return;
|
||||
const separator = draggingTabElement.querySelector(".separator") as HTMLElement;
|
||||
separator.style.opacity = "1";
|
||||
}
|
||||
}
|
||||
|
||||
if (rightAdjacentId) {
|
||||
@ -264,7 +275,6 @@ const Tab = memo(
|
||||
const separator = rightAdjacentElement.querySelector(".separator") as HTMLElement;
|
||||
|
||||
if (!rightAdjacentElement.classList.contains("active")) {
|
||||
console.log("here!!!!!");
|
||||
separator.style.opacity = "1"; // Reset opacity for the right adjacent tab
|
||||
}
|
||||
}
|
||||
|
@ -659,7 +659,7 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
|
||||
key={tabId}
|
||||
ref={tabRefs.current[index]}
|
||||
id={tabId}
|
||||
isFirst={index === 0}
|
||||
isFirst={tabIds[0]}
|
||||
isPinned={isPinned}
|
||||
onClick={() => handleSelectTab(tabId)}
|
||||
isActive={activeTabId === tabId}
|
||||
|
Loading…
Reference in New Issue
Block a user