返回提交历史
Modified
src/routes/webui.ts
+1
-1
Modified
static/webui/script.js
+1
-1
XFEstudio/XFESpaceNinjaServer
chore: move translations under webui route (#4133)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4133 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
a5e8edaf
代码差异
2 个文件
+2
-2
@@ -77,7 +77,7 @@ webuiRouter.get("/webui/riven-tool/RivenParser.js", async (_req, res) => {
77
77
});
78
78
79
79
// Serve translations
80
webuiRouter.get("/translations/:file", async (req, res) => {
80
webuiRouter.get("/webui/translations/:file", async (req, res) => {
81
81
res.set("Content-Type", "text/javascript;charset=utf8");
82
82
res.send(await fs.readFile(path.join(baseDir, `static/webui/translations/${req.params.file}`)));
83
83
});
@@ -493,7 +493,7 @@ function setActiveLanguage(lang) {
493
493
494
494
script = document.createElement("script");
495
495
script.id = "translations";
496
script.src = "/translations/" + webui_lang + ".js";
496
script.src = "/webui/translations/" + webui_lang + ".js";
497
497
script.onload = function () {
498
498
updateLocElements();
499
499
updateTitle();