Update Site source
This commit is contained in:
1 parent
bcd4667205
commit
ff08916cf0
6 files changed
+124
-63
No files matched your search
+3
-1
@@ -1,4 +1,4 @@
|
||||
import { addonsJs, indexHtml } from "./assets.js";
|
||||
import { addonsJs, i18nJs, i18nRenderersJs, indexHtml } from "./assets.js";
|
||||
|
||||
const BING_ARCHIVE = "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US";
|
||||
const STATE_FIELDS = ["profile", "memories", "museum", "settings", "system"];
|
||||
@@ -62,6 +62,8 @@ export default {
|
||||
return Response.json({ error: "Bing wallpaper is temporarily unavailable", detail: String(error) }, { status: 502 });
|
||||
}
|
||||
if (url.pathname === "/addons.js") return new Response(addonsJs, { headers: headers("application/javascript; charset=utf-8", "no-cache") });
|
||||
if (url.pathname === "/i18n.js") return new Response(i18nJs, { headers: headers("application/javascript; charset=utf-8", "no-cache") });
|
||||
if (url.pathname === "/i18n-renderers.js") return new Response(i18nRenderersJs, { headers: headers("application/javascript; charset=utf-8", "no-cache") });
|
||||
if (url.pathname === "/" || url.pathname === "/index.html") {
|
||||
if (!id) return new Response(loginPage(), { headers: headers("text/html; charset=utf-8", "no-cache") });
|
||||
return new Response(indexHtml, { headers: headers("text/html; charset=utf-8", "no-cache") });
|
||||
|
||||
Reference in new issue
Block a user