update webui messaging around syncing when game ws is available
Some checks failed
Build / build (pull_request) Failing after 58s
Some checks failed
Build / build (pull_request) Failing after 58s
This commit is contained in:
parent
a1362aaf9b
commit
3e51cf436f
@ -90,7 +90,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div data-route="/webui/inventory" data-title="Inventory | OpenWF WebUI">
|
<div data-route="/webui/inventory" data-title="Inventory | OpenWF WebUI">
|
||||||
<p class="mb-3" data-loc="general_inventoryUpdateNote"></p>
|
<p class="mb-3 inventory-update-note"></p>
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<ul class="nav nav-tabs card-header-tabs">
|
<ul class="nav nav-tabs card-header-tabs">
|
||||||
@ -579,7 +579,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-route="/webui/mods" data-title="Mods | OpenWF WebUI">
|
<div data-route="/webui/mods" data-title="Mods | OpenWF WebUI">
|
||||||
<p class="mb-3" data-loc="general_inventoryUpdateNote"></p>
|
<p class="mb-3 inventory-update-note"></p>
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-xxl-6">
|
<div class="col-xxl-6">
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
@ -635,7 +635,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-route="/webui/quests" data-title="Quests | OpenWF WebUI">
|
<div data-route="/webui/quests" data-title="Quests | OpenWF WebUI">
|
||||||
<p class="mb-3" data-loc="general_inventoryUpdateNote"></p>
|
<p class="mb-3 inventory-update-note"></p>
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@ -90,6 +90,12 @@ function openWebSocket() {
|
|||||||
if ("logged_out" in msg) {
|
if ("logged_out" in msg) {
|
||||||
logout();
|
logout();
|
||||||
}
|
}
|
||||||
|
if ("have_game_ws" in msg) {
|
||||||
|
window.have_game_ws = msg.have_game_ws;
|
||||||
|
if (window.dict) {
|
||||||
|
$(".inventory-update-note").text(loc(msg.have_game_ws ? "general_inventoryUpdateNoteGameWs" : "general_inventoryUpdateNote"));
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
window.ws.onclose = function () {
|
window.ws.onclose = function () {
|
||||||
ws_is_open = false;
|
ws_is_open = false;
|
||||||
@ -223,6 +229,7 @@ function updateLocElements() {
|
|||||||
document.querySelectorAll("[data-loc-replace]").forEach(elm => {
|
document.querySelectorAll("[data-loc-replace]").forEach(elm => {
|
||||||
elm.innerHTML = elm.innerHTML.replace("|VAL|", elm.getAttribute("data-loc-replace"));
|
elm.innerHTML = elm.innerHTML.replace("|VAL|", elm.getAttribute("data-loc-replace"));
|
||||||
});
|
});
|
||||||
|
$(".inventory-update-note").text(loc(window.have_game_ws ? "general_inventoryUpdateNoteGameWs" : "general_inventoryUpdateNote"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setActiveLanguage(lang) {
|
function setActiveLanguage(lang) {
|
||||||
@ -2758,13 +2765,13 @@ async function doUnlockAllScans() {
|
|||||||
async function doUnlockAllShipFeatures() {
|
async function doUnlockAllShipFeatures() {
|
||||||
await revalidateAuthz();
|
await revalidateAuthz();
|
||||||
await fetch("/custom/unlockAllShipFeatures?" + window.authz);
|
await fetch("/custom/unlockAllShipFeatures?" + window.authz);
|
||||||
toast(loc("cheats_unlockSuccInventory"));
|
toast(loc(window.have_game_ws ? "code_succAdded" : "cheats_unlockSuccInventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function doUnlockAllCapturaScenes() {
|
async function doUnlockAllCapturaScenes() {
|
||||||
await revalidateAuthz();
|
await revalidateAuthz();
|
||||||
await fetch("/custom/unlockAllCapturaScenes?" + window.authz);
|
await fetch("/custom/unlockAllCapturaScenes?" + window.authz);
|
||||||
toast(loc("cheats_unlockSuccInventory"));
|
toast(loc(window.have_game_ws ? "code_succAdded" : "cheats_unlockSuccInventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unlockAllMissions() {
|
async function unlockAllMissions() {
|
||||||
@ -2776,13 +2783,13 @@ async function unlockAllMissions() {
|
|||||||
async function unlockAllProfitTakerStages() {
|
async function unlockAllProfitTakerStages() {
|
||||||
await revalidateAuthz();
|
await revalidateAuthz();
|
||||||
await fetch("/custom/unlockAllProfitTakerStages?" + window.authz);
|
await fetch("/custom/unlockAllProfitTakerStages?" + window.authz);
|
||||||
toast(loc("cheats_unlockSuccInventory"));
|
toast(loc(window.have_game_ws ? "code_succAdded" : "cheats_unlockSuccInventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unlockAllSimarisResearchEntries() {
|
async function unlockAllSimarisResearchEntries() {
|
||||||
await revalidateAuthz();
|
await revalidateAuthz();
|
||||||
await fetch("/custom/unlockAllSimarisResearchEntries?" + window.authz);
|
await fetch("/custom/unlockAllSimarisResearchEntries?" + window.authz);
|
||||||
toast(loc("cheats_unlockSuccInventory"));
|
toast(loc(window.have_game_ws ? "code_succAdded" : "cheats_unlockSuccInventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
const importSamples = {
|
const importSamples = {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// German translation by Animan8000
|
// German translation by Animan8000
|
||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `Hinweis: Um Änderungen im Spiel zu sehen, musst du dein Inventar neu synchronisieren, z. B. mit dem /sync Befehl des Bootstrappers, durch Besuch eines Dojo/Relais oder durch erneutes Einloggen.`,
|
general_inventoryUpdateNote: `Hinweis: Um Änderungen im Spiel zu sehen, musst du dein Inventar neu synchronisieren, z. B. mit dem /sync Befehl des Bootstrappers, durch Besuch eines Dojo/Relais oder durch erneutes Einloggen.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `[UNTRANSLATED] Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `Hinzufügen`,
|
general_addButton: `Hinzufügen`,
|
||||||
general_setButton: `Festlegen`,
|
general_setButton: `Festlegen`,
|
||||||
general_none: `Keines`,
|
general_none: `Keines`,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `Note: To see changes in-game, you need to resync your inventory, e.g. using the bootstrapper's /sync command, visiting a dojo/relay, or relogging.`,
|
general_inventoryUpdateNote: `Note: To see changes in-game, you need to resync your inventory, e.g. using the bootstrapper's /sync command, visiting a dojo/relay, or relogging.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `Add`,
|
general_addButton: `Add`,
|
||||||
general_setButton: `Set`,
|
general_setButton: `Set`,
|
||||||
general_none: `None`,
|
general_none: `None`,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// Spanish translation by hxedcl
|
// Spanish translation by hxedcl
|
||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `Para ver los cambios en el juego, necesitas volver a sincronizar tu inventario, por ejemplo, usando el comando /sync del bootstrapper, visitando un dojo o repetidor, o volviendo a iniciar sesión.`,
|
general_inventoryUpdateNote: `Para ver los cambios en el juego, necesitas volver a sincronizar tu inventario, por ejemplo, usando el comando /sync del bootstrapper, visitando un dojo o repetidor, o volviendo a iniciar sesión.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `[UNTRANSLATED] Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `Agregar`,
|
general_addButton: `Agregar`,
|
||||||
general_setButton: `Establecer`,
|
general_setButton: `Establecer`,
|
||||||
general_none: `Ninguno`,
|
general_none: `Ninguno`,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// French translation by Vitruvio
|
// French translation by Vitruvio
|
||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `Note : Pour voir les changements en jeu, l'inventaire doit être actualisé. Cela se fait en tapant /sync dans le tchat, en visitant un dojo/relais ou en se reconnectant.`,
|
general_inventoryUpdateNote: `Note : Pour voir les changements en jeu, l'inventaire doit être actualisé. Cela se fait en tapant /sync dans le tchat, en visitant un dojo/relais ou en se reconnectant.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `[UNTRANSLATED] Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `Ajouter`,
|
general_addButton: `Ajouter`,
|
||||||
general_setButton: `Définir`,
|
general_setButton: `Définir`,
|
||||||
general_none: `Aucun`,
|
general_none: `Aucun`,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// Russian translation by AMelonInsideLemon, LoseFace
|
// Russian translation by AMelonInsideLemon, LoseFace
|
||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `Примечание: Чтобы увидеть изменения в игре, вам нужно повторно синхронизировать свой инвентарь, например, используя команду /sync загрузчика, посетив Додзё/Реле или перезагрузив игру.`,
|
general_inventoryUpdateNote: `Примечание: Чтобы увидеть изменения в игре, вам нужно повторно синхронизировать свой инвентарь, например, используя команду /sync загрузчика, посетив Додзё/Реле или перезагрузив игру.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `[UNTRANSLATED] Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `Добавить`,
|
general_addButton: `Добавить`,
|
||||||
general_setButton: `Установить`,
|
general_setButton: `Установить`,
|
||||||
general_none: `Отсутствует`,
|
general_none: `Отсутствует`,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// Ukrainian translation by LoseFace
|
// Ukrainian translation by LoseFace
|
||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `Пам'ятка: Щоб побачити зміни в грі, вам потрібно повторно синхронізувати своє спорядження, наприклад, використовуючи команду /sync завантажувача, відвідавши Доджьо/Реле або перезавантаживши гру.`,
|
general_inventoryUpdateNote: `Пам'ятка: Щоб побачити зміни в грі, вам потрібно повторно синхронізувати своє спорядження, наприклад, використовуючи команду /sync завантажувача, відвідавши Доджьо/Реле або перезавантаживши гру.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `[UNTRANSLATED] Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `Добавити`,
|
general_addButton: `Добавити`,
|
||||||
general_setButton: `Встановити`,
|
general_setButton: `Встановити`,
|
||||||
general_none: `Відсутній`,
|
general_none: `Відсутній`,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// Chinese translation by meb154, bishan178, nyaoouo, qianlishun, CrazyZhang, Corvus, & qingchun
|
// Chinese translation by meb154, bishan178, nyaoouo, qianlishun, CrazyZhang, Corvus, & qingchun
|
||||||
dict = {
|
dict = {
|
||||||
general_inventoryUpdateNote: `注意: 要在游戏中查看更改,您需要重新同步库存,例如使用客户端的 /sync 命令,访问道场/中继站或重新登录.`,
|
general_inventoryUpdateNote: `注意: 要在游戏中查看更改,您需要重新同步库存,例如使用客户端的 /sync 命令,访问道场/中继站或重新登录.`,
|
||||||
|
general_inventoryUpdateNoteGameWs: `[UNTRANSLATED] Note: You may need to reopen any menu you are on for changes to be reflected.`,
|
||||||
general_addButton: `添加`,
|
general_addButton: `添加`,
|
||||||
general_setButton: `设置`,
|
general_setButton: `设置`,
|
||||||
general_none: `无`,
|
general_none: `无`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user