tengo que arreglar el tema de los streams

This commit is contained in:
2025-01-12 04:19:39 -03:00
parent c362949bdc
commit db7c66e15b
6 changed files with 263 additions and 24 deletions

View File

@@ -11,7 +11,7 @@
let file:File | null = $state(null);
let confirmaGarantes: boolean = $state(false);
let clickeado: boolean = $state(false);
function handleFile(e:Event):void {
const input = e.target as HTMLInputElement;
@@ -22,7 +22,9 @@
function submit() {
if (file == null) return;
clickeado = true;
onConfirm(file, men.mensaje.split(" ").reverse()[0]);
onClose();
}
</script>
@@ -89,8 +91,14 @@
</div>
</div>
<div class="modal-footer d-flex justify-content-between">
<button class="btn btn-primary" disabled={!(confirmaGarantes && file != null)} onclick={submit} >
<button class="btn btn-primary" disabled={!(confirmaGarantes && file != null && clickeado == false)} onclick={submit} >
{#if clickeado == false}
Subir
{:else}
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
{/if}
</button>
<button type="button" class="btn btn-danger" onclick={onCancel}>Cancelar Contrato</button>
</div>