do not update label when disabled (#226070)

This commit is contained in:
Sandeep Somavarapu
2024-08-20 17:13:11 +02:00
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();