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