Debian Codegraph @

frontend/src/tree-table/AccountCellHeader.svelte

raw
1 <!--
2 @component
3 Header for the account column.
4 -->
5 <script lang="ts">
6 import { _ } from "../i18n";
7 import { getTreeTableContext } from "./helpers";
8
9 const { toggled } = getTreeTableContext();
10
11 const help_title = _(
12 "Hold Shift while clicking to expand all children.\n" +
13 "Hold Ctrl or Cmd while clicking to expand one level.",
14 );
15 </script>
16
17 <span title={help_title}>
18 {#if $toggled.size}
19 <button
20 type="button"
21 class="link"
22 title={_("Expand all accounts")}
23 onclick={() => {
24 toggled.set(new Set());
25 }}
26 >
27 {_("Expand all")}
28 </button>
29 {/if}
30 </span>
31
32 <style>
33 span {
34 flex: 1;
35 min-width: 14em;
36 max-width: 30em;
37 }
38
39 button {
40 margin-left: 1em;
41 font-weight: normal;
42 color: inherit;
43 opacity: 0.5;
44 }
45 </style>