From 2030caa0c85102b1cf6131dd9eefef4a347cda42 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 2 Sep 2023 14:59:09 +0200 Subject: translations and story --- resources/js/ui.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'resources/js/ui.js') diff --git a/resources/js/ui.js b/resources/js/ui.js index 04186f5..ede8a1f 100644 --- a/resources/js/ui.js +++ b/resources/js/ui.js @@ -757,9 +757,10 @@ const UI = { } }))); - template.querySelectorAll('[data-interactable="true"]').forEach((node) => { + template.querySelectorAll('[data-interactable="true"]').forEach(async (node) => { if (node.dataset.story) { - if (node.dataset.storyOnce && Memory.state.storyProgress[node.dataset.story]) { + const story = await fetchStory(node.dataset.story); + if (!story.canTriggerMultipleTimes && Memory.state.storyProgress[node.dataset.story]) { node.dataset.interactable = false; return; } @@ -1932,7 +1933,7 @@ const UI = { * @returns {HTMLElement} */ createStoryPopup () { - const popup = UI.createPopup(); + const popup = UI.createPopup({ isClosable: false }); return popup; }, -- cgit v1.2.3