mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
commandbar draft (broken)
This commit is contained in:
parent
a33160f33e
commit
4a9af17736
1 changed files with 8 additions and 7 deletions
|
|
@ -1767,16 +1767,16 @@ const VoidCommandBar = () => {
|
|||
onFocusCapture={() => setIsFocused(true)}
|
||||
onBlurCapture={() => setIsFocused(false)}
|
||||
>
|
||||
<button
|
||||
disabled={!getNextDiff({ step: 1 })}
|
||||
onClick={() => gotoNextDiff({ step: 1 })}
|
||||
>↓</button>
|
||||
|
||||
<button
|
||||
disabled={!getNextDiff({ step: -1 })}
|
||||
onClick={() => gotoNextDiff({ step: -1 })}
|
||||
>↑</button>
|
||||
|
||||
<button
|
||||
disabled={!getNextDiff({ step: 1 })}
|
||||
onClick={() => gotoNextDiff({ step: 1 })}
|
||||
>↓</button>
|
||||
|
||||
<button
|
||||
disabled={!getNextUri({ step: -1 })}
|
||||
onClick={() => gotoNextUri({ step: -1 })}
|
||||
|
|
@ -1789,10 +1789,11 @@ const VoidCommandBar = () => {
|
|||
|
||||
<div>
|
||||
<div className='gap-2 text-[var(--vscode-editor-foreground)] flex'>
|
||||
<div>numUris: {Object.keys(editCodeService._sortedDiffsOfFspath).length}</div>
|
||||
<div>numDiffs: {Object.values(editCodeService._sortedDiffsOfFspath).reduce((acc, diffs) => acc + (diffs?.length || 0), 0)}</div>
|
||||
<div>File: {(editCodeService._sortedUrisWithDiffs.findIndex(u => u.fsPath === getCurrentUri()?.fsPath) ?? 0) + 1}/{editCodeService._sortedUrisWithDiffs.length}</div>
|
||||
<div>Diff: {(diffIdxOfFspath[getCurrentUri()?.fsPath ?? ''] ?? 0) + 1}/{editCodeService._sortedDiffsOfFspath[getCurrentUri()?.fsPath ?? '']?.length ?? 0}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{diffZones.map((area, index) => (
|
||||
<>
|
||||
<div key={index} className='bg-red-500 p-2 rounded-lg m-2 text-white'>{getBasename(area?._URI?.toString())}</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue