aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/server/custom-config.model.ts3
-rw-r--r--shared/models/server/server-config.model.ts3
-rw-r--r--shared/models/users/user-update-me.model.ts4
-rw-r--r--shared/models/users/user.model.ts3
-rw-r--r--shared/models/videos/nsfw-policy.type.ts1
-rw-r--r--shared/models/videos/video.model.ts2
6 files changed, 13 insertions, 3 deletions
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts
index b4d24cfbe..30956bd47 100644
--- a/shared/models/server/custom-config.model.ts
+++ b/shared/models/server/custom-config.model.ts
@@ -1,3 +1,5 @@
1import { NSFWPolicyType } from '../videos/nsfw-policy.type'
2
1export interface CustomConfig { 3export interface CustomConfig {
2 instance: { 4 instance: {
3 name: string 5 name: string
@@ -5,6 +7,7 @@ export interface CustomConfig {
5 description: string 7 description: string
6 terms: string 8 terms: string
7 defaultClientRoute: string 9 defaultClientRoute: string
10 defaultNSFWPolicy: NSFWPolicyType
8 customizations: { 11 customizations: {
9 javascript?: string 12 javascript?: string
10 css?: string 13 css?: string
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts
index 611d0efe5..d1f956163 100644
--- a/shared/models/server/server-config.model.ts
+++ b/shared/models/server/server-config.model.ts
@@ -1,3 +1,5 @@
1import { NSFWPolicyType } from '../videos/nsfw-policy.type'
2
1export interface ServerConfig { 3export interface ServerConfig {
2 serverVersion: string 4 serverVersion: string
3 5
@@ -5,6 +7,7 @@ export interface ServerConfig {
5 name: string 7 name: string
6 shortDescription: string 8 shortDescription: string
7 defaultClientRoute: string 9 defaultClientRoute: string
10 defaultNSFWPolicy: NSFWPolicyType
8 customizations: { 11 customizations: {
9 javascript: string 12 javascript: string
10 css: string 13 css: string
diff --git a/shared/models/users/user-update-me.model.ts b/shared/models/users/user-update-me.model.ts
index b84233329..0a73879ed 100644
--- a/shared/models/users/user-update-me.model.ts
+++ b/shared/models/users/user-update-me.model.ts
@@ -1,6 +1,8 @@
1import { NSFWPolicyType } from '../videos/nsfw-policy.type'
2
1export interface UserUpdateMe { 3export interface UserUpdateMe {
2 description?: string 4 description?: string
3 displayNSFW?: boolean 5 nsfwPolicy?: NSFWPolicyType
4 autoPlayVideo?: boolean 6 autoPlayVideo?: boolean
5 email?: string 7 email?: string
6 password?: string 8 password?: string
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index b5f459f31..188e29ede 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -1,12 +1,13 @@
1import { Account } from '../actors' 1import { Account } from '../actors'
2import { VideoChannel } from '../videos/video-channel.model' 2import { VideoChannel } from '../videos/video-channel.model'
3import { UserRole } from './user-role' 3import { UserRole } from './user-role'
4import { NSFWPolicyType } from '../videos/nsfw-policy.type'
4 5
5export interface User { 6export interface User {
6 id: number 7 id: number
7 username: string 8 username: string
8 email: string 9 email: string
9 displayNSFW: boolean 10 nsfwPolicy: NSFWPolicyType
10 autoPlayVideo: boolean 11 autoPlayVideo: boolean
11 role: UserRole 12 role: UserRole
12 videoQuota: number 13 videoQuota: number
diff --git a/shared/models/videos/nsfw-policy.type.ts b/shared/models/videos/nsfw-policy.type.ts
new file mode 100644
index 000000000..dc0032a14
--- /dev/null
+++ b/shared/models/videos/nsfw-policy.type.ts
@@ -0,0 +1 @@
export type NSFWPolicyType = 'do_not_list' | 'blur' | 'display'
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 1b5f1a09c..70132c050 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -26,6 +26,7 @@ export interface Video {
26 category: VideoConstant<number> 26 category: VideoConstant<number>
27 licence: VideoConstant<number> 27 licence: VideoConstant<number>
28 language: VideoConstant<number> 28 language: VideoConstant<number>
29 privacy: VideoConstant<VideoPrivacy>
29 description: string 30 description: string
30 duration: number 31 duration: number
31 isLocal: boolean 32 isLocal: boolean
@@ -48,7 +49,6 @@ export interface Video {
48} 49}
49 50
50export interface VideoDetails extends Video { 51export interface VideoDetails extends Video {
51 privacy: VideoConstant<VideoPrivacy>
52 descriptionPath: string 52 descriptionPath: string
53 support: string 53 support: string
54 channel: VideoChannel 54 channel: VideoChannel