mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Back button constant (#49340)
This commit is contained in:
@@ -16,6 +16,8 @@ import { ExtHostQuickOpenShape, IMainContext, MainContext, MainThreadQuickOpenSh
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { ThemeIcon } from 'vs/workbench/api/node/extHostTypes';
|
||||
|
||||
const backButton: QuickInputButton = { iconPath: 'back.svg' };
|
||||
|
||||
export type Item = string | QuickPickItem;
|
||||
|
||||
export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
|
||||
@@ -151,6 +153,8 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
|
||||
|
||||
// ---- QuickInput
|
||||
|
||||
backButton = backButton;
|
||||
|
||||
createQuickPick(extensionId: string): QuickPick {
|
||||
const session = new ExtHostQuickPick(this._proxy, extensionId, () => this._sessions.delete(session._id));
|
||||
this._sessions.set(session._id, session);
|
||||
@@ -324,13 +328,14 @@ class ExtHostQuickInput implements QuickInput {
|
||||
this._buttons = buttons;
|
||||
this._handlesToButtons.clear();
|
||||
buttons.forEach((button, i) => {
|
||||
this._handlesToButtons.set(i, button);
|
||||
const handle = button === backButton ? -1 : i;
|
||||
this._handlesToButtons.set(handle, button);
|
||||
});
|
||||
this.update({
|
||||
buttons: buttons.map<TransferQuickInputButton>((button, i) => ({
|
||||
iconPath: getIconUris(button.iconPath),
|
||||
tooltip: button.tooltip,
|
||||
handle: i,
|
||||
handle: button === backButton ? -1 : i,
|
||||
}))
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user