Print messages in folder

This commit is contained in:
Melon 2023-11-25 09:46:18 +00:00
parent 1be9ad77b5
commit 6fbb790fcd
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -1,17 +1,24 @@
<script lang="ts"> <script lang="ts">
import type {MailFolder} from "../logic/folder";
import type {ImapMessage} from "../types/imap"; import type {ImapMessage} from "../types/imap";
import type {FolderSelection} from "../types/internal";
export let folder: FolderSelection; export let folder: MailFolder;
export let messages: ImapMessage[]; export let messages: ImapMessage[];
</script> </script>
<code> <h2>{folder.name}</h2>
<pre>{JSON.stringify(folder, null, 2)}</pre> {#if messages}
</code> {#each messages as msg}
<code> <div class="msg">
<pre>{JSON.stringify(messages, null, 2)}</pre> <h3>{msg.Envelope.Subject}</h3>
</code> <h3>{msg.Envelope.From}</h3>
<h3>{msg.Envelope.Date}</h3>
</div>
{/each}
{/if}
<style lang="scss"> <style lang="scss">
.msg {
border-bottom: 1px solid white;
}
</style> </style>