fix warnings and notifications
This commit is contained in:
parent
fc942db1a1
commit
14b4f766c0
32427
package-lock.json
generated
32427
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
25
public/manifest.json
Normal file
25
public/manifest.json
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"short_name": "signage",
|
||||||
|
"name": "signage",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#ffffff"
|
||||||
|
}
|
@ -16,7 +16,7 @@ const AppRouter = () => {
|
|||||||
<Route path="/playlists" element={<LoginRequired children={<Playlists />} />} />
|
<Route path="/playlists" element={<LoginRequired children={<Playlists />} />} />
|
||||||
<Route path="/files" element={<LoginRequired children={<Files />} />} />
|
<Route path="/files" element={<LoginRequired children={<Files />} />} />
|
||||||
<Route path="/playlist/:id" element={<LoginRequired children={<Playlist />} />} />
|
<Route path="/playlist/:id" element={<LoginRequired children={<Playlist />} />} />
|
||||||
<Route path="/auth" element={<Authentication />} />
|
<Route path="/login" element={<Authentication />} />
|
||||||
<Route path="*" element={<NotFound />} />
|
<Route path="*" element={<NotFound />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
);
|
);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Logo from '../assets/logo.png';
|
import Logo from '../assets/logo.png';
|
||||||
import { Avatar, createStyles, Header, Group, rem, UnstyledButton, Title, ActionIcon, Tooltip } from '@mantine/core';
|
import { Avatar, createStyles, Header, Group, rem, UnstyledButton, Title, ActionIcon, Tooltip } from '@mantine/core';
|
||||||
import SwitchToggle from './toggle-colorscheme';
|
import SwitchToggle from './toggle-colorscheme';
|
||||||
import { IconUserCheck, IconUserEdit, IconUserOff } from '@tabler/icons-react';
|
import { IconUserCheck, IconUserOff } from '@tabler/icons-react';
|
||||||
import { logout, useAuth } from '../tools/auth-provider';
|
import { logout, useAuth } from '../tools/auth-provider';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Title, Button, Group, Input, Paper } from '@mantine/core';
|
import { Title, Group, Input, Paper } from '@mantine/core';
|
||||||
import { IconSearch } from '@tabler/icons-react';
|
import { IconSearch } from '@tabler/icons-react';
|
||||||
|
|
||||||
const NavbarSignage = ({ data }) => {
|
const NavbarSignage = ({ data }) => {
|
||||||
@ -13,9 +13,7 @@ const NavbarSignage = ({ data }) => {
|
|||||||
onChange={(event) => data.handlerChange(event)}
|
onChange={(event) => data.handlerChange(event)}
|
||||||
icon={<IconSearch size="1rem" stroke={1.5} />}
|
icon={<IconSearch size="1rem" stroke={1.5} />}
|
||||||
/>
|
/>
|
||||||
{data?.buttonCreate && (
|
{data?.buttonCreate}
|
||||||
<Button onClick={data.buttonCreate.handler}>{data.buttonCreate.text}</Button>
|
|
||||||
)}
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
@ -14,6 +14,7 @@ const Authentication = ({ redirect }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (user) navigate('/');
|
if (user) navigate('/');
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
const form = useForm({
|
const form = useForm({
|
||||||
@ -36,19 +37,19 @@ const Authentication = ({ redirect }) => {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
setUser(res.data);
|
setUser(res.data);
|
||||||
localStorage.setItem('user', res.data);
|
localStorage.setItem('user', JSON.stringify(res.data));
|
||||||
if (redirect) {
|
if (redirect) {
|
||||||
setLoggedIn(true);
|
setLoggedIn(true);
|
||||||
} else {
|
} else {
|
||||||
navigate('/');
|
navigate('/');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setNotification(true, res.message);
|
setNotification(true, res);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,9 @@ import { notifications } from '@mantine/notifications';
|
|||||||
import { IconCheck, IconX } from '@tabler/icons-react';
|
import { IconCheck, IconX } from '@tabler/icons-react';
|
||||||
|
|
||||||
const setNotification = (fail, message) => {
|
const setNotification = (fail, message) => {
|
||||||
|
if (typeof message === 'object') {
|
||||||
|
message = message?.data?.message ?? message?.response?.data?.message ?? message.message ?? 'Error';
|
||||||
|
}
|
||||||
notifications.show({
|
notifications.show({
|
||||||
title: fail ? 'Error' : 'Success',
|
title: fail ? 'Error' : 'Success',
|
||||||
message: message ?? 'Something went wrong',
|
message: message ?? 'Something went wrong',
|
||||||
|
@ -33,7 +33,7 @@ const ModalAddFile = ({ opened, handler, addFiles }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -47,7 +47,7 @@ const ModalFileSelector = ({ opened, handleClose, handleSubmit, ...props }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {};
|
return () => {};
|
||||||
@ -63,7 +63,7 @@ const ModalFileSelector = ({ opened, handleClose, handleSubmit, ...props }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
} else if (search.length === 0) {
|
} else if (search.length === 0) {
|
||||||
API.getFiles()
|
API.getFiles()
|
||||||
@ -73,7 +73,7 @@ const ModalFileSelector = ({ opened, handleClose, handleSubmit, ...props }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [search]);
|
}, [search]);
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
import { Card, Divider, Text, Title, Image, Badge, Button, Group } from '@mantine/core';
|
import { Card, Text, Image, Button, Group } from '@mantine/core';
|
||||||
|
|
||||||
import API from '../../services/api';
|
|
||||||
|
|
||||||
const FileView = ({ file, onSelect, onDelete, ...props }) => {
|
const FileView = ({ file, onSelect, onDelete, ...props }) => {
|
||||||
const deleteHandler = async () => {
|
// const deleteHandler = async () => {
|
||||||
try {
|
// try {
|
||||||
await API.deleteFile(file.id);
|
// await API.deleteFile(file.id);
|
||||||
onDelete(file.id);
|
// onDelete(file.id);
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.log(error);
|
// console.log(error);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card shadow="sm" padding="md" withBorder>
|
<Card shadow="sm" padding="md" withBorder>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Button, Paper, Grid, Text, Title, Group, List, Image, ScrollArea, Center } from '@mantine/core';
|
import { Button, Paper, Grid, Title, Group, ScrollArea, Center } from '@mantine/core';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import API from '../../services/api';
|
import API from '../../services/api';
|
||||||
import setNotification from '../errors/error-notification';
|
import setNotification from '../errors/error-notification';
|
||||||
@ -22,7 +22,7 @@ const Files = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import Logo from '../../assets/logo.png';
|
|
||||||
import { Avatar, Center, Text } from '@mantine/core';
|
|
||||||
|
|
||||||
const Planning = () => (
|
const Planning = () => (
|
||||||
<>
|
<>
|
||||||
|
@ -2,9 +2,9 @@ import { Box, Image, Flex } from '@mantine/core';
|
|||||||
import { DragDropContext, Draggable } from 'react-beautiful-dnd';
|
import { DragDropContext, Draggable } from 'react-beautiful-dnd';
|
||||||
import { IconGripVertical } from '@tabler/icons-react';
|
import { IconGripVertical } from '@tabler/icons-react';
|
||||||
import { StrictModeDroppable } from './StrictModeDroppable';
|
import { StrictModeDroppable } from './StrictModeDroppable';
|
||||||
import { ActionIcon, Button, Center, Grid, Group, NumberInput, Paper, Text } from '@mantine/core';
|
import { ActionIcon, Button, Center, Group, NumberInput, Paper, Text } from '@mantine/core';
|
||||||
import { IconTrash } from '@tabler/icons-react';
|
import { IconTrash } from '@tabler/icons-react';
|
||||||
import { useEffect, useState } from 'react';
|
import { useState } from 'react';
|
||||||
import ModalFileSelector from '../files/file-selector';
|
import ModalFileSelector from '../files/file-selector';
|
||||||
import API from '../../services/api';
|
import API from '../../services/api';
|
||||||
import setNotification from '../errors/error-notification';
|
import setNotification from '../errors/error-notification';
|
||||||
@ -33,7 +33,7 @@ const Content = ({ form, playlistId }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -57,7 +57,7 @@ const Content = ({ form, playlistId }) => {
|
|||||||
// sending modification to server
|
// sending modification to server
|
||||||
API.playlistChangeOrder(playlistId, { file_id: formFiles[from].id, position: newPosition })
|
API.playlistChangeOrder(playlistId, { file_id: formFiles[from].id, position: newPosition })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status === 200) {
|
||||||
resolve(true);
|
resolve(true);
|
||||||
} else {
|
} else {
|
||||||
setNotification(true, `Error when changing order (${res.status})`);
|
setNotification(true, `Error when changing order (${res.status})`);
|
||||||
@ -65,7 +65,7 @@ const Content = ({ form, playlistId }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
resolve(false);
|
resolve(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -97,15 +97,15 @@ const Content = ({ form, playlistId }) => {
|
|||||||
const fileId = form.values.files[index].id;
|
const fileId = form.values.files[index].id;
|
||||||
API.playlistChangeSeconds(playlistId, { file_id: fileId, seconds: seconds })
|
API.playlistChangeSeconds(playlistId, { file_id: fileId, seconds: seconds })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status === 200) {
|
||||||
setOriginSecs()
|
setOriginSecs();
|
||||||
} else {
|
} else {
|
||||||
setNotification(true, `Error when changing seconds (${res.status})`);
|
setNotification(true, `Error when changing seconds (${res.status})`);
|
||||||
changeSecsForm(originSecs, index);
|
changeSecsForm(originSecs, index);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
changeSecsForm(originSecs, index);
|
changeSecsForm(originSecs, index);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -113,14 +113,14 @@ const Content = ({ form, playlistId }) => {
|
|||||||
const handleDelete = (index) => {
|
const handleDelete = (index) => {
|
||||||
API.playlistRemoveFile(playlistId, { file_id: form.values.files[index].id })
|
API.playlistRemoveFile(playlistId, { file_id: form.values.files[index].id })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status === 200) {
|
||||||
form.removeListItem('files', index);
|
form.removeListItem('files', index);
|
||||||
} else {
|
} else {
|
||||||
setNotification(true, `Error when changing order (${res.status})`);
|
setNotification(true, `Error when changing order (${res.status})`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@ import { useEffect, useState } from 'react';
|
|||||||
import API from '../../services/api';
|
import API from '../../services/api';
|
||||||
import { parseTime } from '../../tools/timeUtil';
|
import { parseTime } from '../../tools/timeUtil';
|
||||||
import setNotification from '../errors/error-notification';
|
import setNotification from '../errors/error-notification';
|
||||||
import GrantAccess from '../../tools/grant-access';
|
|
||||||
import ModalUpdate from '../playlists/update';
|
import ModalUpdate from '../playlists/update';
|
||||||
import { useForm } from '@mantine/form';
|
import { useForm } from '@mantine/form';
|
||||||
import Content from './content';
|
import Content from './content';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
const Playlist = (item) => {
|
const Playlist = (item) => {
|
||||||
const id = window.location.href.split('/').slice(-1)[0];
|
const id = window.location.href.split('/').slice(-1)[0];
|
||||||
@ -15,6 +15,7 @@ const Playlist = (item) => {
|
|||||||
const [duration, setDuration] = useState(0);
|
const [duration, setDuration] = useState(0);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [isActive, setIsActive] = useState(false);
|
const [isActive, setIsActive] = useState(false);
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const toggleUpdate = () => setShowUpdate(!showUpdate);
|
const toggleUpdate = () => setShowUpdate(!showUpdate);
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ const Playlist = (item) => {
|
|||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -64,7 +65,10 @@ const Playlist = (item) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
|
if (err.response.status === 404) {
|
||||||
|
navigate('/playlists');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
@ -4,11 +4,13 @@ import PlaylistTable from './playlist-table';
|
|||||||
import API from '../../services/api';
|
import API from '../../services/api';
|
||||||
import setNotification from '../errors/error-notification';
|
import setNotification from '../errors/error-notification';
|
||||||
import ModalCreatePlaylist from './create';
|
import ModalCreatePlaylist from './create';
|
||||||
|
import { Button } from '@mantine/core';
|
||||||
|
import GrantAccess, { Perm } from '../../tools/grant-access';
|
||||||
|
|
||||||
const Playlists = () => {
|
const Playlists = () => {
|
||||||
const [showCreate, setShowCreate] = useState(false);
|
const [showCreate, setShowCreate] = useState(false);
|
||||||
const [showUpdate, setShowUpdate] = useState(false);
|
const [showUpdate, setShowUpdate] = useState(false);
|
||||||
const [item, setItem] = useState({});
|
const [, setItem] = useState({});
|
||||||
const [page, setPage] = useState(0);
|
const [page, setPage] = useState(0);
|
||||||
const limit = 6;
|
const limit = 6;
|
||||||
|
|
||||||
@ -18,6 +20,10 @@ const Playlists = () => {
|
|||||||
const [playlists, setPlaylist] = useState([]);
|
const [playlists, setPlaylist] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log('profile');
|
||||||
|
API.profile()
|
||||||
|
.then((res) => console.log(res))
|
||||||
|
.catch((err) => console.log(err));
|
||||||
API.listPlaylists(limit, page)
|
API.listPlaylists(limit, page)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@ -26,7 +32,7 @@ const Playlists = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setNotification(true, err.message);
|
setNotification(true, err);
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {};
|
return () => {};
|
||||||
@ -47,10 +53,12 @@ const Playlists = () => {
|
|||||||
title: 'Playlists',
|
title: 'Playlists',
|
||||||
search: search,
|
search: search,
|
||||||
handlerChange: (e) => setSearch(e.target.value),
|
handlerChange: (e) => setSearch(e.target.value),
|
||||||
buttonCreate: {
|
buttonCreate: (
|
||||||
text: 'New Playlist',
|
<GrantAccess
|
||||||
handler: toggleModalCreate,
|
role={Perm.CREATE_PLAYLIST}
|
||||||
},
|
children={<Button onClick={toggleModalCreate}>New Playlist</Button>}
|
||||||
|
/>
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -58,7 +66,7 @@ const Playlists = () => {
|
|||||||
<NavbarSignage data={navbar} />
|
<NavbarSignage data={navbar} />
|
||||||
<PlaylistTable
|
<PlaylistTable
|
||||||
data={playlists}
|
data={playlists}
|
||||||
updateItem={setItem}
|
updateItem={setItem} // todo
|
||||||
// eslint-disable-next-line eqeqeq
|
// eslint-disable-next-line eqeqeq
|
||||||
onDelete={(id) => setPlaylist(playlists.filter((item) => item._id != id))}
|
onDelete={(id) => setPlaylist(playlists.filter((item) => item._id != id))}
|
||||||
updateHandler={toggleModalUpdate}
|
updateHandler={toggleModalUpdate}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Button, TextInput, Group } from '@mantine/core';
|
import { Button, TextInput, Group } from '@mantine/core';
|
||||||
import { useForm, isNotEmpty } from '@mantine/form';
|
import { useForm, isNotEmpty } from '@mantine/form';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import setNotification from '../errors/error-notification';
|
||||||
|
|
||||||
const PlaylistViewEditor = ({ item, handler, buttonText, APICall }) => {
|
const PlaylistViewEditor = ({ item, handler, buttonText, APICall }) => {
|
||||||
const handleClose = (playlist) => {
|
const handleClose = (playlist) => {
|
||||||
@ -34,9 +35,10 @@ const PlaylistViewEditor = ({ item, handler, buttonText, APICall }) => {
|
|||||||
handleClose(res.data);
|
handleClose(res.data);
|
||||||
}
|
}
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
} catch (error) {
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
// todo
|
setNotification(true, err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ const caller = (url = '/api') => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const API = {
|
const API = {
|
||||||
|
profile() {
|
||||||
|
return caller().get('/auth/profile');
|
||||||
|
},
|
||||||
logout() {
|
logout() {
|
||||||
return caller().post('/auth/logout');
|
return caller().post('/auth/logout');
|
||||||
},
|
},
|
||||||
@ -14,22 +17,22 @@ const API = {
|
|||||||
return caller().post('/auth/login', data);
|
return caller().post('/auth/login', data);
|
||||||
},
|
},
|
||||||
listPlaylists(data) {
|
listPlaylists(data) {
|
||||||
return caller().get('/playlist', data);
|
return caller().get('/playlists', data);
|
||||||
},
|
},
|
||||||
createPlaylist(data) {
|
createPlaylist(data) {
|
||||||
return caller().post('/playlist', data);
|
return caller().post('/playlists', data);
|
||||||
},
|
},
|
||||||
updatePlaylist(playlistId, data) {
|
updatePlaylist(playlistId, data) {
|
||||||
return caller().post(`/playlist/${playlistId}/update`, data);
|
return caller().post(`/playlists/${playlistId}/update`, data);
|
||||||
},
|
},
|
||||||
activate(playlistId) {
|
activate(playlistId) {
|
||||||
return caller().post(`/playlist/${playlistId}/activate`);
|
return caller().post(`/playlists/${playlistId}/activate`);
|
||||||
},
|
},
|
||||||
disactivate(playlistId) {
|
disactivate(playlistId) {
|
||||||
return caller().post(`/playlist/${playlistId}/disactivate`);
|
return caller().post(`/playlists/${playlistId}/disactivate`);
|
||||||
},
|
},
|
||||||
getPlaylist(id) {
|
getPlaylist(id) {
|
||||||
return caller().get(`/playlist/${id}`);
|
return caller().get(`/playlists/${id}`);
|
||||||
},
|
},
|
||||||
upload(data) {
|
upload(data) {
|
||||||
return caller().post('/file', data);
|
return caller().post('/file', data);
|
||||||
@ -38,16 +41,16 @@ const API = {
|
|||||||
return caller().get('/file');
|
return caller().get('/file');
|
||||||
},
|
},
|
||||||
addFileToPlaylist(playlistId, file) {
|
addFileToPlaylist(playlistId, file) {
|
||||||
return caller().post(`/playlist/${playlistId}`, file);
|
return caller().post(`/playlists/${playlistId}`, file);
|
||||||
},
|
},
|
||||||
playlistChangeOrder(playlistId, data) {
|
playlistChangeOrder(playlistId, data) {
|
||||||
return caller().post(`/playlist/${playlistId}/order`, data);
|
return caller().post(`/playlists/${playlistId}/order`, data);
|
||||||
},
|
},
|
||||||
playlistChangeSeconds(playlistId, data) {
|
playlistChangeSeconds(playlistId, data) {
|
||||||
return caller().post(`/playlist/${playlistId}/seconds`, data);
|
return caller().post(`/playlists/${playlistId}/seconds`, data);
|
||||||
},
|
},
|
||||||
playlistRemoveFile(playlistId, data) {
|
playlistRemoveFile(playlistId, data) {
|
||||||
return caller().post(`/playlist/${playlistId}/remove_file`, data);
|
return caller().post(`/playlists/${playlistId}/remove_file`, data);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,15 +3,24 @@ import API from '../services/api';
|
|||||||
|
|
||||||
const AuthContext = createContext();
|
const AuthContext = createContext();
|
||||||
|
|
||||||
|
const getUserFromStorage = () => {
|
||||||
|
const user = localStorage.getItem('user');
|
||||||
|
if (user) {
|
||||||
|
return JSON.parse(user);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const AuthProvider = ({ children }) => {
|
const AuthProvider = ({ children }) => {
|
||||||
const [user, setUser] = useState(localStorage.getItem('user'));
|
const [user, setUser] = useState(getUserFromStorage());
|
||||||
|
|
||||||
return <AuthContext.Provider value={{ user, setUser }}>{children}</AuthContext.Provider>;
|
return <AuthContext.Provider value={{ user, setUser }}>{children}</AuthContext.Provider>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
localStorage.removeItem('user');
|
localStorage.removeItem('user');
|
||||||
window.location.href = '/auth';
|
window.location.href = '/login';
|
||||||
API.logout();
|
API.logout();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,9 +9,26 @@ export const Perm = {
|
|||||||
EDIT_PLAYLIST: 4,
|
EDIT_PLAYLIST: 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
const GrantAccess = ({ roles, children }) => {
|
const checkPerm = (perm, user) => {
|
||||||
|
console.log(user);
|
||||||
|
switch (perm) {
|
||||||
|
case Perm.CREATE_ROLE:
|
||||||
|
return false;
|
||||||
|
case Perm.CREATE_PLAYLIST:
|
||||||
|
return user.roles.findIndex((role) => role.can_create_playlist) !== -1;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const GrantAccess = ({ role, roles, children }) => {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
return roles.includes(user) ? children : null;
|
if (role && checkPerm(role, user)) {
|
||||||
|
return children;
|
||||||
|
} else if (roles && roles.includes(user)) {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LoginRequired = ({ children }) => {
|
export const LoginRequired = ({ children }) => {
|
||||||
|
@ -4,13 +4,13 @@ export const parseTime = (preparationTime) => {
|
|||||||
res += hours > 0 ? `${hours}h` : '';
|
res += hours > 0 ? `${hours}h` : '';
|
||||||
|
|
||||||
let min = Math.floor((preparationTime % 3600) / 60);
|
let min = Math.floor((preparationTime % 3600) / 60);
|
||||||
if (min > 0 && res != '') res += ' ';
|
if (min > 0 && res !== '') res += ' ';
|
||||||
res += min > 0 ? `${min}m` : '';
|
res += min > 0 ? `${min}m` : '';
|
||||||
|
|
||||||
let sec = Math.floor((preparationTime % 3600) % 60);
|
let sec = Math.floor((preparationTime % 3600) % 60);
|
||||||
if (sec > 0 && res != '') res += ' ';
|
if (sec > 0 && res !== '') res += ' ';
|
||||||
res += sec > 0 ? `${sec}s` : '';
|
res += sec > 0 ? `${sec}s` : '';
|
||||||
|
|
||||||
if (res == '') res = '0s';
|
if (res === '') res = '0s';
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
125
yarn.lock
125
yarn.lock
@ -1392,20 +1392,20 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.46.0.tgz#3f7802972e8b6fe3f88ed1aabc74ec596c456db6"
|
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.46.0.tgz#3f7802972e8b6fe3f88ed1aabc74ec596c456db6"
|
||||||
integrity sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==
|
integrity sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==
|
||||||
|
|
||||||
"@floating-ui/core@^1.4.0":
|
"@floating-ui/core@^1.4.1":
|
||||||
version "1.4.0"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.4.0.tgz#bc918b49145115c49cc15882c8f29af03435ff50"
|
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.4.1.tgz#0d633f4b76052668afb932492ac452f7ebe97f17"
|
||||||
integrity sha512-x5Ly1Eiyqt9aR38XzhraoWxgtQtvy3mVChWMZIr49XFyvIhNuqUxZKXBRoI5WiMRaaAZezCauJaEISu3z5y8sg==
|
integrity sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@floating-ui/utils" "^0.1.0"
|
"@floating-ui/utils" "^0.1.1"
|
||||||
|
|
||||||
"@floating-ui/dom@^1.2.1":
|
"@floating-ui/dom@^1.2.1":
|
||||||
version "1.5.0"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.0.tgz#a9d7784c1567be8eb3097c61b09b9af8043b24c9"
|
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.1.tgz#88b70defd002fe851f17b4a25efb2d3c04d7a8d7"
|
||||||
integrity sha512-9jPin5dTlcEN+nXzBRhdreCzlJBIYWeMXpJJ5VnO1l9dLcP7uQNPbmwmIoHpHpH6GPYMYtQA7GfkvsSj/CQPwg==
|
integrity sha512-KwvVcPSXg6mQygvA1TjbN/gh///36kKtllIF8SUm0qpFj8+rvYrpvlYdL1JoA71SHpDqgSSdGOSoQ0Mp3uY5aw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@floating-ui/core" "^1.4.0"
|
"@floating-ui/core" "^1.4.1"
|
||||||
"@floating-ui/utils" "^0.1.0"
|
"@floating-ui/utils" "^0.1.1"
|
||||||
|
|
||||||
"@floating-ui/react-dom@^1.3.0":
|
"@floating-ui/react-dom@^1.3.0":
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
@ -1423,10 +1423,10 @@
|
|||||||
aria-hidden "^1.1.3"
|
aria-hidden "^1.1.3"
|
||||||
tabbable "^6.0.1"
|
tabbable "^6.0.1"
|
||||||
|
|
||||||
"@floating-ui/utils@^0.1.0":
|
"@floating-ui/utils@^0.1.1":
|
||||||
version "0.1.0"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.0.tgz#3acc29138c694d017dc09f1f312c5ffc36e492da"
|
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.1.tgz#1a5b1959a528e374e8037c4396c3e825d6cf4a83"
|
||||||
integrity sha512-ZSlli/beGZdvoqT3/Y9oOW79XSEpBfxt8UY6vjyWJW0B8d/M+MKlkQ3kBzLKDXaSsB84IVj6QntQfHLzesB4mA==
|
integrity sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw==
|
||||||
|
|
||||||
"@humanwhocodes/config-array@^0.11.10":
|
"@humanwhocodes/config-array@^0.11.10":
|
||||||
version "0.11.10"
|
version "0.11.10"
|
||||||
@ -2272,9 +2272,9 @@
|
|||||||
"@types/estree" "*"
|
"@types/estree" "*"
|
||||||
|
|
||||||
"@types/eslint@*", "@types/eslint@^7.29.0 || ^8.4.1":
|
"@types/eslint@*", "@types/eslint@^7.29.0 || ^8.4.1":
|
||||||
version "8.44.1"
|
version "8.44.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.1.tgz#d1811559bb6bcd1a76009e3f7883034b78a0415e"
|
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a"
|
||||||
integrity sha512-XpNDc4Z5Tb4x+SW1MriMVeIsMoONHCkWFMkR/aPJbzEsxqHy+4Glu/BqTdPrApfDeMaXbtNh6bseNgl5KaWrSg==
|
integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/estree" "*"
|
"@types/estree" "*"
|
||||||
"@types/json-schema" "*"
|
"@types/json-schema" "*"
|
||||||
@ -2389,9 +2389,9 @@
|
|||||||
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==
|
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "20.4.5"
|
version "20.4.8"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.5.tgz#9dc0a5cb1ccce4f7a731660935ab70b9c00a5d69"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.8.tgz#b5dda19adaa473a9bf0ab5cbd8f30ec7d43f5c85"
|
||||||
integrity sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==
|
integrity sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg==
|
||||||
|
|
||||||
"@types/parse-json@^4.0.0":
|
"@types/parse-json@^4.0.0":
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
@ -2441,9 +2441,9 @@
|
|||||||
redux "^4.0.0"
|
redux "^4.0.0"
|
||||||
|
|
||||||
"@types/react@*":
|
"@types/react@*":
|
||||||
version "18.2.17"
|
version "18.2.18"
|
||||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.17.tgz#baa565b17ddb649c2dac85b5eaf9e9a1fe0f3b4e"
|
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.18.tgz#c8b233919eef1bdc294f6f34b37f9727ad677516"
|
||||||
integrity sha512-u+e7OlgPPh+aryjOm5UJMX32OvB2E3QASOAqVMY6Ahs90djagxwv2ya0IctglNbNTexC12qCSMZG47KPfy1hAA==
|
integrity sha512-da4NTSeBv/P34xoZPhtcLkmZuJ+oYaCxHmyHzwaDQo9RQPBeXV+06gEk2FpqEcsX9XrnNLvRpVh6bdavDSjtiQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/prop-types" "*"
|
"@types/prop-types" "*"
|
||||||
"@types/scheduler" "*"
|
"@types/scheduler" "*"
|
||||||
@ -3363,13 +3363,13 @@ browser-process-hrtime@^1.0.0:
|
|||||||
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
|
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
|
||||||
|
|
||||||
browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.4, browserslist@^4.21.5, browserslist@^4.21.9:
|
browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.4, browserslist@^4.21.5, browserslist@^4.21.9:
|
||||||
version "4.21.9"
|
version "4.21.10"
|
||||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635"
|
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0"
|
||||||
integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==
|
integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite "^1.0.30001503"
|
caniuse-lite "^1.0.30001517"
|
||||||
electron-to-chromium "^1.4.431"
|
electron-to-chromium "^1.4.477"
|
||||||
node-releases "^2.0.12"
|
node-releases "^2.0.13"
|
||||||
update-browserslist-db "^1.0.11"
|
update-browserslist-db "^1.0.11"
|
||||||
|
|
||||||
bser@2.1.1:
|
bser@2.1.1:
|
||||||
@ -3445,10 +3445,10 @@ caniuse-api@^3.0.0:
|
|||||||
lodash.memoize "^4.1.2"
|
lodash.memoize "^4.1.2"
|
||||||
lodash.uniq "^4.5.0"
|
lodash.uniq "^4.5.0"
|
||||||
|
|
||||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001503:
|
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001517:
|
||||||
version "1.0.30001517"
|
version "1.0.30001519"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz#90fabae294215c3495807eb24fc809e11dc2f0a8"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601"
|
||||||
integrity sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==
|
integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==
|
||||||
|
|
||||||
case-sensitive-paths-webpack-plugin@^2.4.0:
|
case-sensitive-paths-webpack-plugin@^2.4.0:
|
||||||
version "2.4.0"
|
version "2.4.0"
|
||||||
@ -4281,10 +4281,10 @@ ejs@^3.1.6:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jake "^10.8.5"
|
jake "^10.8.5"
|
||||||
|
|
||||||
electron-to-chromium@^1.4.431:
|
electron-to-chromium@^1.4.477:
|
||||||
version "1.4.477"
|
version "1.4.485"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.477.tgz#05669aa6f161ee9076a6805457e9bd9fe6d0dfd1"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.485.tgz#fde3ee9ee8112a3414c0dfa545385ad08ec43408"
|
||||||
integrity sha512-shUVy6Eawp33dFBFIoYbIwLHrX0IZ857AlH9ug2o4rvbWmpaCUdBpQ5Zw39HRrfzAFm4APJE9V+E2A/WB0YqJw==
|
integrity sha512-1ndQ5IBNEnFirPwvyud69GHL+31FkE09gH/CJ6m3KCbkx3i0EVOrjwz4UNxRmN9H8OVHbC6vMRZGN1yCvjSs9w==
|
||||||
|
|
||||||
emittery@^0.10.2:
|
emittery@^0.10.2:
|
||||||
version "0.10.2"
|
version "0.10.2"
|
||||||
@ -4495,13 +4495,13 @@ eslint-config-react-app@^7.0.1:
|
|||||||
eslint-plugin-testing-library "^5.0.1"
|
eslint-plugin-testing-library "^5.0.1"
|
||||||
|
|
||||||
eslint-import-resolver-node@^0.3.7:
|
eslint-import-resolver-node@^0.3.7:
|
||||||
version "0.3.7"
|
version "0.3.8"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7"
|
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.8.tgz#be719e72f5e96dcef7a60f74147c842db0c74b06"
|
||||||
integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==
|
integrity sha512-tEe+Pok22qIGaK3KoMP+N96GVDS66B/zreoVVmiavLvRUEmGRtvb4B8wO9jwnb8d2lvHtrkhZ7UD73dWBVnf/Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^3.2.7"
|
debug "^3.2.7"
|
||||||
is-core-module "^2.11.0"
|
is-core-module "^2.13.0"
|
||||||
resolve "^1.22.1"
|
resolve "^1.22.4"
|
||||||
|
|
||||||
eslint-module-utils@^2.8.0:
|
eslint-module-utils@^2.8.0:
|
||||||
version "2.8.0"
|
version "2.8.0"
|
||||||
@ -4577,9 +4577,9 @@ eslint-plugin-react-hooks@^4.3.0:
|
|||||||
integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==
|
integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==
|
||||||
|
|
||||||
eslint-plugin-react@^7.27.1:
|
eslint-plugin-react@^7.27.1:
|
||||||
version "7.33.0"
|
version "7.33.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.0.tgz#6c356fb0862fec2cd1b04426c669ea746e9b6eb3"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.1.tgz#bc27cccf860ae45413a4a4150bf0977345c1ceab"
|
||||||
integrity sha512-qewL/8P34WkY8jAqdQxsiL82pDUeT7nhs8IsuXgfgnsEloKCT4miAV9N9kGtx7/KM9NH/NCGUE7Edt9iGxLXFw==
|
integrity sha512-L093k0WAMvr6VhNwReB8VgOq5s2LesZmrpPdKz/kZElQDzqS7G7+DnKoqT+w4JwuiGeAhAvHO0fvy0Eyk4ejDA==
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes "^3.1.6"
|
array-includes "^3.1.6"
|
||||||
array.prototype.flatmap "^1.3.1"
|
array.prototype.flatmap "^1.3.1"
|
||||||
@ -4598,9 +4598,9 @@ eslint-plugin-react@^7.27.1:
|
|||||||
string.prototype.matchall "^4.0.8"
|
string.prototype.matchall "^4.0.8"
|
||||||
|
|
||||||
eslint-plugin-testing-library@^5.0.1:
|
eslint-plugin-testing-library@^5.0.1:
|
||||||
version "5.11.0"
|
version "5.11.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.0.tgz#0bad7668e216e20dd12f8c3652ca353009163121"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz#5b46cdae96d4a78918711c0b4792f90088e62d20"
|
||||||
integrity sha512-ELY7Gefo+61OfXKlQeXNIDVVLPcvKTeiQOoMZG9TeuWa7Ln4dUNRv8JdRWBQI9Mbb427XGlVB1aa1QPZxBJM8Q==
|
integrity sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/utils" "^5.58.0"
|
"@typescript-eslint/utils" "^5.58.0"
|
||||||
|
|
||||||
@ -5629,10 +5629,10 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
|
|||||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
|
||||||
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
|
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
|
||||||
|
|
||||||
is-core-module@^2.11.0, is-core-module@^2.12.0, is-core-module@^2.12.1, is-core-module@^2.9.0:
|
is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.9.0:
|
||||||
version "2.12.1"
|
version "2.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd"
|
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
|
||||||
integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==
|
integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
has "^1.0.3"
|
has "^1.0.3"
|
||||||
|
|
||||||
@ -6925,7 +6925,7 @@ node-int64@^0.4.0:
|
|||||||
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
||||||
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
|
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
|
||||||
|
|
||||||
node-releases@^2.0.12:
|
node-releases@^2.0.13:
|
||||||
version "2.0.13"
|
version "2.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d"
|
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d"
|
||||||
integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==
|
integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==
|
||||||
@ -8405,21 +8405,12 @@ resolve.exports@^1.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999"
|
resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999"
|
||||||
integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==
|
integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==
|
||||||
|
|
||||||
resolve@^1.1.7, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.2:
|
resolve@^1.1.7, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.2, resolve@^1.22.3, resolve@^1.22.4:
|
||||||
version "1.22.2"
|
version "1.22.4"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34"
|
||||||
integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==
|
integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==
|
||||||
dependencies:
|
dependencies:
|
||||||
is-core-module "^2.11.0"
|
is-core-module "^2.13.0"
|
||||||
path-parse "^1.0.7"
|
|
||||||
supports-preserve-symlinks-flag "^1.0.0"
|
|
||||||
|
|
||||||
resolve@^1.22.3:
|
|
||||||
version "1.22.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.3.tgz#4b4055349ffb962600972da1fdc33c46a4eb3283"
|
|
||||||
integrity sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==
|
|
||||||
dependencies:
|
|
||||||
is-core-module "^2.12.0"
|
|
||||||
path-parse "^1.0.7"
|
path-parse "^1.0.7"
|
||||||
supports-preserve-symlinks-flag "^1.0.0"
|
supports-preserve-symlinks-flag "^1.0.0"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user