refactor(view-transitions): zentralen withViewTransition-Helper in state.js, Duplikate entfernt
This commit is contained in:
+2
-10
@@ -273,18 +273,10 @@ function bindBoardListEvents(list, board) {
|
||||
// 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');
|
||||
}
|
||||
withViewTransition(() => 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');
|
||||
}
|
||||
withViewTransition(() => document.getElementById(id).classList.remove('active'));
|
||||
}
|
||||
|
||||
function openAddBoardModal() {
|
||||
|
||||
Reference in New Issue
Block a user