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> <style>
@import 'tailwindcss'; @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; @apply text-center bg-white/30 h-60 w-full rounded-2xl block hover:text-white/30 transition-all;
}*/ }
</style> </style>

View File

@@ -42,15 +42,19 @@
</script> </script>
<div class="flex flex-row mb-2"> <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 edit}
<button
class="bg-red-500 px-3 rounded-lg ml-auto" {#if !isNewEntry}
onclick={deleteEntry} <button
> class="bg-red-500 px-3 rounded-lg"
delete onclick={deleteEntry}
</button> >
delete
</button>
{/if}
<button <button
class="bg-white/10 px-3 rounded-lg ml-1" class="bg-white/10 px-3 rounded-lg ml-1"
onclick={() => edit = false} onclick={() => edit = false}