feat(boards): Inline-Modals (Add-Board/Add-Bookmark/Rename) mit View-Transition-Fade
This commit is contained in:
+16
-2
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user