aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/helpers/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-21 17:46:37 +0200
committerChocobozzz <me@florianbigard.com>2023-07-25 11:53:08 +0200
commitf42fcb4b58f146c2e5ace236548a99d361ade55f (patch)
treeafddb566b00a02770043c04257ccd1bc7be3d462 /client/src/app/helpers/utils
parent12dc3a942a13c7f1489822dae052da197ef15905 (diff)
downloadPeerTube-f42fcb4b58f146c2e5ace236548a99d361ade55f.tar.gz
PeerTube-f42fcb4b58f146c2e5ace236548a99d361ade55f.tar.zst
PeerTube-f42fcb4b58f146c2e5ace236548a99d361ade55f.zip
Implement video file replacement in client
Diffstat (limited to 'client/src/app/helpers/utils')
-rw-r--r--client/src/app/helpers/utils/upload.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/helpers/utils/upload.ts b/client/src/app/helpers/utils/upload.ts
index d7e1f7237..b60951612 100644
--- a/client/src/app/helpers/utils/upload.ts
+++ b/client/src/app/helpers/utils/upload.ts
@@ -5,14 +5,15 @@ import { HttpStatusCode } from '@shared/models'
5function genericUploadErrorHandler (options: { 5function genericUploadErrorHandler (options: {
6 err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'> 6 err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'>
7 name: string 7 name: string
8 notifier: Notifier 8 notifier?: Notifier
9 sticky?: boolean 9 sticky?: boolean
10}) { 10}) {
11 const { err, name, notifier, sticky = false } = options 11 const { err, name, notifier, sticky = false } = options
12 const title = $localize`Upload failed` 12 const title = $localize`Upload failed`
13 const message = buildMessage(name, err) 13 const message = buildMessage(name, err)
14 14
15 notifier.error(message, title, null, sticky) 15 if (notifier) notifier.error(message, title, null, sticky)
16
16 return message 17 return message
17} 18}
18 19