mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-02-04 15:01:46 +00:00
refactor: remove unneeded divider in storage class action menu (#460)
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
c289b001db
commit
76605fdc07
@ -94,13 +94,14 @@ export default class HciStorageClass extends StorageClass {
|
|||||||
get availableActions() {
|
get availableActions() {
|
||||||
let out = super.availableActions || [];
|
let out = super.availableActions || [];
|
||||||
|
|
||||||
out = out.map((action) => {
|
if (this.isInternalStorageClass()) {
|
||||||
if ((action.action === 'setDefault' || action.action === 'setAsDefault' || action.action === 'promptRemove') && this.isInternalStorageClass()) {
|
out = out.filter((action) => {
|
||||||
return { ...action, enabled: false };
|
return !['setDefault', 'setAsDefault', 'promptRemove'].includes(action.action);
|
||||||
}
|
});
|
||||||
|
}
|
||||||
return action;
|
if (out[0] && out[0].divider === true) {
|
||||||
});
|
out = out.slice(1);
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user