diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-22 13:00:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 13:00:39 +0200 |
commit | 1ebddadd0704812a4600c39cabe2268321e88331 (patch) | |
tree | 1cc8560e5b63e9976aa5411ba800a62cfe7b8ea9 /client/src/app/shared/rest | |
parent | 07aea1a2642fc9868cb01e30c322514029d5b95a (diff) | |
download | PeerTube-1ebddadd0704812a4600c39cabe2268321e88331.tar.gz PeerTube-1ebddadd0704812a4600c39cabe2268321e88331.tar.zst PeerTube-1ebddadd0704812a4600c39cabe2268321e88331.zip |
predefined report reasons & improved reporter UI (#2842)
- added `startAt` and `endAt` optional timestamps to help pin down reported sections of a video
- added predefined report reasons
- added video player with report modal
Diffstat (limited to 'client/src/app/shared/rest')
-rw-r--r-- | client/src/app/shared/rest/rest.service.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/shared/rest/rest.service.ts b/client/src/app/shared/rest/rest.service.ts index cd6db1f3c..78558851a 100644 --- a/client/src/app/shared/rest/rest.service.ts +++ b/client/src/app/shared/rest/rest.service.ts | |||
@@ -46,7 +46,7 @@ export class RestService { | |||
46 | addObjectParams (params: HttpParams, object: { [ name: string ]: any }) { | 46 | addObjectParams (params: HttpParams, object: { [ name: string ]: any }) { |
47 | for (const name of Object.keys(object)) { | 47 | for (const name of Object.keys(object)) { |
48 | const value = object[name] | 48 | const value = object[name] |
49 | if (!value) continue | 49 | if (value === undefined || value === null) continue |
50 | 50 | ||
51 | if (Array.isArray(value) && value.length !== 0) { | 51 | if (Array.isArray(value) && value.length !== 0) { |
52 | for (const v of value) params = params.append(name, v) | 52 | for (const v of value) params = params.append(name, v) |
@@ -93,7 +93,7 @@ export class RestService { | |||
93 | 93 | ||
94 | return t | 94 | return t |
95 | }) | 95 | }) |
96 | .filter(t => !!t) | 96 | .filter(t => !!t || t === 0) |
97 | 97 | ||
98 | if (matchedTokens.length === 0) continue | 98 | if (matchedTokens.length === 0) continue |
99 | 99 | ||
@@ -103,7 +103,7 @@ export class RestService { | |||
103 | } | 103 | } |
104 | 104 | ||
105 | return { | 105 | return { |
106 | search: searchTokens.join(' '), | 106 | search: searchTokens.join(' ') || undefined, |
107 | 107 | ||
108 | ...additionalFilters | 108 | ...additionalFilters |
109 | } | 109 | } |