Skip to content

Commit 3936529

Browse files
committed
feat: GitHub Device Flow sign-in, username badge, mobile file explorer, tab spacing
1 parent 8c3942e commit 3936529

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

components/views/editor-view.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export function EditorView() {
189189
<Icon icon="lucide:chevron-right" width={14} height={14} />
190190
</button>
191191
)}
192-
{!treeVisible && isMobile && (
192+
{!treeVisible && isMobile && hasFiles && (
193193
<button
194194
onClick={() => layout.show('tree')}
195195
className="absolute left-2 top-2 z-30 h-9 w-9 flex items-center justify-center rounded-xl bg-[var(--bg-elevated)] border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-subtle)] cursor-pointer"
@@ -199,13 +199,20 @@ export function EditorView() {
199199
</button>
200200
)}
201201

202-
<MainEditorPane
203-
hasFiles={hasFiles}
204-
isDesktop={isDesktop}
205-
isNarrow={isNarrow}
206-
branchName={branchName}
207-
onBrowse={() => layout.show('tree')}
208-
/>
202+
{/* Mobile: show file explorer full-width when no files are open */}
203+
{isMobile && !hasFiles ? (
204+
<div className="flex-1 overflow-y-auto">
205+
<FileExplorer />
206+
</div>
207+
) : (
208+
<MainEditorPane
209+
hasFiles={hasFiles}
210+
isDesktop={isDesktop}
211+
isNarrow={isNarrow}
212+
branchName={branchName}
213+
onBrowse={() => layout.show('tree')}
214+
/>
215+
)}
209216
</div>
210217

211218
{chatPanelVisible && !isMobile && !chatFloating && (

0 commit comments

Comments
 (0)