aboutsummaryrefslogtreecommitdiffstats
path: root/src/models
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-14 18:20:26 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-14 18:20:26 +0200
commitc27972c12b2d0dba2aee9e3dcffadcf7806a9afd (patch)
tree46fcfe261ae55e6faab604e9c75f94f6ffe326ee /src/models
parentchore: upgrade 'electron-builder' to '22.14.5' to fix upstream issues. (#2068) (diff)
downloadferdium-app-c27972c12b2d0dba2aee9e3dcffadcf7806a9afd.tar.gz
ferdium-app-c27972c12b2d0dba2aee9e3dcffadcf7806a9afd.tar.zst
ferdium-app-c27972c12b2d0dba2aee9e3dcffadcf7806a9afd.zip
chore: remove all code related to news (#2069)
Diffstat (limited to 'src/models')
-rw-r--r--src/models/News.ts33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/models/News.ts b/src/models/News.ts
deleted file mode 100644
index 4fc21f590..000000000
--- a/src/models/News.ts
+++ /dev/null
@@ -1,33 +0,0 @@
1import { ifUndefinedString, ifUndefinedBoolean } from '../jsUtils';
2
3interface INews {
4 id: string;
5 message: string;
6 type: string;
7 sticky: boolean | undefined;
8}
9
10export default class News {
11 id: string = '';
12
13 message: string = '';
14
15 type: string = 'primary';
16
17 sticky: boolean = false;
18
19 constructor(data: INews) {
20 if (!data) {
21 throw new Error('News config not valid');
22 }
23
24 if (!data.id) {
25 throw new Error('News requires Id');
26 }
27
28 this.id = data.id;
29 this.message = ifUndefinedString(data.message, this.message);
30 this.type = ifUndefinedString(data.type, this.type);
31 this.sticky = ifUndefinedBoolean(data.sticky, this.sticky);
32 }
33}