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 22 : export function make_locked_encrypted_data_card(next, block) {
15 22 : return new_card({
16 22 : title: _("Locked data"),
17 22 : next,
18 22 : page_block: block,
19 22 : component: StorageCard,
20 22 : props: { block },
21 22 : actions: [
22 3 : { title: _("Unlock"), action: () => unlock(block) },
23 22 : std_format_action(block, null),
24 22 : ]
25 22 : });
26 22 : }
|