This commit is contained in:
2026-01-04 10:57:45 +00:00
parent 29c0df489e
commit 1134cba575

View File

@@ -167,6 +167,10 @@ export class WccSidebar extends DeesElement {
grid-template-columns: 16px 1fr; grid-template-columns: 16px 1fr;
} }
.selectOption.folder .text {
margin-left: 4px;
}
.selectOption .expand-icon { .selectOption .expand-icon {
font-size: 14px; font-size: 14px;
opacity: 0.5; opacity: 0.5;
@@ -321,13 +325,17 @@ export class WccSidebar extends DeesElement {
opacity: 0.8; opacity: 0.8;
} }
/* Section tag for pinned items */ /* Section tag pill for pinned items */
.section-tag { .section-tag {
font-size: 0.55rem; font-size: 0.5rem;
color: #555; color: #888;
margin-left: auto; margin-left: auto;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.03em; letter-spacing: 0.02em;
background: rgba(255, 255, 255, 0.06);
padding: 0.15rem 0.4rem;
border-radius: 9999px;
white-space: nowrap;
} }
/* Group container */ /* Group container */
@@ -429,6 +437,7 @@ export class WccSidebar extends DeesElement {
const isCollapsed = this.collapsedSections.has('__pinned__'); const isCollapsed = this.collapsedSections.has('__pinned__');
// Collect pinned items with their original section info // Collect pinned items with their original section info
// Pinned items are NOT filtered by search - they always remain visible
const pinnedEntries: Array<{ sectionName: string; itemName: string; item: any; section: IWccSection }> = []; const pinnedEntries: Array<{ sectionName: string; itemName: string; item: any; section: IWccSection }> = [];
for (const key of this.pinnedItems) { for (const key of this.pinnedItems) {
@@ -443,10 +452,7 @@ export class WccSidebar extends DeesElement {
} }
} }
// Filter by search if (pinnedEntries.length === 0) {
const filteredEntries = pinnedEntries.filter(e => this.matchesSearch(e.itemName));
if (filteredEntries.length === 0 && this.searchQuery) {
return null; return null;
} }
@@ -460,7 +466,7 @@ export class WccSidebar extends DeesElement {
<span>Pinned</span> <span>Pinned</span>
</div> </div>
<div class="section-content ${isCollapsed ? 'collapsed' : ''}"> <div class="section-content ${isCollapsed ? 'collapsed' : ''}">
${filteredEntries.map(({ sectionName, itemName, item, section }) => { ${pinnedEntries.map(({ sectionName, itemName, item, section }) => {
const isSelected = this.selectedItem === item; const isSelected = this.selectedItem === item;
const type = section.type === 'elements' ? 'element' : 'page'; const type = section.type === 'elements' ? 'element' : 'page';
const icon = section.type === 'elements' ? 'featured_video' : 'insert_drive_file'; const icon = section.type === 'elements' ? 'featured_video' : 'insert_drive_file';