diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-07 15:42:14 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-01-09 09:25:32 +0100 |
commit | c511c3f010c45e08e7736a935bf721527db806c8 (patch) | |
tree | 5abc1ddd09b4d5b9b779f6d057fbda58015eab68 /client/src/app/shared/misc | |
parent | fbc77eb648bda9add4634c08dbb6af48c3670b5d (diff) | |
download | PeerTube-c511c3f010c45e08e7736a935bf721527db806c8.tar.gz PeerTube-c511c3f010c45e08e7736a935bf721527db806c8.tar.zst PeerTube-c511c3f010c45e08e7736a935bf721527db806c8.zip |
Show default avatar on network error for comments
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r-- | client/src/app/shared/misc/utils.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts index b1d1fc0b5..096fd61e2 100644 --- a/client/src/app/shared/misc/utils.ts +++ b/client/src/app/shared/misc/utils.ts | |||
@@ -4,6 +4,10 @@ import { DatePipe } from '@angular/common' | |||
4 | import { environment } from '../../../environments/environment' | 4 | import { environment } from '../../../environments/environment' |
5 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
6 | 6 | ||
7 | type ElementEvent = Omit<Event, 'target'> & { | ||
8 | target: HTMLElement | ||
9 | } | ||
10 | |||
7 | function getParameterByName (name: string, url: string) { | 11 | function getParameterByName (name: string, url: string) { |
8 | if (!url) url = window.location.href | 12 | if (!url) url = window.location.href |
9 | name = name.replace(/[\[\]]/g, '\\$&') | 13 | name = name.replace(/[\[\]]/g, '\\$&') |
@@ -190,6 +194,7 @@ function isXPercentInViewport (el: HTMLElement, percentVisible: number) { | |||
190 | } | 194 | } |
191 | 195 | ||
192 | export { | 196 | export { |
197 | ElementEvent, | ||
193 | sortBy, | 198 | sortBy, |
194 | durationToString, | 199 | durationToString, |
195 | lineFeedToHtml, | 200 | lineFeedToHtml, |