diff --git a/locales/index.d.ts b/locales/index.d.ts index 96bc9099dd..32921ca17b 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1195,6 +1195,8 @@ export interface Locale { "bubbleGame": string; "sfx": string; "soundWillBePlayed": string; + "replay": string; + "replaying": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c28fde56cb..463b229d61 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1192,6 +1192,8 @@ enableQuickAddMfmFunction: "高度なMFMのピッカーを表示する" bubbleGame: "バブルゲーム" sfx: "効果音" soundWillBePlayed: "サウンドが再生されます" +replay: "リプレイ" +replaying: "リプレイ中" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/pages/drop-and-fusion.vue b/packages/frontend/src/pages/drop-and-fusion.vue index d790d0f0e7..622214a2dc 100644 --- a/packages/frontend/src/pages/drop-and-fusion.vue +++ b/packages/frontend/src/pages/drop-and-fusion.vue @@ -97,13 +97,13 @@ SPDX-License-Identifier: AGPL-3.0-only
SCORE:
MAX CHAIN:
- Restart - Replay - Share + {{ i18n.ts.ok }} + {{ i18n.ts.replay }} + {{ i18n.ts.share }}
-
REPLAYING
+
{{ i18n.ts.replaying }}
@@ -573,7 +573,10 @@ function attachGameEvents() { }); game.addListener('gameOver', () => { - if (replaying.value) return; + if (replaying.value) { + endReplay(); + return; + } logs = game.getLogs(); currentPick.value = null; diff --git a/packages/frontend/src/scripts/drop-and-fusion-engine.ts b/packages/frontend/src/scripts/drop-and-fusion-engine.ts index 67ce270f6f..741668a457 100644 --- a/packages/frontend/src/scripts/drop-and-fusion-engine.ts +++ b/packages/frontend/src/scripts/drop-and-fusion-engine.ts @@ -408,7 +408,7 @@ export class DropAndFusionGame extends EventEmitter<{ Matter.Engine.update(this.engine, this.TICK_DELTA); - window.requestAnimationFrame(playTick); + this.tickRaf = window.requestAnimationFrame(playTick); }; playTick();