You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
924 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. <script lang="ts">
  2. import Boi from "../components/Boi.svelte";
  3. import GroupEntry from "../components/GroupEntry.svelte";
  4. import type { ModalData } from "../stores/modal";
  5. import groupStore from "../stores/group";
  6. import TableOfContent from "../components/TableOfContent.svelte";
  7. import RefreshSelection from "../components/RefreshSelection.svelte";
  8. const mdGroupAdd: ModalData = {name: "group.add"};
  9. $: {
  10. if ($groupStore.stale && !$groupStore.loading) {
  11. groupStore.load();
  12. }
  13. }
  14. </script>
  15. <div class="page">
  16. <TableOfContent groups={$groupStore.groups} />
  17. {#each $groupStore.groups as group (group.id)}
  18. <GroupEntry showAllOptions group={group} />
  19. {/each}
  20. <Boi open={mdGroupAdd}>Add Group</Boi>
  21. </div>
  22. <RefreshSelection />
  23. <style>
  24. div.page {
  25. display: block;
  26. margin: auto;
  27. max-width: 100%;
  28. width: 640px;
  29. margin-top: 0;
  30. box-sizing: border-box;
  31. }
  32. </style>