forked from OpenWF/SpaceNinjaServer
chore(webui): add loading string to translation system (#2440)
Closes #2439 Reviewed-on: OpenWF/SpaceNinjaServer#2440 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
98ed2b5ee4
commit
c46c43f143
@ -457,7 +457,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="detailedView-route" data-route="/webui/detailedView" data-title="Inventory | OpenWF WebUI">
|
||||
<h3 class="mb-0"></h3>
|
||||
<h3 id="detailedView-loading" class="mb-0" data-loc="general_loading"></h3>
|
||||
<h3 id="detailedView-title" class="mb-0"></h3>
|
||||
<p class="text-body-secondary"></p>
|
||||
<div id="archonShards-card" class="card mb-3 d-none">
|
||||
<h5 class="card-header" data-loc="detailedView_archonShardsLabel"></h5>
|
||||
|
@ -1166,14 +1166,15 @@ function updateInventory() {
|
||||
const item = data[category].find(x => x.ItemId.$oid == oid);
|
||||
|
||||
if (item) {
|
||||
document.getElementById("detailedView-loading").classList.add("d-none");
|
||||
|
||||
if (item.ItemName) {
|
||||
$("#detailedView-route h3").text(item.ItemName);
|
||||
$("#detailedView-title").text(item.ItemName);
|
||||
$("#detailedView-route .text-body-secondary").text(
|
||||
itemMap[item.ItemType]?.name ?? item.ItemType
|
||||
);
|
||||
} else {
|
||||
$("#detailedView-route h3").text(itemMap[item.ItemType]?.name ?? item.ItemType);
|
||||
$("#detailedView-route .text-body-secondary").text("");
|
||||
$("#detailedView-title").text(itemMap[item.ItemType]?.name ?? item.ItemType);
|
||||
}
|
||||
|
||||
if (category == "Suits") {
|
||||
@ -2184,7 +2185,9 @@ function doAddMissingMaxRankMods() {
|
||||
// DetailedView Route
|
||||
|
||||
single.getRoute("#detailedView-route").on("beforeload", function () {
|
||||
this.element.querySelector("h3").textContent = "Loading...";
|
||||
document.getElementById("detailedView-loading").classList.remove("d-none");
|
||||
document.getElementById("detailedView-title").textContent = "";
|
||||
document.querySelector("#detailedView-route .text-body-secondary").textContent = "";
|
||||
document.getElementById("archonShards-card").classList.add("d-none");
|
||||
document.getElementById("valenceBonus-card").classList.add("d-none");
|
||||
if (window.didInitialInventoryUpdate) {
|
||||
|
@ -4,6 +4,7 @@ dict = {
|
||||
general_addButton: `Hinzufügen`,
|
||||
general_setButton: `[UNTRANSLATED] Set`,
|
||||
general_bulkActions: `Massenaktionen`,
|
||||
general_loading: `[UNTRANSLATED] Loading...`,
|
||||
|
||||
code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`,
|
||||
code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`,
|
||||
|
@ -3,6 +3,7 @@ dict = {
|
||||
general_addButton: `Add`,
|
||||
general_setButton: `Set`,
|
||||
general_bulkActions: `Bulk Actions`,
|
||||
general_loading: `Loading...`,
|
||||
|
||||
code_loginFail: `Login failed. Double-check the email and password.`,
|
||||
code_regFail: `Registration failed. Account already exists?`,
|
||||
|
@ -4,6 +4,7 @@ dict = {
|
||||
general_addButton: `Agregar`,
|
||||
general_setButton: `Establecer`,
|
||||
general_bulkActions: `Acciones masivas`,
|
||||
general_loading: `[UNTRANSLATED] Loading...`,
|
||||
|
||||
code_loginFail: `Error al iniciar sesión. Verifica el correo electrónico y la contraseña.`,
|
||||
code_regFail: `Error al registrar la cuenta. ¿Ya existe una cuenta con este correo?`,
|
||||
|
@ -4,6 +4,7 @@ dict = {
|
||||
general_addButton: `Ajouter`,
|
||||
general_setButton: `[UNTRANSLATED] Set`,
|
||||
general_bulkActions: `Action groupée`,
|
||||
general_loading: `[UNTRANSLATED] Loading...`,
|
||||
|
||||
code_loginFail: `Connexion échouée. Vérifiez le mot de passe.`,
|
||||
code_regFail: `Enregistrement impossible. Compte existant?`,
|
||||
|
@ -4,6 +4,7 @@ dict = {
|
||||
general_addButton: `Добавить`,
|
||||
general_setButton: `Установить`,
|
||||
general_bulkActions: `Массовые действия`,
|
||||
general_loading: `[UNTRANSLATED] Loading...`,
|
||||
|
||||
code_loginFail: `[UNTRANSLATED] Login failed. Double-check the email and password.`,
|
||||
code_regFail: `[UNTRANSLATED] Registration failed. Account already exists?`,
|
||||
|
@ -4,6 +4,7 @@ dict = {
|
||||
general_addButton: `添加`,
|
||||
general_setButton: `设置`,
|
||||
general_bulkActions: `批量操作`,
|
||||
general_loading: `[UNTRANSLATED] Loading...`,
|
||||
|
||||
code_loginFail: `登录失败.请检查邮箱和密码.`,
|
||||
code_regFail: `注册失败.账号已存在.`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user