mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Fix: restore StreamsTable loading feedback
This commit is contained in:
parent
29395f0538
commit
3ddc6d196b
1 changed files with 13 additions and 2 deletions
|
|
@ -50,6 +50,7 @@ import {
|
|||
Modal,
|
||||
NumberInput,
|
||||
Radio,
|
||||
LoadingOverlay,
|
||||
} from '@mantine/core';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import useSettingsStore from '../../store/settings';
|
||||
|
|
@ -582,6 +583,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
|
||||
const executeDeleteStream = async (id) => {
|
||||
setDeleting(true);
|
||||
setIsLoading(true);
|
||||
try {
|
||||
await API.deleteStream(id);
|
||||
// Clear the selection for the deleted stream
|
||||
|
|
@ -589,6 +591,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
table.setSelectedTableIds([]);
|
||||
} finally {
|
||||
setDeleting(false);
|
||||
setIsLoading(false);
|
||||
setConfirmDeleteOpen(false);
|
||||
}
|
||||
};
|
||||
|
|
@ -607,20 +610,27 @@ const StreamsTable = ({ onReady }) => {
|
|||
|
||||
const executeDeleteStreams = async () => {
|
||||
setDeleting(true);
|
||||
setIsLoading(true);
|
||||
try {
|
||||
await API.deleteStreams(selectedStreamIds);
|
||||
setSelectedStreamIds([]);
|
||||
table.setSelectedTableIds([]);
|
||||
} finally {
|
||||
setDeleting(false);
|
||||
setIsLoading(false);
|
||||
setConfirmDeleteOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
const closeStreamForm = () => {
|
||||
const closeStreamForm = async () => {
|
||||
setStream(null);
|
||||
setModalOpen(false);
|
||||
API.requeryStreams();
|
||||
setIsLoading(true);
|
||||
try {
|
||||
await API.requeryStreams();
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
// Single channel creation functions
|
||||
|
|
@ -1181,6 +1191,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
borderRadius: 'var(--mantine-radius-default)',
|
||||
}}
|
||||
>
|
||||
<LoadingOverlay visible={isLoading} />
|
||||
<CustomTable table={table} />
|
||||
</Box>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue