返回提交历史
Modified
static/webui/index.html
+1
-0
Modified
static/webui/script.js
+13
-0
Modified
static/webui/translations/de.js
+3
-0
Modified
static/webui/translations/en.js
+3
-0
Modified
static/webui/translations/es.js
+3
-0
Modified
static/webui/translations/fr.js
+3
-0
Modified
static/webui/translations/ru.js
+3
-0
Modified
static/webui/translations/zh.js
+3
-0
XFEstudio/XFESpaceNinjaServer
feat(webui): mark inbox as read (#2449)
Closes #1117 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2449 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
65be1083
代码差异
8 个文件
+32
-0
@@ -831,6 +831,7 @@
831
831
<div class="card-body">
832
832
<div class="mb-2 d-flex flex-wrap gap-2">
833
833
<button class="btn btn-primary" onclick="debounce(doUnlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
834
<button class="btn btn-primary" onclick="debounce(markAllAsRead);" data-loc="cheats_markAllAsRead"></button>
834
835
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
835
836
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
836
837
<button class="btn btn-primary" onclick="debounce(addMissingHelminthRecipes);" data-loc="cheats_addMissingSubsumedAbilities"></button>
@@ -2780,3 +2780,16 @@ document.querySelectorAll("#sidebar .nav-link").forEach(function (elm) {
2780
2780
window.scrollTo(0, 0);
2781
2781
});
2782
2782
});
2783
2784
async function markAllAsRead() {
2785
await revalidateAuthz();
2786
const { Inbox } = await fetch("/api/inbox.php?" + window.authz).then(x => x.json());
2787
let any = false;
2788
for (const msg of Inbox) {
2789
if (!msg.r) {
2790
await fetch("/api/inbox.php?" + window.authz + "&messageId=" + msg.messageId.$oid);
2791
any = true;
2792
}
2793
}
2794
toast(loc(any ? "code_succRelog" : "code_nothingToDo"));
2795
}
@@ -45,6 +45,8 @@ dict = {
45
45
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.`,
46
46
code_addModsConfirm: `Bist du sicher, dass du |COUNT| Mods zu deinem Account hinzufügen möchtest?`,
47
47
code_succImport: `Erfolgreich importiert.`,
48
code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`,
49
code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`,
48
50
code_gild: `Veredeln`,
49
51
code_moa: `Moa`,
50
52
code_zanuka: `Jagdhund`,
@@ -200,6 +202,7 @@ dict = {
200
202
cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`,
201
203
cheats_changeButton: `Ändern`,
202
204
cheats_none: `Keines`,
205
cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`,
203
206
204
207
worldState: `[UNTRANSLATED] World State`,
205
208
worldState_creditBoost: `[UNTRANSLATED] Credit Boost`,
@@ -44,6 +44,8 @@ dict = {
44
44
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.`,
45
45
code_addModsConfirm: `Are you sure you want to add |COUNT| mods to your account?`,
46
46
code_succImport: `Successfully imported.`,
47
code_succRelog: `Done. Please note that you'll need to relog to see a difference in-game.`,
48
code_nothingToDo: `Done. There was nothing to do.`,
47
49
code_gild: `Gild`,
48
50
code_moa: `Moa`,
49
51
code_zanuka: `Hound`,
@@ -199,6 +201,7 @@ dict = {
199
201
cheats_changeSupportedSyndicate: `Supported syndicate`,
200
202
cheats_changeButton: `Change`,
201
203
cheats_none: `None`,
204
cheats_markAllAsRead: `Mark Inbox As Read`,
202
205
203
206
worldState: `World State`,
204
207
worldState_creditBoost: `Credit Boost`,
@@ -45,6 +45,8 @@ dict = {
45
45
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.`,
46
46
code_addModsConfirm: `¿Estás seguro de que deseas agregar |COUNT| modificadores a tu cuenta?`,
47
47
code_succImport: `Importación exitosa.`,
48
code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`,
49
code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`,
48
50
code_gild: `Refinar`,
49
51
code_moa: `Moa`,
50
52
code_zanuka: `Sabueso`,
@@ -200,6 +202,7 @@ dict = {
200
202
cheats_changeSupportedSyndicate: `Sindicatos disponibles`,
201
203
cheats_changeButton: `Cambiar`,
202
204
cheats_none: `Ninguno`,
205
cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`,
203
206
204
207
worldState: `Estado del mundo`,
205
208
worldState_creditBoost: `Potenciador de Créditos`,
@@ -45,6 +45,8 @@ dict = {
45
45
code_focusUnlocked: `|COUNT| écoles de Focus déverrouillées ! Synchronisation de l'inventaire nécessaire.`,
46
46
code_addModsConfirm: `Ajouter |COUNT| mods à l'inventaire ?`,
47
47
code_succImport: `Importé.`,
48
code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`,
49
code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`,
48
50
code_gild: `Polir`,
49
51
code_moa: `Moa`,
50
52
code_zanuka: `Molosse`,
@@ -200,6 +202,7 @@ dict = {
200
202
cheats_changeSupportedSyndicate: `Allégeance`,
201
203
cheats_changeButton: `Changer`,
202
204
cheats_none: `Aucun`,
205
cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`,
203
206
204
207
worldState: `[UNTRANSLATED] World State`,
205
208
worldState_creditBoost: `[UNTRANSLATED] Credit Boost`,
@@ -45,6 +45,8 @@ dict = {
45
45
code_focusUnlocked: `Разблокировано |COUNT| новых школ фокуса! Для отображения изменений в игре потребуется обновление инвентаря. Посещение навигации — самый простой способ этого добиться.`,
46
46
code_addModsConfirm: `Вы уверены, что хотите добавить |COUNT| модов на ваш аккаунт?`,
47
47
code_succImport: `Успешно импортировано.`,
48
code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`,
49
code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`,
48
50
code_gild: `Улучшить`,
49
51
code_moa: `МОА`,
50
52
code_zanuka: `Гончая`,
@@ -200,6 +202,7 @@ dict = {
200
202
cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`,
201
203
cheats_changeButton: `Изменить`,
202
204
cheats_none: `Отсутствует`,
205
cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`,
203
206
204
207
worldState: `[UNTRANSLATED] World State`,
205
208
worldState_creditBoost: `[UNTRANSLATED] Credit Boost`,
@@ -45,6 +45,8 @@ dict = {
45
45
code_focusUnlocked: `已解锁|COUNT|个新专精学派!需要游戏内仓库更新才能生效,您可以通过访问星图来触发仓库更新.`,
46
46
code_addModsConfirm: `确定要向账户添加|COUNT|张MOD吗?`,
47
47
code_succImport: `导入成功。`,
48
code_succRelog: `[UNTRANSLATED] Done. Please note that you'll need to relog to see a difference in-game.`,
49
code_nothingToDo: `[UNTRANSLATED] Done. There was nothing to do.`,
48
50
code_gild: `镀金`,
49
51
code_moa: `恐鸟`,
50
52
code_zanuka: `猎犬`,
@@ -200,6 +202,7 @@ dict = {
200
202
cheats_changeSupportedSyndicate: `支持的集团`,
201
203
cheats_changeButton: `更改`,
202
204
cheats_none: `无`,
205
cheats_markAllAsRead: `[UNTRANSLATED] Mark Inbox As Read`,
203
206
204
207
worldState: `世界状态配置`,
205
208
worldState_creditBoost: `现金加成`,