[Status Page] wip, upload logo and status page listing

This commit is contained in:
Louis Lam
2022-03-17 16:42:26 +08:00
parent bb1c951a96
commit e87cdf4d09
5 changed files with 82 additions and 60 deletions

View File

@@ -22,7 +22,7 @@ class StatusPage extends BeanModel {
slug: this.slug,
title: this.title,
description: this.description,
icon: this.icon,
icon: this.getIcon(),
theme: this.theme,
published: !!this.published,
showTags: !!this.show_tags,
@@ -34,7 +34,7 @@ class StatusPage extends BeanModel {
slug: this.slug,
title: this.title,
description: this.description,
icon: this.icon,
icon: this.getIcon(),
theme: this.theme,
published: !!this.published,
showTags: !!this.show_tags,
@@ -47,6 +47,14 @@ class StatusPage extends BeanModel {
]);
}
getIcon() {
if (!this.icon) {
return "/icon.svg";
} else {
return this.icon;
}
}
}
module.exports = StatusPage;