Making things prettier:
npx prettier --write src/routes/journals/
This commit is contained in:
@@ -83,11 +83,11 @@ $effect(() => {
|
||||
class="
|
||||
ae_journals__journal
|
||||
mx-auto
|
||||
flex w-full max-w-none min-w-0
|
||||
flex min-h-0 w-full max-w-none
|
||||
min-w-0
|
||||
flex-col
|
||||
items-stretch
|
||||
gap-1
|
||||
min-h-0
|
||||
space-y-2
|
||||
">
|
||||
<div
|
||||
@@ -197,12 +197,7 @@ Middle-click to open in new tab`}>
|
||||
.length}× Recent Entries...
|
||||
</option>
|
||||
<!-- loop through each key value -->
|
||||
{#each Object.entries(
|
||||
$journals_loc.entry_view_history_kv as Record<
|
||||
string,
|
||||
{ id: string; name: string; url: string }
|
||||
>
|
||||
).reverse() as [journal_entry_id, journal_entry_obj] (journal_entry_id)}
|
||||
{#each Object.entries($journals_loc.entry_view_history_kv as Record<string, { id: string; name: string; url: string }>).reverse() as [journal_entry_id, journal_entry_obj] (journal_entry_id)}
|
||||
<option value={journal_entry_obj.id}>
|
||||
{(journal_entry_obj?.name ||
|
||||
journal_entry_obj?.id) ??
|
||||
@@ -237,7 +232,9 @@ Middle-click to open in new tab`}>
|
||||
</a>
|
||||
{:else}
|
||||
<!-- Edit Journal button. Creates a modal to edit the journal. -->
|
||||
<Journal_entry_obj_qry {log_lvl} lq__journal_obj={$lq__journal_obj} />
|
||||
<Journal_entry_obj_qry
|
||||
{log_lvl}
|
||||
lq__journal_obj={$lq__journal_obj} />
|
||||
{/if}
|
||||
|
||||
<!-- Add default journal entry -->
|
||||
|
||||
@@ -114,7 +114,10 @@ let lq__journal_entry_obj_li = $derived(
|
||||
const journal_id = $lq__journal_obj?.journal_id;
|
||||
|
||||
return liveQuery(async () => {
|
||||
if (params.remote_first && (!Array.isArray(ids) || ids.length === 0)) {
|
||||
if (
|
||||
params.remote_first &&
|
||||
(!Array.isArray(ids) || ids.length === 0)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -258,14 +261,11 @@ async function handle_search_refresh(params: JournalSearchParams) {
|
||||
const api_ids = api_results
|
||||
.map((entry) => entry.id || entry.journal_entry_id)
|
||||
.filter((entry): entry is string => Boolean(entry));
|
||||
const display_ids = !qry_str && local_ids.length > 0 ? local_ids : api_ids;
|
||||
const display_ids =
|
||||
!qry_str && local_ids.length > 0 ? local_ids : api_ids;
|
||||
|
||||
// Protect UI cache if API returns empty during revalidation
|
||||
if (
|
||||
!qry_str &&
|
||||
local_ids.length > 0 &&
|
||||
api_ids.length === 0
|
||||
) {
|
||||
if (!qry_str && local_ids.length > 0 && api_ids.length === 0) {
|
||||
untrack(() => {
|
||||
$journals_sess.entry.qry__status = 'done';
|
||||
});
|
||||
|
||||
@@ -278,8 +278,8 @@ $effect(() => {
|
||||
flex-col
|
||||
items-stretch
|
||||
gap-1
|
||||
px-2 md:px-4
|
||||
space-y-2
|
||||
space-y-2 px-2
|
||||
md:px-4
|
||||
">
|
||||
<!-- {#if $lq__journal_entry_obj} -->
|
||||
<Journal_entry_view
|
||||
|
||||
Reference in New Issue
Block a user