diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-28 11:15:38 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-29 09:32:12 +0200 |
commit | 72c33e716fecd1826dcf645957f8669821f91ff3 (patch) | |
tree | 31d270c2afc2f07303fa491189d6b6b1c0ea8bb1 /shared/models/server | |
parent | 8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d (diff) | |
download | PeerTube-72c33e716fecd1826dcf645957f8669821f91ff3.tar.gz PeerTube-72c33e716fecd1826dcf645957f8669821f91ff3.tar.zst PeerTube-72c33e716fecd1826dcf645957f8669821f91ff3.zip |
Support broadcast messages
Diffstat (limited to 'shared/models/server')
-rw-r--r-- | shared/models/server/broadcast-message-level.type.ts | 1 | ||||
-rw-r--r-- | shared/models/server/custom-config.model.ts | 8 | ||||
-rw-r--r-- | shared/models/server/index.ts | 1 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 10 |
4 files changed, 19 insertions, 1 deletions
diff --git a/shared/models/server/broadcast-message-level.type.ts b/shared/models/server/broadcast-message-level.type.ts new file mode 100644 index 000000000..bf43e18b5 --- /dev/null +++ b/shared/models/server/broadcast-message-level.type.ts | |||
@@ -0,0 +1 @@ | |||
export type BroadcastMessageLevel = 'info' | 'warning' | 'error' | |||
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index 07e17bda2..851bf1854 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { NSFWPolicyType } from '../videos/nsfw-policy.type' | 1 | import { NSFWPolicyType } from '../videos/nsfw-policy.type' |
2 | import { BroadcastMessageLevel } from './broadcast-message-level.type' | ||
2 | 3 | ||
3 | export interface CustomConfig { | 4 | export interface CustomConfig { |
4 | instance: { | 5 | instance: { |
@@ -131,4 +132,11 @@ export interface CustomConfig { | |||
131 | } | 132 | } |
132 | } | 133 | } |
133 | } | 134 | } |
135 | |||
136 | broadcastMessage: { | ||
137 | enabled: boolean | ||
138 | message: string | ||
139 | level: BroadcastMessageLevel | ||
140 | dismissable: boolean | ||
141 | } | ||
134 | } | 142 | } |
diff --git a/shared/models/server/index.ts b/shared/models/server/index.ts index b0afb2c66..2bb443d46 100644 --- a/shared/models/server/index.ts +++ b/shared/models/server/index.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | export * from './about.model' | 1 | export * from './about.model' |
2 | export * from './broadcast-message-level.type' | ||
2 | export * from './contact-form.model' | 3 | export * from './contact-form.model' |
3 | export * from './custom-config.model' | 4 | export * from './custom-config.model' |
4 | export * from './debug.model' | 5 | export * from './debug.model' |
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index a1f9b3b5d..9c903b7ee 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { NSFWPolicyType } from '../videos/nsfw-policy.type' | ||
2 | import { ClientScript } from '../plugins/plugin-package-json.model' | 1 | import { ClientScript } from '../plugins/plugin-package-json.model' |
2 | import { NSFWPolicyType } from '../videos/nsfw-policy.type' | ||
3 | import { BroadcastMessageLevel } from './broadcast-message-level.type' | ||
3 | 4 | ||
4 | export interface ServerConfigPlugin { | 5 | export interface ServerConfigPlugin { |
5 | name: string | 6 | name: string |
@@ -161,4 +162,11 @@ export interface ServerConfig { | |||
161 | } | 162 | } |
162 | } | 163 | } |
163 | } | 164 | } |
165 | |||
166 | broadcastMessage: { | ||
167 | enabled: boolean | ||
168 | message: string | ||
169 | level: BroadcastMessageLevel | ||
170 | dismissable: boolean | ||
171 | } | ||
164 | } | 172 | } |