Added Download file, play for homebrews and ZIP explorer.

This commit is contained in:
2026-06-16 18:35:01 +02:00
parent 7e1e26f20b
commit 279160c1cb
12 changed files with 215 additions and 24 deletions

View File

@@ -105,6 +105,29 @@ export function FSUploader(){
},
handleDownloadFile( index ){
let download_url = this.files[index].download_url;
window.location.href = download_url;
},
async handleFileExplorer( index ){
if( this.files[index].file_explorer_files !== null )
return;
let file_explorer_url = this.files[index].file_explorer;
let response = await fetch(file_explorer_url, { method: 'GET', headers: { 'Content-Type': 'application/json' } });
let json = await response.json();
if( !json.files ){
this.files[index].file_explorer_files = [ "An error occurred during request" ];
return;
}
this.files[index].file_explorer_files = json.files;
},
/**
* Retry file uploading.
*
@@ -126,6 +149,8 @@ export function FSUploader(){
* @param {number} index FSFileData index in this.files.
*/
handleRemoveFile( index ){
if( this.files[index].state === 'archived')
return;
this.files.splice(index, 1);
},