diff --git a/pkg/storaged/block/create-pages.jsx b/pkg/storaged/block/create-pages.jsx index b9b6c5b5de43..a0c32f653ee7 100644 --- a/pkg/storaged/block/create-pages.jsx +++ b/pkg/storaged/block/create-pages.jsx @@ -87,7 +87,6 @@ export function make_block_page(parent, block, card) { card = make_filesystem_card(card, block, null, fstab_config); } else { card = make_encryption_card(card, block, false); - card = make_locked_encrypted_data_card(card, block); } } else { const is_filesystem = content_block.IdUsage == 'filesystem'; @@ -95,7 +94,7 @@ export function make_block_page(parent, block, card) { const block_swap = client.blocks_swap[content_block.path]; if (is_crypto) - card = make_encryption_card(card, block, is_filesystem); + card = make_encryption_card(card, block, is_filesystem && !(block_btrfs_blockdev && !single_device_volume)); if (block_btrfs_blockdev) { if (single_device_volume) @@ -116,7 +115,7 @@ export function make_block_page(parent, block, card) { (content_block.IdUsage == "other" && content_block.IdType == "swap")) { card = make_swap_card(card, block, content_block); } else if (client.blocks_available[content_block.path]) { - card = make_unformatted_data_card(card, block, content_block); + // No card for unformatted data } else { card = make_unrecognized_data_card(card, block, content_block); } diff --git a/pkg/storaged/crypto/encryption.jsx b/pkg/storaged/crypto/encryption.jsx index c875698d6986..d35ec414c4ef 100644 --- a/pkg/storaged/crypto/encryption.jsx +++ b/pkg/storaged/crypto/encryption.jsx @@ -44,7 +44,7 @@ export function make_encryption_card(next, block, is_filesystem) { return new_card({ title: _("Encryption"), next, - type_extra: _("encrypted"), + type_extra: content_block ? _("encrypted") : _("locked"), component: EncryptionCard, props: { block }, actions: [ diff --git a/pkg/storaged/pages.jsx b/pkg/storaged/pages.jsx index fbdf070d4489..6dcee584b5cc 100644 --- a/pkg/storaged/pages.jsx +++ b/pkg/storaged/pages.jsx @@ -395,20 +395,22 @@ const ActionButtons = ({ card }) => { return buttons; }; -function page_type_extra(page) { +function page_type(page) { + let type = null; const extra = []; + let c = page.card; while (c) { if (c.type_extra) extra.push(c.type_extra); + else if (!type) + type = c.title; c = c.next; } - return extra; -} -function page_type(page) { - const type = page.card.title; - const extra = page_type_extra(page); + if (!type) + type = extra.shift(); + if (extra.length > 0) return type + " (" + extra.join(", ") + ")"; else