Skip to content

Commit

Permalink
Changed labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Feb 3, 2025
1 parent 39c177e commit 385c369
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/targetQuickPick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ALL_QUICK_PICK_PAGES: TargetQuickPickPage[] = [
targetType: 'pod',
},
{
label: 'Switch Namespace',
label: 'Select Another Namespace',
},
];

Expand Down Expand Up @@ -185,6 +185,9 @@ export class TargetQuickPick {

if (this.activePage === undefined) {
placeholder = "No available targets";
if (this.lsOutput.current_namespace !== undefined) {
placeholder += ` in ${this.lsOutput.current_namespace}`;
}

items = [TARGETLESS_ITEM];

Expand All @@ -197,7 +200,10 @@ export class TargetQuickPick {
});
}
} else if (this.activePage.targetType === undefined) {
placeholder = "Switch to another namespace";
placeholder = "Select another namespace";
if (this.lsOutput.current_namespace !== undefined) {
placeholder += ` (current: ${this.lsOutput.current_namespace})`;
}

items = this
.lsOutput
Expand All @@ -221,6 +227,11 @@ export class TargetQuickPick {
});
});
} else {
placeholder = "Select a target";
if (this.lsOutput.current_namespace !== undefined) {
placeholder += ` from ${this.lsOutput.current_namespace}`;
}

items = this
.lsOutput
.targets
Expand Down Expand Up @@ -262,12 +273,6 @@ export class TargetQuickPick {
label: p.label,
});
});

placeholder = "Select a target";
}

if (this.lsOutput.current_namespace !== undefined) {
placeholder += ` (current namespace: ${this.lsOutput.current_namespace})`;
}

return [placeholder, items];
Expand Down

0 comments on commit 385c369

Please sign in to comment.