From 6004203339180a504771bbcdb5f4b93fd218e8e6 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Sat, 13 Jun 2026 20:32:23 +0200 Subject: [PATCH] feat(boards): Inline-Modals (Add-Board/Add-Bookmark/Rename) mit View-Transition-Fade --- src/js/boards.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/js/boards.js b/src/js/boards.js index 44aaa82..941e316 100644 --- a/src/js/boards.js +++ b/src/js/boards.js @@ -270,8 +270,22 @@ function bindBoardListEvents(list, board) { } // ---- MODALS ---- -function openModal(id) { document.getElementById(id).classList.add('active'); } -function closeModal(id) { document.getElementById(id).classList.remove('active'); } +// reduced-motion kappt das Fade ueber den ungeschichteten @media-Block. +// Feature-Detection-Fallback (Firefox < 144): instant. +function openModal(id) { + if (document.startViewTransition) { + document.startViewTransition(() => document.getElementById(id).classList.add('active')); + } else { + document.getElementById(id).classList.add('active'); + } +} +function closeModal(id) { + if (document.startViewTransition) { + document.startViewTransition(() => document.getElementById(id).classList.remove('active')); + } else { + document.getElementById(id).classList.remove('active'); + } +} function openAddBoardModal() { document.getElementById('newBoardName').value = '';