fix(editor): put the pin in the editor tab action slot (#5282)

- Put the pin in a pinned editor tab's action slot so the filename has more room. The pin follows the left or right placement and can unpin the tab directly.
- Use the same Unpin action in Hidden Editor Tabs. A modified pinned tab shows its unsaved marker beside the pin.
This commit is contained in:
l0ng-ai
2026-11-23 09:23:25 +08:00
committed by GitHub
parent 43eeb080be
commit 2215239ecb
8 changed files with 124 additions and 32 deletions
+11 -1
View File
@@ -137,6 +137,16 @@
.unpin {
color: var(--fg-muted);
}
.pinModified {
position: absolute;
top: calc(50% - 7px);
inset-inline-end: 1px;
width: var(--space-1);
height: var(--space-1);
border-radius: 50%;
background: var(--accent);
pointer-events: none;
}
.tab:hover .close,
.tab:where([data-context-menu-open]) .close,
.selected .close,
@@ -301,7 +311,7 @@
width: auto;
margin: 0;
}
.editor:not(.vertical) .close {
.editor:not(.vertical) :is(.close, .unpin) {
width: 16px;
}
.editor:not(.vertical) .closeSlot .modified {