diff --git a/static/webui/index.html b/static/webui/index.html index 586f255d..55676cd8 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -831,6 +831,7 @@
+ diff --git a/static/webui/script.js b/static/webui/script.js index fc625ca8..e15d2bb8 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -2780,3 +2780,16 @@ document.querySelectorAll("#sidebar .nav-link").forEach(function (elm) { window.scrollTo(0, 0); }); }); + +async function markAllAsRead() { + await revalidateAuthz(); + const { Inbox } = await fetch("/api/inbox.php?" + window.authz).then(x => x.json()); + let any = false; + for (const msg of Inbox) { + if (!msg.r) { + await fetch("/api/inbox.php?" + window.authz + "&messageId=" + msg.messageId.$oid); + any = true; + } + } + toast(loc(any ? "code_succRelog" : "code_nothingToDo")); +} diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 43c03ae2..97fd3511 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -45,6 +45,8 @@ dict = { code_focusUnlocked: `|COUNT| neue Fokus-Schulen freigeschaltet! Ein Inventar-Update wird benötigt, damit die Änderungen im Spiel sichtbar werden. Die Sternenkarte zu besuchen, sollte der einfachste Weg sein, dies auszulösen.`, code_addModsConfirm: `Bist du sicher, dass du |COUNT| Mods zu deinem Account hinzufügen möchtest?`, code_succImport: `Erfolgreich importiert.`, + code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`, + code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`, code_gild: `Veredeln`, code_moa: `Moa`, code_zanuka: `Jagdhund`, @@ -200,6 +202,7 @@ dict = { cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`, cheats_changeButton: `Ändern`, cheats_none: `Keines`, + cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`, worldState: `[UNTRANSLATED] World State`, worldState_creditBoost: `[UNTRANSLATED] Credit Boost`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 84f7b0d1..02b316f2 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -44,6 +44,8 @@ dict = { code_focusUnlocked: `Unlocked |COUNT| new focus schools! An inventory update will be needed for the changes to be reflected in-game. Visiting the navigation should be the easiest way to trigger that.`, code_addModsConfirm: `Are you sure you want to add |COUNT| mods to your account?`, code_succImport: `Successfully imported.`, + code_succRelog: `Done. Please note that you'll need to relog to see a difference in-game.`, + code_nothingToDo: `Done. There was nothing to do.`, code_gild: `Gild`, code_moa: `Moa`, code_zanuka: `Hound`, @@ -199,6 +201,7 @@ dict = { cheats_changeSupportedSyndicate: `Supported syndicate`, cheats_changeButton: `Change`, cheats_none: `None`, + cheats_markAllAsRead: `Mark Inbox As Read`, worldState: `World State`, worldState_creditBoost: `Credit Boost`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index b4cd7c27..8e1fca1c 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -45,6 +45,8 @@ dict = { code_focusUnlocked: `¡Desbloqueadas |COUNT| nuevas escuelas de enfoque! Se necesita una actualización del inventario para reflejar los cambios en el juego. Visitar la navegación debería ser la forma más sencilla de activarlo.`, code_addModsConfirm: `¿Estás seguro de que deseas agregar |COUNT| modificadores a tu cuenta?`, code_succImport: `Importación exitosa.`, + code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`, + code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`, code_gild: `Refinar`, code_moa: `Moa`, code_zanuka: `Sabueso`, @@ -200,6 +202,7 @@ dict = { cheats_changeSupportedSyndicate: `Sindicatos disponibles`, cheats_changeButton: `Cambiar`, cheats_none: `Ninguno`, + cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`, worldState: `Estado del mundo`, worldState_creditBoost: `Potenciador de Créditos`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index a3445922..638f733f 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -45,6 +45,8 @@ dict = { code_focusUnlocked: `|COUNT| écoles de Focus déverrouillées ! Synchronisation de l'inventaire nécessaire.`, code_addModsConfirm: `Ajouter |COUNT| mods à l'inventaire ?`, code_succImport: `Importé.`, + code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`, + code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`, code_gild: `Polir`, code_moa: `Moa`, code_zanuka: `Molosse`, @@ -200,6 +202,7 @@ dict = { cheats_changeSupportedSyndicate: `Allégeance`, cheats_changeButton: `Changer`, cheats_none: `Aucun`, + cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`, worldState: `[UNTRANSLATED] World State`, worldState_creditBoost: `[UNTRANSLATED] Credit Boost`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 9985bac7..cb7dc75f 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -45,6 +45,8 @@ dict = { code_focusUnlocked: `Разблокировано |COUNT| новых школ фокуса! Для отображения изменений в игре потребуется обновление инвентаря. Посещение навигации — самый простой способ этого добиться.`, code_addModsConfirm: `Вы уверены, что хотите добавить |COUNT| модов на ваш аккаунт?`, code_succImport: `Успешно импортировано.`, + code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`, + code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`, code_gild: `Улучшить`, code_moa: `МОА`, code_zanuka: `Гончая`, @@ -200,6 +202,7 @@ dict = { cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`, cheats_changeButton: `Изменить`, cheats_none: `Отсутствует`, + cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`, worldState: `[UNTRANSLATED] World State`, worldState_creditBoost: `[UNTRANSLATED] Credit Boost`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index 6791960c..b7efc8c5 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -45,6 +45,8 @@ dict = { code_focusUnlocked: `已解锁|COUNT|个新专精学派!需要游戏内仓库更新才能生效,您可以通过访问星图来触发仓库更新.`, code_addModsConfirm: `确定要向账户添加|COUNT|张MOD吗?`, code_succImport: `导入成功。`, + code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`, + code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`, code_gild: `镀金`, code_moa: `恐鸟`, code_zanuka: `猎犬`, @@ -200,6 +202,7 @@ dict = { cheats_changeSupportedSyndicate: `支持的集团`, cheats_changeButton: `更改`, cheats_none: `无`, + cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`, worldState: `世界状态配置`, worldState_creditBoost: `现金加成`,