diff --git a/client/src/components/files.vue b/client/src/components/files.vue index 359eda8..84b34c8 100644 --- a/client/src/components/files.vue +++ b/client/src/components/files.vue @@ -14,39 +14,57 @@
-

{{ $t('files.downloads') }}

+

+ {{ $t('files.downloads') }} + +

{{ download.name }}

{{ Math.min(100, Math.round((download.progress / download.size) * 100)) }}%

+
{{ download.error }}
-

{{ $t('files.uploads') }}

+

+ {{ $t('files.uploads') }} + +

{{ upload.name }}

{{ Math.min(100, Math.round((upload.progress / upload.size) * 100)) }}%

+
{{ upload.error }}
{ - this.$log.error(err) + .catch((error) => { + this.$log.error(error) + + transfer.status = 'failed' + transfer.error = error.message }) this.$accessor.files.addTransfer(transfer) @@ -360,8 +393,11 @@ } }, }) - .catch((err) => { - this.$log.error(err) + .catch((error) => { + this.$log.error(error) + + transfer.status = 'failed' + transfer.error = error.message }) this.$accessor.files.addTransfer(transfer) diff --git a/client/src/neko/types.ts b/client/src/neko/types.ts index ab6a813..bc4d046 100644 --- a/client/src/neko/types.ts +++ b/client/src/neko/types.ts @@ -35,6 +35,7 @@ export interface FileTransfer { direction: 'upload' | 'download' size: number progress: number - status: 'pending' | 'inprogress' | 'completed' - abortController: AbortController | null + status: 'pending' | 'inprogress' | 'completed' | 'failed' + error?: string + abortController?: AbortController }