zmiany ux i w panelu
This commit is contained in:
@ -119,6 +119,22 @@ function setupList(listId, username) {
|
||||
updateProgressBar();
|
||||
});
|
||||
|
||||
|
||||
socket.on('progress_updated', function(data) {
|
||||
const progressBar = document.getElementById('progress-bar');
|
||||
if (progressBar) {
|
||||
progressBar.style.width = data.percent + '%';
|
||||
progressBar.setAttribute('aria-valuenow', data.percent);
|
||||
progressBar.textContent = Math.round(data.percent) + '%';
|
||||
}
|
||||
|
||||
const progressTitle = document.getElementById('progress-title');
|
||||
if (progressTitle) {
|
||||
progressTitle.textContent = `📊 Postęp listy — ${data.purchased_count}/${data.total_count} kupionych (${Math.round(data.percent)}%)`;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
socket.on('note_updated', data => {
|
||||
const itemEl = document.getElementById(`item-${data.item_id}`);
|
||||
if (itemEl) {
|
||||
|
Reference in New Issue
Block a user