fix(launcher): resolve 'download' filename bug and refactor data_url to global page state
- Updated 'handle_open_file' in launcher_file_cont.svelte to correctly pass filename to API. - Fixed WebSocket ae_download command in launcher layout to include filename. - Implemented a safety net in api_get_object.ts to extract filename from params if missing. - Added 'download' attribute to Hosted Files download button for direct links. - Refactored launcher menu components to use Svelte 5 global 'page' state instead of obsolete 'data_url' prop.
This commit is contained in:
@@ -57,6 +57,10 @@ export const get_object = async function get_object({
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!filename && params.filename) {
|
||||
filename = params.filename;
|
||||
}
|
||||
|
||||
const url = new URL(endpoint, api_cfg['base_url']);
|
||||
Object.keys(params).forEach((key) => url.searchParams.append(key, params[key]));
|
||||
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
{#if show_direct_download}
|
||||
<a
|
||||
href={direct_download_url}
|
||||
download={ae_util.clean_filename(final_filename)}
|
||||
class={variant_classes}
|
||||
title={`Direct download (V3 Action):\n${final_filename}\n[API] SHA256: ${hosted_file_obj?.hash_sha256?.slice(0, 10)}...\nHosted ID: ${file_id}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user