tentative fix for caching issues (#3), plus ux cleanup

This commit is contained in:
Danny Morabito 2024-11-29 00:03:40 +01:00
parent b5bb27e1b2
commit 4fdf8b57c9
Signed by: dannym
GPG key ID: 7CC8056A5A04557E
3 changed files with 52 additions and 56 deletions

View file

@ -6,6 +6,7 @@
import Dialog from './Dialog.svelte'; import Dialog from './Dialog.svelte';
import Select from './Select.svelte'; import Select from './Select.svelte';
import type { Letter } from '$lib/letter'; import type { Letter } from '$lib/letter';
import { slide } from 'svelte/transition';
let { let {
letters, letters,
@ -112,7 +113,8 @@
{#snippet letterGroup(letters)} {#snippet letterGroup(letters)}
<div class="letter-group"> <div class="letter-group">
{#each letters as letter} {#each letters as letter}
<a class="letter-item" href="/letters/{letter.id}"> {#key letter.id}
<a in:slide out:slide class="letter-item" href="/letters/{letter.id}">
<div class="subject-line"> <div class="subject-line">
<div class="letter-subject"> <div class="letter-subject">
<Icon icon="mdi:letter-outline" /> {letter.subject} <Icon icon="mdi:letter-outline" /> {letter.subject}
@ -142,6 +144,7 @@
</div> </div>
<div class="letter-preview">{letter.preview}</div> <div class="letter-preview">{letter.preview}</div>
</a> </a>
{/key}
{/each} {/each}
</div> </div>
{/snippet} {/snippet}
@ -161,6 +164,7 @@
<div class="letter-list"> <div class="letter-list">
<div class="letter-group"> <div class="letter-group">
{#each letters as letter} {#each letters as letter}
{#key letter.id}
<div class="letter-item" <div class="letter-item"
onclick={() => clickedLetter(letter)} onclick={() => clickedLetter(letter)}
class:selected={selectedLetters.includes(letter.id)} class:selected={selectedLetters.includes(letter.id)}
@ -180,6 +184,7 @@
<NostrIdentifier user={letter.from.npub} emailAddress={letter.emailAddress} /> <NostrIdentifier user={letter.from.npub} emailAddress={letter.emailAddress} />
</div> </div>
</div> </div>
{/key}
{/each} {/each}
</div> </div>
</div> </div>

View file

@ -111,7 +111,7 @@
<Icon icon="ph:user" /> <Icon icon="ph:user" />
{/if} {/if}
</div> </div>
{#if npub !== displayString} {#if npub !== displayString && !emailAddress}
<Tooltip position="bottom" content={npub}> <Tooltip position="bottom" content={npub}>
<span class="user-text">{displayString}</span> <span class="user-text">{displayString}</span>
</Tooltip> </Tooltip>

View file

@ -5,15 +5,6 @@ import { TokenInfoWithMailSubscriptionDuration } from '@arx/utils';
function parseTextPlainContent(mimeMessage: string) { function parseTextPlainContent(mimeMessage: string) {
const boundary = mimeMessage.split('\n')[0]; const boundary = mimeMessage.split('\n')[0];
// --7408fffb1a494ae39c2dde2c60878849
// Content-Type: text/plain
// Content-Transfer-Encoding: 7bit
//
// test
// --7408fffb1a494ae39c2dde2c60878849
// Content-Type: text/html
// Content-Transfer-Encoding: 7bit
const boundaries = mimeMessage.split(boundary + '\n'); const boundaries = mimeMessage.split(boundary + '\n');
boundaries.shift(); boundaries.shift();