Skip to content

Commit

Permalink
web: Distinguish "Other" from predefined mount points
Browse files Browse the repository at this point in the history
In the "Add file system" menu.
  • Loading branch information
dgdavid committed Apr 29, 2024
1 parent e1a31ff commit 863d461
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions web/src/components/storage/PartitionsField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import React, { useState } from "react";
import {
Button, Dropdown, DropdownList, DropdownItem, List, ListItem, MenuToggle, Skeleton
Button, Divider, Dropdown, DropdownList, DropdownItem, List, ListItem, MenuToggle, Skeleton
} from '@patternfly/react-core';
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import { sprintf } from "sprintf-js";
Expand Down Expand Up @@ -596,11 +596,18 @@ const AddVolumeButton = ({ options, onClick }) => {
>
<DropdownList>
{options.map((option, index) => {
return (
<DropdownItem key={index} value={option}>
{option === "" ? _("Other") : option}
</DropdownItem>
);
if (option === "") {
return (
<React.Fragment key="other-option">
<Divider component="li" key="separator" />
<DropdownItem key={index} value={option}>{_("Other")}</DropdownItem>
</React.Fragment>
);
} else {
return (
<DropdownItem key={index} value={option}><b>{option}</b></DropdownItem>
);
}
})}
</DropdownList>
</Dropdown>
Expand Down

0 comments on commit 863d461

Please sign in to comment.