Limit archive content upload to single file; improve file section UX
Restrict upload to one file (each archive content item maps to one file); contextual toggle button text (Switch to Select / Switch to Upload); swap FontAwesome upload icon for Lucide. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
// *** Import Svelte core
|
// *** Import Svelte core
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { fade } from 'svelte/transition';
|
import { fade } from 'svelte/transition';
|
||||||
|
import * as Lucide from 'lucide-svelte';
|
||||||
|
|
||||||
// *** Import Aether core variables and functions
|
// *** Import Aether core variables and functions
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
@@ -614,7 +615,12 @@ $effect(() => {
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<span class="fas fa-exchange-alt m-1"></span>
|
<span class="fas fa-exchange-alt m-1"></span>
|
||||||
Upload/Select
|
{#if $ae_sess.files.add_to_use_files_method ==
|
||||||
|
'upload'}
|
||||||
|
Switch to Select
|
||||||
|
{:else}
|
||||||
|
Switch to Upload
|
||||||
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -626,6 +632,7 @@ $effect(() => {
|
|||||||
link_to_type="archive_content"
|
link_to_type="archive_content"
|
||||||
link_to_id={$idaa_slct.archive_content_obj
|
link_to_id={$idaa_slct.archive_content_obj
|
||||||
.archive_content_id}
|
.archive_content_id}
|
||||||
|
multiple={false}
|
||||||
bind:hosted_file_id_li={hosted_file_id_li_local}
|
bind:hosted_file_id_li={hosted_file_id_li_local}
|
||||||
bind:hosted_file_obj_li={hosted_file_obj_li_local}
|
bind:hosted_file_obj_li={hosted_file_obj_li_local}
|
||||||
bind:upload_complete={upload_complete_local}
|
bind:upload_complete={upload_complete_local}
|
||||||
@@ -633,18 +640,19 @@ $effect(() => {
|
|||||||
{#snippet label()}
|
{#snippet label()}
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center gap-2 py-2">
|
class="flex flex-col items-center gap-2 py-2">
|
||||||
<div
|
<!-- <div
|
||||||
class="bg-primary-500/10 text-primary-500 rounded-full p-3">
|
class="bg-primary-500/10 text-primary-500 rounded-full p-3">
|
||||||
<span class="fas fa-upload fa-lg"
|
<span class="fas fa-upload fa-lg"
|
||||||
></span>
|
></span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<p
|
<p
|
||||||
class="text-primary-500 font-bold">
|
class="text-primary-500 font-bold">
|
||||||
|
<Lucide.Upload size="1.25em" class="inline-block mr-1" />
|
||||||
Upload archive files
|
Upload archive files
|
||||||
</p>
|
</p>
|
||||||
<p class="text-xs opacity-60">
|
<p class="text-xs opacity-60">
|
||||||
Recommended: pptx, key, PDF,
|
Recommended: pptx, key, pdf,
|
||||||
mp3, mp4, docx
|
mp3, mp4, docx
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user