mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Always show recording link even if recordings are currently disabled (#2787)
* Always show recording link even if recordings are currently disabled * Fix test to consider all cameras to have recording link
This commit is contained in:
parent
ebdfbfe96c
commit
5627b66a6e
@ -29,12 +29,8 @@ function Camera({ name, conf }) {
|
|||||||
const { payload: snapshotValue, send: sendSnapshots } = useSnapshotsState(name);
|
const { payload: snapshotValue, send: sendSnapshots } = useSnapshotsState(name);
|
||||||
const href = `/cameras/${name}`;
|
const href = `/cameras/${name}`;
|
||||||
const buttons = useMemo(() => {
|
const buttons = useMemo(() => {
|
||||||
const result = [{ name: 'Events', href: `/events?camera=${name}` }];
|
return [{ name: 'Events', href: `/events?camera=${name}` }, { name: 'Recordings', href: `/recording/${name}` }];
|
||||||
if (conf.record.enabled) {
|
}, [name]);
|
||||||
result.push({ name: 'Recordings', href: `/recording/${name}` });
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}, [name, conf.record.enabled]);
|
|
||||||
const icons = useMemo(
|
const icons = useMemo(
|
||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ describe('Cameras Route', () => {
|
|||||||
|
|
||||||
expect(screen.queryByLabelText('Loading…')).not.toBeInTheDocument();
|
expect(screen.queryByLabelText('Loading…')).not.toBeInTheDocument();
|
||||||
|
|
||||||
expect(screen.queryAllByText('Recordings')).toHaveLength(1);
|
expect(screen.queryAllByText('Recordings')).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('buttons toggle detect, clips, and snapshots', async () => {
|
test('buttons toggle detect, clips, and snapshots', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user