Line data Source code
1 : /*
2 : * Copyright (C) 2023 Red Hat, Inc.
3 : * SPDX-License-Identifier: LGPL-2.1-or-later
4 : */
5 :
6 113 : import cockpit from "cockpit";
7 :
8 : import { StorageCard, new_card } from "../pages.jsx";
9 : import { std_format_action } from "../block/actions.jsx";
10 : import { unlock } from "./actions.jsx";
11 :
12 113 : const _ = cockpit.gettext;
13 :
14 21 : export function make_locked_encrypted_data_card(next, block) {
15 21 : return new_card({
16 21 : title: _("Locked data"),
17 21 : next,
18 21 : page_block: block,
19 21 : component: StorageCard,
20 21 : props: { block },
21 21 : actions: [
22 3 : { title: _("Unlock"), action: () => unlock(block) },
23 21 : std_format_action(block, null),
24 21 : ]
25 21 : });
26 21 : }
|