Skip to content

Commit b85c791

Browse files
committed
move indicator to left side
1 parent 7758d82 commit b85c791

3 files changed

Lines changed: 20 additions & 6 deletions

File tree

cmd/wsh/cmd/wshcmd-tabindicator.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ func tabIndicatorRun(cmd *cobra.Command, args []string) (rtnErr error) {
7474
}
7575

7676
event := wps.WaveEvent{
77-
Event: wps.Event_TabIndicator,
78-
Scopes: []string{waveobj.MakeORef(waveobj.OType_Tab, tabId).String()},
79-
Data: eventData,
80-
Persist: 1024,
77+
Event: wps.Event_TabIndicator,
78+
Scopes: []string{waveobj.MakeORef(waveobj.OType_Tab, tabId).String()},
79+
Data: eventData,
8180
}
8281

8382
err := wshclient.EventPublishCommand(RpcClient, event, &wshrpc.RpcOpts{NoResponse: true})

frontend/app/tab/tab.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@
8181
}
8282
}
8383

84+
.tab-indicator {
85+
position: absolute;
86+
top: 50%;
87+
left: 4px;
88+
transform: translate3d(0, -50%, 0);
89+
width: 20px;
90+
height: 20px;
91+
display: flex;
92+
align-items: center;
93+
justify-content: center;
94+
z-index: var(--zindex-tab-name);
95+
padding: 1px 2px;
96+
transition: none !important;
97+
}
98+
8499
.wave-button {
85100
position: absolute;
86101
top: 50%;

frontend/app/tab/tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const Tab = memo(
230230
onContextMenu={handleContextMenu}
231231
data-tab-id={id}
232232
>
233-
<div className="tab-inner group">
233+
<div className="tab-inner">
234234
<div
235235
ref={editableRef}
236236
className={clsx("name", { focused: isEditable })}
@@ -244,7 +244,7 @@ const Tab = memo(
244244
</div>
245245
{indicator && (
246246
<div
247-
className="bell wave-button pointer-events-none group-hover:opacity-80"
247+
className="tab-indicator pointer-events-none"
248248
style={{ color: indicator.color || "#fbbf24" }}
249249
title="Activity notification"
250250
>

0 commit comments

Comments
 (0)