diff --git a/src/renderer/components/Sidebar/Sidebar.css b/src/renderer/components/Sidebar/Sidebar.css
index 7b2d479..771adb9 100644
--- a/src/renderer/components/Sidebar/Sidebar.css
+++ b/src/renderer/components/Sidebar/Sidebar.css
@@ -1,5 +1,5 @@
.sidebar {
- width: 280px;
+ width: 100%;
height: 100%;
background-color: var(--vscode-sideBar-background);
border-right: 1px solid var(--vscode-sideBar-border);
diff --git a/src/renderer/components/TabBar/TabBar.css b/src/renderer/components/TabBar/TabBar.css
index 528e9ca..bd4d4ac 100644
--- a/src/renderer/components/TabBar/TabBar.css
+++ b/src/renderer/components/TabBar/TabBar.css
@@ -45,6 +45,29 @@
background-color: var(--vscode-toolbar-hoverBackground, rgba(90, 93, 94, 0.31));
}
+/* Sidebar toggle button */
+.tab-bar-toggle-sidebar {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 35px;
+ height: 100%;
+ background-color: transparent;
+ border: none;
+ border-right: 1px solid var(--vscode-tab-border, #252526);
+ color: var(--vscode-icon-foreground, #c5c5c5);
+ cursor: pointer;
+ flex-shrink: 0;
+}
+
+.tab-bar-toggle-sidebar:hover {
+ background-color: var(--vscode-toolbar-hoverBackground, rgba(90, 93, 94, 0.31));
+}
+
+.tab-bar-toggle-sidebar:active {
+ background-color: var(--vscode-toolbar-activeBackground, rgba(99, 102, 103, 0.31));
+}
+
.tab-scroll-left {
border-right: 1px solid var(--vscode-tab-border, #252526);
}
diff --git a/src/renderer/components/TabBar/TabBar.tsx b/src/renderer/components/TabBar/TabBar.tsx
index 84fb56b..87e0fd5 100644
--- a/src/renderer/components/TabBar/TabBar.tsx
+++ b/src/renderer/components/TabBar/TabBar.tsx
@@ -84,6 +84,8 @@ export const TabBar: React.FC = () => {
posts,
media,
dirtyPosts,
+ sidebarVisible,
+ toggleSidebar,
setActiveTab,
closeTab,
pinTab,
@@ -138,7 +140,7 @@ export const TabBar: React.FC = () => {
}
}, [activeTabId]);
- // Keyboard shortcut handler (Ctrl+W to close active tab)
+ // Keyboard shortcut handler (Ctrl+W to close active tab, Ctrl+B to toggle sidebar)
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if ((e.ctrlKey || e.metaKey) && e.key === 'w') {
@@ -147,11 +149,15 @@ export const TabBar: React.FC = () => {
closeTab(activeTabId);
}
}
+ if ((e.ctrlKey || e.metaKey) && e.key === 'b') {
+ e.preventDefault();
+ toggleSidebar();
+ }
};
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
- }, [activeTabId, closeTab]);
+ }, [activeTabId, closeTab, toggleSidebar]);
if (tabs.length === 0) {
return null;
@@ -197,6 +203,18 @@ export const TabBar: React.FC = () => {
return (
+
+
{showLeftArrow && (