More style improvements when in edit mode
This commit is contained in:
@@ -713,16 +713,18 @@ $effect(() => {
|
||||
</div>
|
||||
|
||||
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
||||
<div
|
||||
ondblclick={() => {
|
||||
if ($ae_loc.trusted_access) {
|
||||
if ($ae_loc.trusted_access && $ae_loc.edit_mode) {
|
||||
// Toggle edit mode
|
||||
$journals_loc.entry.edit = !$journals_loc.entry.edit;
|
||||
$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] = $journals_loc.entry.edit;
|
||||
}
|
||||
}}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
role={$ae_loc.edit_mode ? 'button' : 'article'}
|
||||
tabindex={$ae_loc.edit_mode ? 0 : -1}
|
||||
class:bg-orange-100={$ae_loc.edit_mode}
|
||||
class:hidden={!$ae_loc.trusted_access || $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id]}
|
||||
class="w-full font-mono shadow-md rounded-lg border-gray-500 bg-gray-100 p-2"
|
||||
>
|
||||
@@ -740,13 +742,13 @@ $effect(() => {
|
||||
<textarea
|
||||
bind:value={tmp_entry_obj.content}
|
||||
ondblclick={() => {
|
||||
if ($ae_loc.trusted_access) {
|
||||
if ($ae_loc.trusted_access && $ae_loc.edit_mode) {
|
||||
// Toggle edit mode
|
||||
$journals_loc.entry.edit = !$journals_loc.entry.edit;
|
||||
$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] = $journals_loc.entry.edit;
|
||||
}
|
||||
}}
|
||||
|
||||
class:bg-orange-100={$ae_loc.edit_mode}
|
||||
class="w-full min-h-10 h-96 p-2 border border-gray-300 rounded-lg"
|
||||
placeholder="Edit journal entry content here..."
|
||||
></textarea>
|
||||
|
||||
Reference in New Issue
Block a user