aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-30 11:53:38 +0100
committerChocobozzz <me@florianbigard.com>2020-01-30 11:53:38 +0100
commitca6d36227a9273f616a462d3aad6a721ab5dd627 (patch)
treea1610578e719ddb2c58199f06dd4eae436d25c0a /shared
parent215304eaa06020f27152108567c6a9de16b220d3 (diff)
downloadPeerTube-ca6d36227a9273f616a462d3aad6a721ab5dd627.tar.gz
PeerTube-ca6d36227a9273f616a462d3aad6a721ab5dd627.tar.zst
PeerTube-ca6d36227a9273f616a462d3aad6a721ab5dd627.zip
Add url field in caption and use it for thumbnails
Diffstat (limited to 'shared')
-rw-r--r--shared/models/activitypub/objects/common-objects.ts1
-rw-r--r--shared/models/activitypub/objects/video-torrent-object.ts4
-rw-r--r--shared/models/users/user-role.ts6
3 files changed, 6 insertions, 5 deletions
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
index de1116ab3..bab3ce366 100644
--- a/shared/models/activitypub/objects/common-objects.ts
+++ b/shared/models/activitypub/objects/common-objects.ts
@@ -1,6 +1,7 @@
1export interface ActivityIdentifierObject { 1export interface ActivityIdentifierObject {
2 identifier: string 2 identifier: string
3 name: string 3 name: string
4 url?: string
4} 5}
5 6
6export interface ActivityIconObject { 7export interface ActivityIconObject {
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index 239822bc4..cadd0ea49 100644
--- a/shared/models/activitypub/objects/video-torrent-object.ts
+++ b/shared/models/activitypub/objects/video-torrent-object.ts
@@ -30,7 +30,9 @@ export interface VideoTorrentObject {
30 mediaType: 'text/markdown' 30 mediaType: 'text/markdown'
31 content: string 31 content: string
32 support: string 32 support: string
33 icon: ActivityIconObject 33
34 icon: ActivityIconObject[]
35
34 url: ActivityUrlObject[] 36 url: ActivityUrlObject[]
35 likes: string 37 likes: string
36 dislikes: string 38 dislikes: string
diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts
index 0b6554e51..ae3a0d983 100644
--- a/shared/models/users/user-role.ts
+++ b/shared/models/users/user-role.ts
@@ -7,15 +7,13 @@ export enum UserRole {
7 USER = 2 7 USER = 2
8} 8}
9 9
10// TODO: use UserRole for key once https://github.com/Microsoft/TypeScript/issues/13042 is fixed 10export const USER_ROLE_LABELS: { [ id in UserRole ]: string } = {
11export const USER_ROLE_LABELS: { [ id: number ]: string } = {
12 [UserRole.USER]: 'User', 11 [UserRole.USER]: 'User',
13 [UserRole.MODERATOR]: 'Moderator', 12 [UserRole.MODERATOR]: 'Moderator',
14 [UserRole.ADMINISTRATOR]: 'Administrator' 13 [UserRole.ADMINISTRATOR]: 'Administrator'
15} 14}
16 15
17// TODO: use UserRole for key once https://github.com/Microsoft/TypeScript/issues/13042 is fixed 16const userRoleRights: { [ id in UserRole ]: UserRight[] } = {
18const userRoleRights: { [ id: number ]: UserRight[] } = {
19 [UserRole.ADMINISTRATOR]: [ 17 [UserRole.ADMINISTRATOR]: [
20 UserRight.ALL 18 UserRight.ALL
21 ], 19 ],