mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-04 18:59:08 +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;
|
const separator = currentTabElement.querySelector(".separator") as HTMLElement;
|
||||||
|
|
||||||
if (!leftAdjacentElement.classList.contains("active")) {
|
if (!leftAdjacentElement.classList.contains("active")) {
|
||||||
|
console.log("here!!!!!", currentTabElement, draggingId);
|
||||||
separator.style.opacity = "1"; // Reset opacity for the current tab only if not active
|
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) {
|
if (rightAdjacentId) {
|
||||||
@ -264,7 +275,6 @@ const Tab = memo(
|
|||||||
const separator = rightAdjacentElement.querySelector(".separator") as HTMLElement;
|
const separator = rightAdjacentElement.querySelector(".separator") as HTMLElement;
|
||||||
|
|
||||||
if (!rightAdjacentElement.classList.contains("active")) {
|
if (!rightAdjacentElement.classList.contains("active")) {
|
||||||
console.log("here!!!!!");
|
|
||||||
separator.style.opacity = "1"; // Reset opacity for the right adjacent tab
|
separator.style.opacity = "1"; // Reset opacity for the right adjacent tab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -659,7 +659,7 @@ const TabBar = memo(({ workspace }: TabBarProps) => {
|
|||||||
key={tabId}
|
key={tabId}
|
||||||
ref={tabRefs.current[index]}
|
ref={tabRefs.current[index]}
|
||||||
id={tabId}
|
id={tabId}
|
||||||
isFirst={index === 0}
|
isFirst={tabIds[0]}
|
||||||
isPinned={isPinned}
|
isPinned={isPinned}
|
||||||
onClick={() => handleSelectTab(tabId)}
|
onClick={() => handleSelectTab(tabId)}
|
||||||
isActive={activeTabId === tabId}
|
isActive={activeTabId === tabId}
|
||||||
|
Loading…
Reference in New Issue
Block a user