Last minute clean up before wrapping up for the day.

This commit is contained in:
Scott Idem
2025-04-28 17:37:36 -04:00
parent 12167a3bc6
commit cbb73ed3fd
2 changed files with 40 additions and 3 deletions

View File

@@ -7,9 +7,9 @@ import { Modal } from 'flowbite-svelte';
import {
CalendarClock, Check, CodeXml, Copy,
Eye, EyeOff,
Flag, FlagOff,
FileLock, Fingerprint, Flag, FlagOff,
Group,
ListPlus,
ListPlus, Lock,
NotebookPen, NotebookText, NotepadTextDashed,
RemoveFormatting,
Shapes, Siren,
@@ -158,6 +158,7 @@ $effect(() => {
</h3>
{#if !journals_journal_entry_obj.private}
<span class="flex flex-row flex-wrap gap-1">
<!-- Button to copy the Markdown version -->
<button
@@ -288,6 +289,41 @@ $effect(() => {
</button>
</span>
{:else}
<span class="flex flex-row flex-wrap gap-1 items-center justify-center">
<Lock size="1.25em" class="mx-1 inline-block text-red-400 dark:text-red-600" />
<!-- <EyeOff size="1.25em" class="mx-1 inline-block text-red-400 dark:text-red-600" /> -->
<span class="text-xs text-gray-500 hidden">Private</span>
<!-- Button to copy the Markdown version -->
<button
type="button"
onclick={() => {
let tmp_entry_obj = journals_journal_entry_obj;
navigator.clipboard.writeText(tmp_entry_obj.content_encrypted).then(() => {
alert('Encrypted content copied to clipboard!');
}).catch((error) => {
console.error('Failed to copy content:', error);
alert('Failed to copy content.');
});
}}
class:hidden={journals_journal_entry_obj.template}
class="btn btn-sm p-1 variant-soft-secondary hover:variant-filled-secondary *:hover:inline text-xs lg:text-sm"
title="Copy the encrypted content"
>
<!-- <span class="fas fa-copy mx-1"></span> -->
<Copy size="1em" />
<Fingerprint size="1.25em" />
<span class="hidden">
Copy Encrypted
</span>
</button>
</span>
{/if}
</span>