From 00734ce327a1947a8962c5290d136a0f297260e9 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Fri, 21 Mar 2025 19:58:27 -0700 Subject: [PATCH] update commandbar --- .../void-command-bar-tsx/VoidCommandBar.tsx | 32 +++++++++---------- .../void/electron-main/metricsMainService.ts | 3 +- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx index 6b8b0c1b..6655306e 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx @@ -121,7 +121,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => { const sortedDiffZoneIds = uri ? commandBarState[uri.fsPath]?.sortedDiffZoneIds ?? [] : [] - const isAChangeInThisFile = sortedDiffIds.length !== 0 + const isADiffInThisFile = sortedDiffIds.length !== 0 const isADiffZoneInThisFile = sortedDiffZoneIds.length !== 0 const isADiffZoneInAnyFile = sortedCommandBarURIs.length !== 0 @@ -134,11 +134,11 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => { const prevURIIdx = getNextUriIdx(-1) const upDownDisabled = prevDiffIdx === null || nextDiffIdx === null - const leftRightDisabled = prevURIIdx === null || nextURIIdx === null + const leftRightDisabled = prevURIIdx === null || nextURIIdx === null // || (sortedCommandBarURIs.length === 1 && isADiffZoneInThisFile) const upButton = - const leftRightUpDownButtons =
+ const leftRightUpDownButtons =
{/* Changes in file */} - {isADiffZoneInThisFile && -
+ { +
{downButton} {upButton} -
- {isAChangeInThisFile ? + + {isADiffInThisFile ? `Diff ${(currDiffIdx ?? 0) + 1} of ${sortedDiffIds.length}` : `No changes` } -
+
} {/* Files */} - {isADiffZoneInAnyFile && -
+ { +
{leftButton} {/*
*/} {rightButton} {/*
*/} -
+ {currFileIdx !== null ? `File ${currFileIdx + 1} of ${sortedCommandBarURIs.length}` : `${sortedCommandBarURIs.length} file${sortedCommandBarURIs.length === 1 ? '' : 's'} changed` } -
+
}
diff --git a/src/vs/workbench/contrib/void/electron-main/metricsMainService.ts b/src/vs/workbench/contrib/void/electron-main/metricsMainService.ts index 592f79c4..bfc0a8c9 100644 --- a/src/vs/workbench/contrib/void/electron-main/metricsMainService.ts +++ b/src/vs/workbench/contrib/void/electron-main/metricsMainService.ts @@ -96,7 +96,7 @@ export class MetricsMainService extends Disposable implements IMetricsService { // very important to await whenReady! await this._appStorage.whenReady - const { commit, version, quality } = this._productService + const { commit, version, voidVersion, quality } = this._productService const isDevMode = !this._envMainService.isBuilt // found in abstractUpdateService.ts @@ -104,6 +104,7 @@ export class MetricsMainService extends Disposable implements IMetricsService { this._initProperties = { commit, vscodeVersion: version, + voidVersion, os, quality, distinctId: this.distinctId,