feat: staggered fade-in for list items across all modules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -202,6 +203,7 @@ function renderBody() {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
if (window.lucide) lucide.createIcons();
|
if (window.lucide) lucide.createIcons();
|
||||||
|
stagger(_container.querySelectorAll('.budget-entry'));
|
||||||
|
|
||||||
_container.querySelector('#budget-list')?.addEventListener('click', async (e) => {
|
_container.querySelector('#budget-list')?.addEventListener('click', async (e) => {
|
||||||
const delBtn = e.target.closest('[data-action="delete"]');
|
const delBtn = e.target.closest('[data-action="delete"]');
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
import { renderRRuleFields, bindRRuleEvents, getRRuleValues } from '/rrule-ui.js';
|
import { renderRRuleFields, bindRRuleEvents, getRRuleValues } from '/rrule-ui.js';
|
||||||
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -597,6 +598,8 @@ function renderAgendaView(container) {
|
|||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
stagger(container.querySelectorAll('.agenda-event'));
|
||||||
|
|
||||||
container.querySelector('#agenda-view').addEventListener('click', (e) => {
|
container.querySelector('#agenda-view').addEventListener('click', (e) => {
|
||||||
const evEl = e.target.closest('.agenda-event');
|
const evEl = e.target.closest('.agenda-event');
|
||||||
if (evEl) {
|
if (evEl) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -159,6 +160,7 @@ function renderList() {
|
|||||||
`).join('');
|
`).join('');
|
||||||
|
|
||||||
if (window.lucide) lucide.createIcons();
|
if (window.lucide) lucide.createIcons();
|
||||||
|
stagger(container.querySelectorAll('.contact-item'));
|
||||||
|
|
||||||
// Event-Delegation
|
// Event-Delegation
|
||||||
container.addEventListener('click', async (e) => {
|
container.addEventListener('click', async (e) => {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
import { openModal as openSharedModal, closeModal as closeSharedModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal as closeSharedModal } from '/components/modal.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -162,6 +163,7 @@ function renderWeekGrid() {
|
|||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
if (window.lucide) lucide.createIcons();
|
if (window.lucide) lucide.createIcons();
|
||||||
|
stagger(grid.querySelectorAll('.meal-card'));
|
||||||
wireGrid(grid);
|
wireGrid(grid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -99,6 +100,7 @@ function renderGrid() {
|
|||||||
|
|
||||||
grid.innerHTML = state.notes.map((n) => renderNoteCard(n)).join('');
|
grid.innerHTML = state.notes.map((n) => renderNoteCard(n)).join('');
|
||||||
if (window.lucide) lucide.createIcons();
|
if (window.lucide) lucide.createIcons();
|
||||||
|
stagger(grid.querySelectorAll('.note-card'));
|
||||||
|
|
||||||
grid.addEventListener('click', async (e) => {
|
grid.addEventListener('click', async (e) => {
|
||||||
// Pin
|
// Pin
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -151,6 +152,7 @@ function renderListContent(container) {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
if (window.lucide) window.lucide.createIcons();
|
if (window.lucide) window.lucide.createIcons();
|
||||||
|
stagger(content.querySelectorAll('.shopping-item'));
|
||||||
wireAutocomplete(container);
|
wireAutocomplete(container);
|
||||||
wireQuickAdd(container);
|
wireQuickAdd(container);
|
||||||
}
|
}
|
||||||
@@ -311,6 +313,7 @@ function updateItemsList(container) {
|
|||||||
if (listEl) {
|
if (listEl) {
|
||||||
listEl.innerHTML = renderItems();
|
listEl.innerHTML = renderItems();
|
||||||
if (window.lucide) window.lucide.createIcons();
|
if (window.lucide) window.lucide.createIcons();
|
||||||
|
stagger(listEl.querySelectorAll('.shopping-item'));
|
||||||
}
|
}
|
||||||
// clear-checked Button aktualisieren
|
// clear-checked Button aktualisieren
|
||||||
const checkedCount = state.items.filter((i) => i.is_checked).length;
|
const checkedCount = state.items.filter((i) => i.is_checked).length;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
import { api } from '/api.js';
|
import { api } from '/api.js';
|
||||||
import { renderRRuleFields, bindRRuleEvents, getRRuleValues } from '/rrule-ui.js';
|
import { renderRRuleFields, bindRRuleEvents, getRRuleValues } from '/rrule-ui.js';
|
||||||
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
|
||||||
|
import { stagger } from '/utils/ux.js';
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
// Konstanten
|
// Konstanten
|
||||||
@@ -605,6 +606,7 @@ function renderTaskList(container) {
|
|||||||
if (!listEl) return;
|
if (!listEl) return;
|
||||||
listEl.innerHTML = renderTaskGroups(state.tasks, state.groupMode);
|
listEl.innerHTML = renderTaskGroups(state.tasks, state.groupMode);
|
||||||
if (window.lucide) window.lucide.createIcons();
|
if (window.lucide) window.lucide.createIcons();
|
||||||
|
stagger(listEl.querySelectorAll('.swipe-row, .kanban-card'));
|
||||||
updateOverdueBadge();
|
updateOverdueBadge();
|
||||||
wireSwipeGestures(container);
|
wireSwipeGestures(container);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user