XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

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
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +2 -2
Modified src/routes/webui.ts +1 -1
@@ -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 });
Modified static/webui/script.js +1 -1
@@ -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();