Rebasing and conflict resolution

Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
This commit is contained in:
Matheus Alves 2025-07-22 22:47:11 +01:00
parent 428c175cb5
commit 8594614e64
3 changed files with 37 additions and 37 deletions

View File

@ -1000,7 +1000,14 @@ export class GameData {
const secretId = this.secretId;
const trainerId = this.trainerId;
if (!bypassLogin) {
if (bypassLogin) {
localStorage.setItem(
`sessionData${slotId ? slotId : ""}_${loggedInUser?.username}`,
encrypt(updatedDataStr, bypassLogin),
);
resolve(true);
return;
}
pokerogueApi.savedata.session
.update({ slot: slotId, trainerId, secretId, clientSessionId }, encrypted)
.then(error => {
@ -1017,13 +1024,6 @@ export class GameData {
resolve(true);
}
});
} else {
localStorage.setItem(
`sessionData${slotId ? slotId : ""}_${loggedInUser?.username}`,
encrypt(updatedDataStr, bypassLogin),
);
resolve(true);
}
});
}

View File

@ -1,7 +1,7 @@
import i18next from "i18next";
import type { InputFieldConfig } from "./form-modal-ui-handler";
import { FormModalUiHandler } from "./form-modal-ui-handler";
import type { ModalConfig } from "./modal-ui-handler";
import i18next from "i18next";
export default class RenameRunFormUiHandler extends FormModalUiHandler {
getModalTitle(_config?: ModalConfig): string {
@ -34,7 +34,9 @@ export default class RenameRunFormUiHandler extends FormModalUiHandler {
}
show(args: any[]): boolean {
if (super.show(args)) {
if (!super.show(args)) {
return false;
}
if (this.inputs?.length) {
this.inputs.forEach(input => {
input.text = "";
@ -49,6 +51,4 @@ export default class RenameRunFormUiHandler extends FormModalUiHandler {
};
return true;
}
return false;
}
}

View File

@ -1,12 +1,12 @@
import * as account from "#app/account";
import * as bypassLoginModule from "#app/global-vars/bypass-login";
import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
import type { SessionSaveData } from "#app/system/game-data";
import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import GameManager from "#test/testUtils/gameManager";
import { GameManager } from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import * as account from "#app/account";
import { AbilityId } from "#enums/ability-id";
describe("System - Rename Run", () => {
let phaserGame: Phaser.Game;