Skip to content

Commit d09991d

Browse files
fix: move dock icons below sidebar header, above thread list
1 parent bc4c146 commit d09991d

1 file changed

Lines changed: 36 additions & 33 deletions

File tree

  • crates/tauri-app/frontend/src/components/sidebar

crates/tauri-app/frontend/src/components/sidebar/Sidebar.tsx

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,39 @@ export function Sidebar() {
6161
</div>
6262
</div>
6363

64+
<div class="sidebar-dock">
65+
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__mcp__")} title="MCP Servers">
66+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
67+
<rect x="2" y="2" width="20" height="8" rx="2" /><rect x="2" y="14" width="20" height="8" rx="2" /><circle cx="6" cy="6" r="1" fill="currentColor" /><circle cx="6" cy="18" r="1" fill="currentColor" />
68+
</svg>
69+
<span>MCP</span>
70+
</button>
71+
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__themes__")} title="Themes">
72+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
73+
<circle cx="13.5" cy="6.5" r="2.5" /><circle cx="17.5" cy="10.5" r="2.5" /><circle cx="8.5" cy="7.5" r="2.5" /><circle cx="6.5" cy="12.5" r="2.5" /><path d="M12 22C6.5 22 2 17.5 2 12S6.5 2 12 2s10 4.5 10 10-1.5 4-3 4h-1.7c-.8 0-1.3.8-.9 1.5.6 1.1 1 2.2 1 3.5 0 1.5-.5 2-1.4 2z" />
74+
</svg>
75+
<span>Themes</span>
76+
</button>
77+
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__search__")} title="Search (Cmd+Shift+F)">
78+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
79+
<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />
80+
</svg>
81+
<span>Search</span>
82+
</button>
83+
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__skills__")} title="Skills & Plugins">
84+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
85+
<path d="M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z" />
86+
</svg>
87+
<span>Skills</span>
88+
</button>
89+
<button class="dock-btn" onClick={() => setStore("usageDashboardOpen", true)} title="Usage (Cmd+Shift+U)">
90+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
91+
<line x1="18" y1="20" x2="18" y2="10" /><line x1="12" y1="20" x2="12" y2="4" /><line x1="6" y1="20" x2="6" y2="14" />
92+
</svg>
93+
<span>Usage</span>
94+
</button>
95+
</div>
96+
6497
<div class="sidebar-content">
6598
<DragDropProvider
6699
onDragEnd={(event) => {
@@ -115,38 +148,6 @@ export function Sidebar() {
115148
</div>
116149

117150
<div class="sidebar-footer">
118-
<div class="sidebar-dock">
119-
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__mcp__")} title="MCP Servers">
120-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
121-
<rect x="2" y="2" width="20" height="8" rx="2" /><rect x="2" y="14" width="20" height="8" rx="2" /><circle cx="6" cy="6" r="1" fill="currentColor" /><circle cx="6" cy="18" r="1" fill="currentColor" />
122-
</svg>
123-
<span>MCP</span>
124-
</button>
125-
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__themes__")} title="Themes">
126-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
127-
<circle cx="13.5" cy="6.5" r="2.5" /><circle cx="17.5" cy="10.5" r="2.5" /><circle cx="8.5" cy="7.5" r="2.5" /><circle cx="6.5" cy="12.5" r="2.5" /><path d="M12 22C6.5 22 2 17.5 2 12S6.5 2 12 2s10 4.5 10 10-1.5 4-3 4h-1.7c-.8 0-1.3.8-.9 1.5.6 1.1 1 2.2 1 3.5 0 1.5-.5 2-1.4 2z" />
128-
</svg>
129-
<span>Themes</span>
130-
</button>
131-
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__search__")} title="Search (Cmd+Shift+F)">
132-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
133-
<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />
134-
</svg>
135-
<span>Search</span>
136-
</button>
137-
<button class="dock-btn" onClick={() => appStore.openVirtualTab("__skills__")} title="Skills & Plugins">
138-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
139-
<path d="M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z" />
140-
</svg>
141-
<span>Skills</span>
142-
</button>
143-
<button class="dock-btn" onClick={() => setStore("usageDashboardOpen", true)} title="Usage (Cmd+Shift+U)">
144-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
145-
<line x1="18" y1="20" x2="18" y2="10" /><line x1="12" y1="20" x2="12" y2="4" /><line x1="6" y1="20" x2="6" y2="14" />
146-
</svg>
147-
<span>Usage</span>
148-
</button>
149-
</div>
150151
<button class="new-thread-btn" onClick={() => newThread()}>
151152
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
152153
<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />
@@ -264,9 +265,11 @@ export function Sidebar() {
264265
.sidebar-dock {
265266
display: flex;
266267
justify-content: space-between;
267-
padding: 4px 2px;
268+
padding: 4px 6px;
269+
margin: 0 8px;
268270
background: var(--bg-muted);
269271
border-radius: var(--radius-md);
272+
flex-shrink: 0;
270273
}
271274
.dock-btn {
272275
display: flex;

0 commit comments

Comments
 (0)