-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7e3af9
commit a4c0922
Showing
9 changed files
with
95 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Birdseye from './birdseye.svg'; | ||
import Camera from './camera.svg'; | ||
import DownSquare from './downSquare.svg'; | ||
import Event from './event.svg'; | ||
import Home from './home.svg'; | ||
import PlayRect from './play-rect.svg'; | ||
import Recording from './recording.svg'; | ||
import Settings from './settings.svg'; | ||
import Live from './video-waveform.svg'; | ||
|
||
export { | ||
PlayRect, | ||
Camera, | ||
Birdseye, | ||
DownSquare, | ||
Event, | ||
Home, | ||
Recording, | ||
Settings, | ||
Live, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import React from 'react'; | ||
import {TouchableOpacity} from 'react-native'; | ||
|
||
import SettingsIcon from '@icons/settings.svg'; | ||
import {useNavigation} from '@react-navigation/native'; | ||
|
||
import {Settings} from '@icons'; | ||
|
||
export const RightHeaderButton = ({tintColor}: {tintColor?: string}) => { | ||
const navigation = useNavigation(); | ||
|
||
return ( | ||
<TouchableOpacity onPress={() => navigation.navigate('Settings')}> | ||
<SettingsIcon height={22} width={22} fill={tintColor} /> | ||
<Settings height={22} width={22} fill={tintColor} /> | ||
</TouchableOpacity> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 2 additions & 55 deletions
57
src/screens/CameraScreens/RecordingsScreen/RecordingsScreen.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/screens/CameraScreens/RecordingsScreen/components/HourChip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import {Pressable} from 'react-native'; | ||
|
||
import {useNavigation} from '@react-navigation/native'; | ||
import clsx from 'clsx'; | ||
|
||
import {BaseText, Label} from '@components'; | ||
import {PlayRect} from '@icons'; | ||
import {getRecordingUrl} from '@utils'; | ||
|
||
export const HourChip = ({ | ||
numEvents, | ||
date, | ||
cameraName, | ||
}: { | ||
numEvents: number; | ||
date: Date; | ||
cameraName: string; | ||
}) => { | ||
const navigation = useNavigation(); | ||
const hourString = date.getHours() + ':00'; | ||
const vodUrl = getRecordingUrl(cameraName, date); | ||
const videoTitle = `${date.toLocaleDateString(undefined, { | ||
weekday: undefined, | ||
})} - ${hourString}`; | ||
|
||
return ( | ||
<Pressable | ||
onPress={() => { | ||
navigation.navigate('Fullscreen Video', { | ||
videoURI: vodUrl, | ||
title: videoTitle, | ||
}); | ||
}}> | ||
<Label | ||
className={clsx( | ||
'mx-1 my-2 justify-between p-2 items-center border border-transparent', | ||
numEvents > 0 && 'border-destructive dark:border-destructive-dark', | ||
)}> | ||
<BaseText className="mb-1">{hourString}</BaseText> | ||
<PlayRect className="h-8 w-8" fill={'white'} /> | ||
<BaseText>{numEvents} Events</BaseText> | ||
</Label> | ||
</Pressable> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './HourChip'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters