feat: centralize all screen related callbacks in useScreen

This commit is contained in:
2025-12-29 21:01:19 +01:00
parent 4960bef2fc
commit d77d595370
42 changed files with 184 additions and 128 deletions

View File

@@ -1,6 +1,8 @@
<script setup lang="ts">
import Buttons from "./Buttons.vue";
const { onRender } = useScreen();
const { assets } = useAssets();
const { close, state } = useConfirmationModal();
@@ -23,7 +25,7 @@ const handleActivateB = () => {
close();
};
useRender((ctx) => {
onRender((ctx) => {
if (!state.value.isVisible) return;
ctx.beginPath();
@@ -39,7 +41,7 @@ useRender((ctx) => {
ctx.fillStyle = "#ffffff";
fillTextCentered(ctx, state.value.text, BG_X, TEXT_Y, BG_WIDTH);
});
}, 100);
onUnmounted(() => {
close();