Add standalone manifest.json for each status page. Close #1668

This commit is contained in:
Louis Lam
2022-07-04 21:58:27 +08:00
parent 624678826d
commit 27dbc021b4
2 changed files with 43 additions and 0 deletions

View File

@@ -45,6 +45,8 @@ class StatusPage extends BeanModel {
$("link[rel=icon]")
.attr("href", statusPage.icon)
.removeAttr("type");
$("link[rel=apple-touch-icon]").remove();
}
const head = $("head");
@@ -61,6 +63,9 @@ class StatusPage extends BeanModel {
</script>
`);
// manifest.json
$("link[rel=manifest]").attr("href", `/api/status-page/${statusPage.slug}/manifest.json`);
return $.root().html();
}