mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
status bar - make loading
the default (#214135)
This is a more generic progress indicator than `syncing` and looks better.
This commit is contained in:
parent
b5bd304ac8
commit
6908956c15
|
@ -65,7 +65,7 @@ export interface IProgressNotificationOptions extends IProgressOptions {
|
|||
readonly secondaryActions?: readonly IAction[];
|
||||
readonly delay?: number;
|
||||
readonly priority?: NotificationPriority;
|
||||
readonly type?: 'syncing' | 'loading';
|
||||
readonly type?: 'loading' | 'syncing';
|
||||
}
|
||||
|
||||
export interface IProgressDialogOptions extends IProgressOptions {
|
||||
|
@ -77,7 +77,7 @@ export interface IProgressDialogOptions extends IProgressOptions {
|
|||
export interface IProgressWindowOptions extends IProgressOptions {
|
||||
readonly location: ProgressLocation.Window;
|
||||
readonly command?: string;
|
||||
readonly type?: 'syncing' | 'loading';
|
||||
readonly type?: 'loading' | 'syncing';
|
||||
}
|
||||
|
||||
export interface IProgressCompositeOptions extends IProgressOptions {
|
||||
|
|
|
@ -283,7 +283,7 @@ class StatusBarCodiconLabel extends SimpleIconLabel {
|
|||
private progressCodicon = renderIcon(syncing);
|
||||
|
||||
private currentText = '';
|
||||
private currentShowProgress: boolean | 'syncing' | 'loading' = false;
|
||||
private currentShowProgress: boolean | 'loading' | 'syncing' = false;
|
||||
|
||||
constructor(
|
||||
private readonly container: HTMLElement
|
||||
|
@ -291,10 +291,10 @@ class StatusBarCodiconLabel extends SimpleIconLabel {
|
|||
super(container);
|
||||
}
|
||||
|
||||
set showProgress(showProgress: boolean | 'syncing' | 'loading') {
|
||||
set showProgress(showProgress: boolean | 'loading' | 'syncing') {
|
||||
if (this.currentShowProgress !== showProgress) {
|
||||
this.currentShowProgress = showProgress;
|
||||
this.progressCodicon = renderIcon(showProgress === 'loading' ? spinningLoading : syncing);
|
||||
this.progressCodicon = renderIcon(showProgress === 'syncing' ? syncing : spinningLoading);
|
||||
this.text = this.currentText;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ export class TaskStatusBarContributions extends Disposable implements IWorkbench
|
|||
}
|
||||
|
||||
if (promise && (event.kind === TaskEventKind.Active) && (this._activeTasksCount === 1)) {
|
||||
this._progressService.withProgress({ location: ProgressLocation.Window, command: 'workbench.action.tasks.showTasks', type: 'loading' }, progress => {
|
||||
this._progressService.withProgress({ location: ProgressLocation.Window, command: 'workbench.action.tasks.showTasks' }, progress => {
|
||||
progress.report({ message: nls.localize('building', 'Building...') });
|
||||
return promise!;
|
||||
}).then(() => {
|
||||
|
|
|
@ -114,7 +114,7 @@ registerTerminalAction({
|
|||
text,
|
||||
name: text,
|
||||
ariaLabel: text,
|
||||
showProgress: 'loading'
|
||||
showProgress: true
|
||||
};
|
||||
const statusbarHandle = statusbarService.addEntry(statusbarEntry, 'recordSession', StatusbarAlignment.LEFT);
|
||||
store.add(statusbarHandle);
|
||||
|
|
|
@ -174,9 +174,9 @@ export interface IStatusbarEntry {
|
|||
|
||||
/**
|
||||
* Will enable a spinning icon in front of the text to indicate progress. When `true` is
|
||||
* specified, `syncing` will be used.
|
||||
* specified, `loading` will be used.
|
||||
*/
|
||||
readonly showProgress?: boolean | 'syncing' | 'loading';
|
||||
readonly showProgress?: boolean | 'loading' | 'syncing';
|
||||
|
||||
/**
|
||||
* The kind of status bar entry. This applies different colors to the entry.
|
||||
|
|
|
@ -824,8 +824,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
|
|||
title: localize('saveParticipants', "Saving '{0}'", this.name),
|
||||
location: ProgressLocation.Window,
|
||||
cancellable: true,
|
||||
delay: this.isDirty() ? 3000 : 5000,
|
||||
type: 'loading'
|
||||
delay: this.isDirty() ? 3000 : 5000
|
||||
}, progress => {
|
||||
return this.doSaveSequential(versionId, options, progress, saveCancellation);
|
||||
}, () => {
|
||||
|
|
|
@ -935,8 +935,7 @@ export class StoredFileWorkingCopy<M extends IStoredFileWorkingCopyModel> extend
|
|||
title: localize('saveParticipants', "Saving '{0}'", this.name),
|
||||
location: ProgressLocation.Window,
|
||||
cancellable: true,
|
||||
delay: this.isDirty() ? 3000 : 5000,
|
||||
type: 'loading'
|
||||
delay: this.isDirty() ? 3000 : 5000
|
||||
}, progress => {
|
||||
return this.doSaveSequential(versionId, options, progress, saveCancellation);
|
||||
}, () => {
|
||||
|
|
Loading…
Reference in a new issue