Skip to content

Commit

Permalink
chore: Adding distribution type
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Junk committed Oct 6, 2023
1 parent 89b9229 commit 4660a21
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/feedview/feed/distributions/Distribution.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

<script lang="ts">
import { loadFeed } from "$lib/urlloader";
export let distribution: any;
import type { Distribution } from "./distributiontype";
export let distribution: Distribution;
const openFeed = (e: Event) => {
loadFeed((e.target as Element).getAttribute("href")!, e);
e.preventDefault();
Expand Down
12 changes: 12 additions & 0 deletions src/lib/feedview/feed/distributions/distributiontype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@
// Software-Engineering: 2023 Intevation GmbH <https://intevation.de>

// place files you want to import through the `$lib` alias in this folder.

export type Feed = {
summary: string;
tlp_label: string;
url: string;
};

export type Distribution = {
rolie: {
feeds: Feed[];
};
};
2 changes: 1 addition & 1 deletion src/lib/singleview/acknowledgments/Acknowledgment.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import type { Acknowledgement } from "../docmodel/docmodeltypes";
export let ack: Acknowledgement;
const keys: Array<String> = [];
const values: any = [];
const values: string[] = [];
if (ack.names) {
keys.push("Names");
values.push(ack.names.join(", "));
Expand Down

0 comments on commit 4660a21

Please sign in to comment.