From e29827128d721e4aa5125cc4f5eb4437a9a121fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Mon, 29 Apr 2024 10:24:50 +0100 Subject: [PATCH 1/2] web: Changes from autoformat --- web/src/components/storage/VolumeDialog.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/storage/VolumeDialog.jsx b/web/src/components/storage/VolumeDialog.jsx index 67072d96bc..f93f8773fb 100644 --- a/web/src/components/storage/VolumeDialog.jsx +++ b/web/src/components/storage/VolumeDialog.jsx @@ -163,7 +163,7 @@ class MissingSizeError { * @param {SizeMethod} sizeMethod * @param {string|number} size */ - constructor (sizeMethod, size) { + constructor(sizeMethod, size) { this.sizeMethod = sizeMethod; this.size = size; } @@ -191,7 +191,7 @@ class MissingMinSizeError { * @param {SizeMethod} sizeMethod * @param {string|number} minSize */ - constructor (sizeMethod, minSize) { + constructor(sizeMethod, minSize) { this.sizeMethod = sizeMethod; this.minSize = minSize; } @@ -220,7 +220,7 @@ class InvalidMaxSizeError { * @param {string|number} minSize * @param {string|number} maxSize */ - constructor (sizeMethod, minSize, maxSize) { + constructor(sizeMethod, minSize, maxSize) { this.sizeMethod = sizeMethod; this.minSize = minSize; this.maxSize = maxSize; @@ -735,7 +735,7 @@ export default function VolumeDialog({ onChange={updateData} /> Date: Mon, 29 Apr 2024 10:38:43 +0100 Subject: [PATCH 2/2] web: Distinguish "Other" from predefined mount points In the "Add file system" menu. --- .../components/storage/PartitionsField.jsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/web/src/components/storage/PartitionsField.jsx b/web/src/components/storage/PartitionsField.jsx index dc971ff49c..c4a5631e16 100644 --- a/web/src/components/storage/PartitionsField.jsx +++ b/web/src/components/storage/PartitionsField.jsx @@ -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"; @@ -596,11 +596,18 @@ const AddVolumeButton = ({ options, onClick }) => { > {options.map((option, index) => { - return ( - - {option === "" ? _("Other") : option} - - ); + if (option === "") { + return ( + + + {_("Other")} + + ); + } else { + return ( + {option} + ); + } })}