Compare commits

..

11 Commits

Author SHA1 Message Date
e458279492 static/webui/translations/zh.js aktualisiert
All checks were successful
Build / build (pull_request) Successful in 53s
2025-07-05 06:28:55 -07:00
fb47806537 static/webui/translations/zh.js aktualisiert
All checks were successful
Build / build (pull_request) Successful in 53s
2025-07-05 06:18:33 -07:00
5c939419e2 static/webui/translations/ru.js aktualisiert 2025-07-05 06:18:12 -07:00
915c87210a static/webui/translations/fr.js aktualisiert 2025-07-05 06:17:54 -07:00
13ea5a92d5 static/webui/translations/es.js aktualisiert 2025-07-05 06:17:31 -07:00
76c8973e35 static/webui/translations/de.js aktualisiert 2025-07-05 06:17:06 -07:00
f6152d9f47 static/webui/translations/en.js aktualisiert 2025-07-05 06:15:44 -07:00
3dc7f2b485 merge upstream 2025-07-05 06:08:28 -07:00
0ea67b7f57 merge upstream 2025-06-13 02:27:28 -07:00
253fe6f5ff merge upstream 2025-06-08 10:40:11 -07:00
a4f3b94e9b fix: provide response for FocusOperation.ActivateWay
All checks were successful
Build / build (pull_request) Successful in 48s
Build / build (push) Successful in 1m58s
2025-05-20 11:54:24 +02:00
4 changed files with 12 additions and 21 deletions

View File

@ -1,7 +1,7 @@
import { RequestHandler } from "express"; import { RequestHandler } from "express";
import { config } from "@/src/services/configService"; import { config } from "@/src/services/configService";
import { getAccountForRequest, isAdministrator } from "@/src/services/loginService"; import { getAccountForRequest, isAdministrator } from "@/src/services/loginService";
import { saveConfig } from "@/src/services/configWriterService"; import { saveConfig } from "@/src/services/configWatcherService";
import { sendWsBroadcastExcept } from "@/src/services/wsService"; import { sendWsBroadcastExcept } from "@/src/services/wsService";
export const getConfigController: RequestHandler = async (req, res) => { export const getConfigController: RequestHandler = async (req, res) => {

View File

@ -1,7 +1,7 @@
import { RequestHandler } from "express"; import { RequestHandler } from "express";
import { getAccountForRequest, isAdministrator, isNameTaken } from "@/src/services/loginService"; import { getAccountForRequest, isAdministrator, isNameTaken } from "@/src/services/loginService";
import { config } from "@/src/services/configService"; import { config } from "@/src/services/configService";
import { saveConfig } from "@/src/services/configWriterService"; import { saveConfig } from "@/src/services/configWatcherService";
export const renameAccountController: RequestHandler = async (req, res) => { export const renameAccountController: RequestHandler = async (req, res) => {
const account = await getAccountForRequest(req); const account = await getAccountForRequest(req);

View File

@ -1,14 +1,17 @@
import chokidar from "chokidar"; import chokidar from "chokidar";
import fsPromises from "fs/promises";
import { logger } from "@/src/utils/logger"; import { logger } from "@/src/utils/logger";
import { config, configPath, loadConfig } from "@/src/services/configService"; import { config, configPath, loadConfig } from "@/src/services/configService";
import { saveConfig, shouldReloadConfig } from "@/src/services/configWriterService";
import { getWebPorts, startWebServer, stopWebServer } from "@/src/services/webService"; import { getWebPorts, startWebServer, stopWebServer } from "@/src/services/webService";
import { sendWsBroadcast } from "@/src/services/wsService"; import { sendWsBroadcast } from "@/src/services/wsService";
import { Inbox } from "@/src/models/inboxModel"; import { Inbox } from "@/src/models/inboxModel";
import varzia from "@/static/fixed_responses/worldState/varzia.json"; import varzia from "@/static/fixed_responses/worldState/varzia.json";
let amnesia = false;
chokidar.watch(configPath).on("change", () => { chokidar.watch(configPath).on("change", () => {
if (shouldReloadConfig()) { if (amnesia) {
amnesia = false;
} else {
logger.info("Detected a change to config file, reloading its contents."); logger.info("Detected a change to config file, reloading its contents.");
try { try {
loadConfig(); loadConfig();
@ -69,6 +72,11 @@ export const validateConfig = (): void => {
} }
}; };
export const saveConfig = async (): Promise<void> => {
amnesia = true;
await fsPromises.writeFile(configPath, JSON.stringify(config, null, 2));
};
export const syncConfigWithDatabase = (): void => { export const syncConfigWithDatabase = (): void => {
// Event messages are deleted after endDate. Since we don't use beginDate/endDate and instead have config toggles, we need to delete the messages once those bools are false. // Event messages are deleted after endDate. Since we don't use beginDate/endDate and instead have config toggles, we need to delete the messages once those bools are false.
if (!config.worldState?.galleonOfGhouls) { if (!config.worldState?.galleonOfGhouls) {

View File

@ -1,17 +0,0 @@
import fsPromises from "fs/promises";
import { config, configPath } from "@/src/services/configService";
let amnesia = false;
export const saveConfig = async (): Promise<void> => {
amnesia = true;
await fsPromises.writeFile(configPath, JSON.stringify(config, null, 2));
};
export const shouldReloadConfig = (): boolean => {
if (amnesia) {
amnesia = false;
return false;
}
return true;
};