style: simplify git header controls
Show sync counters only when needed Use an icon-only identity selector
This commit is contained in:
@@ -270,7 +270,7 @@ export const GitHeader: React.FC<GitHeaderProps> = ({
|
|||||||
onSelect={onSelectIdentity}
|
onSelect={onSelectIdentity}
|
||||||
isApplying={isApplyingIdentity}
|
isApplying={isApplyingIdentity}
|
||||||
|
|
||||||
iconOnly={false}
|
iconOnly={true}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -55,9 +55,11 @@ export const SyncActions: React.FC<SyncActionsProps> = ({
|
|||||||
const isPrimaryDisabled = disabled || syncAction !== null || isRemovingRemote || !trackingRemote || blocksRebaseSync;
|
const isPrimaryDisabled = disabled || syncAction !== null || isRemovingRemote || !trackingRemote || blocksRebaseSync;
|
||||||
const isDropdownDisabled = disabled || syncAction !== null || isRemovingRemote || remotes.length === 0;
|
const isDropdownDisabled = disabled || syncAction !== null || isRemovingRemote || remotes.length === 0;
|
||||||
const hasKnownSyncWork = aheadCount > 0 || behindCount > 0;
|
const hasKnownSyncWork = aheadCount > 0 || behindCount > 0;
|
||||||
const primaryLabel = hasKnownSyncWork
|
const primaryLabel = [
|
||||||
? t('gitView.sync.syncCounts', { ahead: aheadCount, behind: behindCount })
|
t('gitView.sync.sync'),
|
||||||
: t('gitView.sync.sync');
|
behindCount > 0 ? `↓${behindCount}` : null,
|
||||||
|
aheadCount > 0 ? `↑${aheadCount}` : null,
|
||||||
|
].filter(Boolean).join(' ');
|
||||||
const tooltipLabel = blocksRebaseSync
|
const tooltipLabel = blocksRebaseSync
|
||||||
? t('gitView.sync.commitOrStashTooltip')
|
? t('gitView.sync.commitOrStashTooltip')
|
||||||
: trackingRemote
|
: trackingRemote
|
||||||
|
|||||||
Reference in New Issue
Block a user