Last minute clean up before wrapping up for the day.
This commit is contained in:
@@ -347,7 +347,7 @@ $effect(async () => {
|
||||
onclick={() => {
|
||||
// Ask if they would like to save changes before toggling edit mode off.
|
||||
if ($journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id]) {
|
||||
if (tmp_entry_obj_changed && confirm('Would you like to save changes to this journal entry before exiting edit mode?')) {
|
||||
if (tmp_entry_obj_changed && confirm('Would you like to save changes to this journal entry before exiting edit mode? Your changes will be lost if the page is refreshed.')) {
|
||||
update_journal_entry();
|
||||
}
|
||||
}
|
||||
@@ -949,6 +949,7 @@ $effect(async () => {
|
||||
class="
|
||||
flex-grow min-h-48 h-full w-full
|
||||
p-2
|
||||
font-mono
|
||||
bg-slate-100 text-gray-900
|
||||
dark:bg-slate-900 dark:text-gray-100
|
||||
shadow-lg rounded-lg
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user