mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
@@ -84,6 +84,7 @@ const WorkbenchTab = ({
|
||||
return (
|
||||
<div
|
||||
key={workbench.id}
|
||||
data-testid="workbench-tab"
|
||||
data-active={tabActive}
|
||||
data-pinned={workbench.pinned}
|
||||
className={styles.tab}
|
||||
@@ -93,6 +94,7 @@ const WorkbenchTab = ({
|
||||
<Fragment key={view.id}>
|
||||
<button
|
||||
key={view.id}
|
||||
data-testid="split-view-label"
|
||||
className={styles.splitViewLabel}
|
||||
data-active={activeViewIndex === viewIdx && tabActive}
|
||||
onContextMenu={() => {
|
||||
@@ -125,7 +127,11 @@ const WorkbenchTab = ({
|
||||
})}
|
||||
{!workbench.pinned && tabsLength > 1 ? (
|
||||
<div className={styles.tabCloseButtonWrapper}>
|
||||
<button className={styles.tabCloseButton} onClick={onCloseTab}>
|
||||
<button
|
||||
data-testid="close-tab-button"
|
||||
className={styles.tabCloseButton}
|
||||
onClick={onCloseTab}
|
||||
>
|
||||
<CloseIcon />
|
||||
</button>
|
||||
</div>
|
||||
@@ -214,7 +220,7 @@ export const AppTabsHeader = ({
|
||||
/>
|
||||
);
|
||||
})}
|
||||
<IconButton onClick={onAddTab}>
|
||||
<IconButton onClick={onAddTab} data-testid="add-tab-view-button">
|
||||
<PlusIcon />
|
||||
</IconButton>
|
||||
</div>
|
||||
|
||||
@@ -47,6 +47,7 @@ export const SplitViewMenuIndicator = memo(
|
||||
<div
|
||||
ref={ref}
|
||||
data-active={active}
|
||||
data-testid="split-view-indicator"
|
||||
className={clsx(className, styles.indicator)}
|
||||
onClick={onClick}
|
||||
onMouseDown={onMouseDown}
|
||||
|
||||
Reference in New Issue
Block a user