mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
do not update label when disabled (#226070)
This commit is contained in:
committed by
GitHub
parent
0062a6e767
commit
eadfc7e154
@@ -884,10 +884,12 @@ export class UserDataProfilesEditorModel extends EditorModel {
|
||||
[[cancelAction], []],
|
||||
));
|
||||
const updateCreateActionLabel = () => {
|
||||
if (this.newProfileElement?.copyFrom && this.userDataProfilesService.profiles.some(p => p.name === this.newProfileElement?.name)) {
|
||||
createAction.label = localize('replace', "Replace");
|
||||
} else {
|
||||
createAction.label = localize('create', "Create");
|
||||
if (createAction.enabled) {
|
||||
if (this.newProfileElement?.copyFrom && this.userDataProfilesService.profiles.some(p => p.name === this.newProfileElement?.name)) {
|
||||
createAction.label = localize('replace', "Replace");
|
||||
} else {
|
||||
createAction.label = localize('create', "Create");
|
||||
}
|
||||
}
|
||||
};
|
||||
updateCreateActionLabel();
|
||||
|
||||
Reference in New Issue
Block a user