mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 17:14:17 +08:00
[Status Page] wip, upload logo and status page listing
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user