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 { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import * as Lucide from 'lucide-svelte';
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
@@ -614,7 +615,12 @@ $effect(() => {
|
||||
}
|
||||
}}>
|
||||
<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>
|
||||
|
||||
<div
|
||||
@@ -626,6 +632,7 @@ $effect(() => {
|
||||
link_to_type="archive_content"
|
||||
link_to_id={$idaa_slct.archive_content_obj
|
||||
.archive_content_id}
|
||||
multiple={false}
|
||||
bind:hosted_file_id_li={hosted_file_id_li_local}
|
||||
bind:hosted_file_obj_li={hosted_file_obj_li_local}
|
||||
bind:upload_complete={upload_complete_local}
|
||||
@@ -633,18 +640,19 @@ $effect(() => {
|
||||
{#snippet label()}
|
||||
<div
|
||||
class="flex flex-col items-center gap-2 py-2">
|
||||
<div
|
||||
<!-- <div
|
||||
class="bg-primary-500/10 text-primary-500 rounded-full p-3">
|
||||
<span class="fas fa-upload fa-lg"
|
||||
></span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="text-center">
|
||||
<p
|
||||
class="text-primary-500 font-bold">
|
||||
<Lucide.Upload size="1.25em" class="inline-block mr-1" />
|
||||
Upload archive files
|
||||
</p>
|
||||
<p class="text-xs opacity-60">
|
||||
Recommended: pptx, key, PDF,
|
||||
Recommended: pptx, key, pdf,
|
||||
mp3, mp4, docx
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user