mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-30 16:50:30 -04:00
Merge from vscode 0a7364f00514c46c9caceece15e1f82f82e3712f
This commit is contained in:
@@ -7,7 +7,7 @@ import { localize } from 'vs/nls';
|
||||
import { basename, relativePath } from 'vs/base/common/resources';
|
||||
import { IDisposable, dispose, Disposable, DisposableStore, combinedDisposable, MutableDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { VIEWLET_ID, ISCMService, ISCMRepository } from 'vs/workbench/contrib/scm/common/scm';
|
||||
import { VIEW_PANE_ID, ISCMService, ISCMRepository } from 'vs/workbench/contrib/scm/common/scm';
|
||||
import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
@@ -182,7 +182,7 @@ export class SCMStatusController implements IWorkbenchContribution {
|
||||
|
||||
if (count > 0) {
|
||||
const badge = new NumberBadge(count, num => localize('scmPendingChangesBadge', '{0} pending changes', num));
|
||||
this.badgeDisposable.value = this.activityService.showViewContainerActivity(VIEWLET_ID, { badge, clazz: 'scm-viewlet-label' });
|
||||
this.badgeDisposable.value = this.activityService.showViewActivity(VIEW_PANE_ID, { badge, clazz: 'scm-viewlet-label' });
|
||||
} else {
|
||||
this.badgeDisposable.clear();
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
}
|
||||
|
||||
.scm-view .scm-provider > .label {
|
||||
display: flex;
|
||||
flex-shrink: 1;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.scm-view .scm-provider > .label > .name {
|
||||
@@ -52,8 +52,6 @@
|
||||
}
|
||||
|
||||
.scm-view .scm-provider > .actions {
|
||||
flex: 1;
|
||||
padding-left: 10px;
|
||||
overflow: hidden;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@@ -81,6 +79,11 @@
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label > .codicon {
|
||||
font-size: 12px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item:last-of-type {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
@@ -152,6 +152,7 @@ interface ISCMLayout {
|
||||
}
|
||||
|
||||
interface RepositoryTemplate {
|
||||
readonly label: HTMLElement;
|
||||
readonly name: HTMLElement;
|
||||
readonly description: HTMLElement;
|
||||
readonly countContainer: HTMLElement;
|
||||
@@ -192,7 +193,7 @@ class RepositoryRenderer implements ICompressibleTreeRenderer<ISCMRepository, Fu
|
||||
const disposable = Disposable.None;
|
||||
const templateDisposable = combinedDisposable(visibilityDisposable, toolBar, badgeStyler);
|
||||
|
||||
return { name, description, countContainer, count, toolBar, disposable, templateDisposable };
|
||||
return { label, name, description, countContainer, count, toolBar, disposable, templateDisposable };
|
||||
}
|
||||
|
||||
renderElement(node: ITreeNode<ISCMRepository, FuzzyScore>, index: number, templateData: RepositoryTemplate, height: number | undefined): void {
|
||||
@@ -202,9 +203,11 @@ class RepositoryRenderer implements ICompressibleTreeRenderer<ISCMRepository, Fu
|
||||
const repository = node.element;
|
||||
|
||||
if (repository.provider.rootUri) {
|
||||
templateData.label.title = `${repository.provider.label}: ${repository.provider.rootUri.fsPath}`;
|
||||
templateData.name.textContent = basename(repository.provider.rootUri);
|
||||
templateData.description.textContent = repository.provider.label;
|
||||
} else {
|
||||
templateData.label.title = repository.provider.label;
|
||||
templateData.name.textContent = repository.provider.label;
|
||||
templateData.description.textContent = '';
|
||||
}
|
||||
@@ -1017,7 +1020,7 @@ class ViewModel {
|
||||
}
|
||||
|
||||
const collapsed = this.repositoryCollapseStates?.get(item.element);
|
||||
return { element: item.element, children, incompressible: true, collapsed, collapsible: hasSomeChanges };
|
||||
return { element: item.element, children, incompressible: true, collapsed, collapsible: true };
|
||||
} else {
|
||||
const children = this.mode === ViewModelMode.List
|
||||
? Iterable.map(item.resources, element => ({ element, incompressible: true }))
|
||||
|
||||
Reference in New Issue
Block a user