fix: Resolve props_invalid_value error and add each block keys\n\n- Initialized .files.upload_complete in src/routes/hosted_files/video_util/+page.svelte to prevent props_invalid_value error.\n- Removed commented-out, unused each blocks from several components.\n- Added each keys to improve reactivity and resolve svelte/require-each-key errors in several components.

This commit is contained in:
Scott Idem
2025-11-20 20:21:06 -05:00
parent a68d5439bd
commit b91d79c175
8 changed files with 14 additions and 31 deletions

View File

@@ -165,9 +165,6 @@
</script>
<section class="{class_li_default} {class_li}">
<!-- <h3 class="h3">{hosted_file_obj_li.length}&times; files uploaded</h3>
{#each hosted_file_obj_li as hosted_file_obj, i} -->
<h3 class="h3">
{Object.entries(hosted_file_obj_kv).length}× files uploaded
</h3>

View File

@@ -390,11 +390,7 @@
<!-- <span class="fas fa-save m-1"></span> -->
<span class="grow font-bold">
{#if $ae_sess.files.processed_file_list?.length > 0}
<!-- {#each $ae_sess.files.processed_file_list as file_obj, index}
<span class="text-xs">
{file_obj.filename}
</span>
{/each} -->
{$ae_sess.files.processed_file_list.length == 1
? `${$ae_sess.files.processed_file_list.length} file`
: `${$ae_sess.files.processed_file_list.length} files`}

View File

@@ -335,11 +335,7 @@
<!-- <span class="fas fa-save m-1"></span> -->
<span class="grow font-bold">
{#if $ae_sess.files.processed_file_list?.length > 0}
<!-- {#each $ae_sess.files.processed_file_list as file_obj, index}
<span class="text-xs">
{file_obj.filename}
</span>
{/each} -->
{$ae_sess.files.processed_file_list.length == 1
? `${$ae_sess.files.processed_file_list.length} file`
: `${$ae_sess.files.processed_file_list.length} files`}

View File

@@ -161,7 +161,7 @@
{/if}
<tbody>
{#each $lq__event_file_obj_li as event_file_obj}
{#each $lq__event_file_obj_li as event_file_obj (event_file_obj.event_file_id)}
<tr
class="ae_obj obj_event_file border-t border-b border-gray-200 hover:bg-gray-50 hover:border-gray-300"
class:dim={event_file_obj?.hide}

View File

@@ -117,20 +117,7 @@
);
</script>
<!-- {#if lq__hosted_file_obj_li}
<h3 class="h3">{lq__hosted_file_obj_li.length}&times; files clipped</h3>
<div class="container">
<ol>
{#each lq__hosted_file_obj_li as hosted_file_obj}
<li>
{hosted_file_obj.filename}
</li>
{/each}
</ol>
</div>
{:else}
<p>No files found</p>
{/if} -->
{#if lq__hosted_file_obj_li}
<Element_manage_hosted_file_li

View File

@@ -148,7 +148,7 @@
obj={sql_qry_result[0]}
primary_obj_li_type=""
/>
{#each sql_qry_result as record}
{#each sql_qry_result as record, index (index)}
<Element_obj_tbl_row obj={record} primary_obj_li_type="" />
{/each}
</table>

View File

@@ -501,7 +501,7 @@ ae_open:event_file=Kljq0uiTlXt (video)
<h2 class="text-center underline">Messages [grp, client, target, type]</h2>
<ol class="list-decimal list-outside max-h-24 overflow-y-auto messages">
{#each ws_received_list_other as msg_entry, index}
{#each ws_received_list_other as msg_entry, index (index)}
<li class="ml-4">
<div class="flex flex-row justify-between gap-1 w-full">
<span>
@@ -530,7 +530,7 @@ ae_open:event_file=Kljq0uiTlXt (video)
<h2 class="text-center underline">Commands</h2>
<ol class="list-decimal list-outside max-h-24 overflow-y-auto commands">
{#each ws_received_list_cmd as cmd_entry}
{#each ws_received_list_cmd as cmd_entry, index (index)}
<li class="ml-4">
<div class="flex flex-row justify-between gap-1 w-full">
<span>

View File

@@ -60,6 +60,13 @@
$ae_loc.files.processed_file_kv = {};
}
if (!$ae_sess.files) {
$ae_sess.files = {};
}
if (typeof $ae_sess.files.upload_complete === 'undefined') {
$ae_sess.files.upload_complete = false;
}
$effect(() => {
// if ($ae_sess.files.upload_complete && $ae_sess.files.uploaded_file_li) {
// // Append this list to the $ae_loc.files.uploaded_file_li list