Hide delete button if new entry, reshow image styling

This commit is contained in:
2026-02-11 15:42:28 +13:00
parent 2fe5115e06
commit b8aad98b85
2 changed files with 13 additions and 9 deletions

View File

@@ -39,7 +39,7 @@
<style>
@import 'tailwindcss';
/*#img-upload-button {
#img-upload-button {
@apply text-center bg-white/30 h-60 w-full rounded-2xl block hover:text-white/30 transition-all;
}*/
}
</style>

View File

@@ -42,15 +42,19 @@
</script>
<div class="flex flex-row mb-2">
<p class="text-3xl font-bold">{entry ? formatDate(entry.date) : formatDate(newEntryDate)}</p>
<p class="text-3xl font-bold mr-auto">{entry ? formatDate(entry.date) : formatDate(newEntryDate)}</p>
{#if edit}
{#if !isNewEntry}
<button
class="bg-red-500 px-3 rounded-lg ml-auto"
class="bg-red-500 px-3 rounded-lg"
onclick={deleteEntry}
>
delete
</button>
{/if}
<button
class="bg-white/10 px-3 rounded-lg ml-1"
onclick={() => edit = false}