-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Operator Layout * style: Add OnTime colors and adjust playback block * clean: Format Code * style: Operator * fix: Revert Pnpm Lock * fix: Fix Imports
- Loading branch information
Showing
9 changed files
with
1,840 additions
and
1,952 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 |
---|---|---|
@@ -1,34 +1,38 @@ | ||
// remember we are targeting phones and tablets | ||
|
||
.operator { | ||
@use '../../../src/theme/v2Styles' as *; | ||
@use '../../../src/theme/ontimeColours' as *; | ||
|
||
.operatorContainer { | ||
width: 100vw; | ||
height: 100vh; | ||
padding: 2rem; | ||
font-size: 0.8rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2px; | ||
color:white; | ||
color: white; | ||
} | ||
|
||
.allBlocks{ | ||
.operatorEvents { | ||
flex: 1; | ||
overflow: scroll; | ||
overflow: auto; | ||
} | ||
|
||
@mixin event-block() { | ||
padding: 0.2rem; | ||
display: flex; | ||
gap: 0.75rem; | ||
align-items: center; | ||
margin: 0.1rem; | ||
} | ||
|
||
.scheduledEvent { | ||
@include event-block(); | ||
background-color: hotpink; | ||
background-color: $gray-1300; | ||
} | ||
|
||
.block { | ||
@include event-block(); | ||
background-color: gray; | ||
background-color: $gray-1350; | ||
} |
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
4 changes: 2 additions & 2 deletions
4
apps/client/src/features/operator/op-block/OpBlock.module.scss
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,3 +1,3 @@ | ||
.title{ | ||
font-size: 1rem; | ||
.OpBlock { | ||
font-size: 1rem; | ||
} |
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,13 +1,11 @@ | ||
import { OntimeBlock } from 'ontime-types'; | ||
|
||
import style from './OpBlock.module.scss'; | ||
|
||
type Props = { | ||
data: any; | ||
}; | ||
interface OpBlockProps { | ||
data: OntimeBlock; | ||
} | ||
|
||
export default function OpBlock({ data }: Props) { | ||
return ( | ||
<> | ||
<div className={style.title}>{data.title}</div> | ||
</> | ||
); | ||
export default function OpBlock({ data }: OpBlockProps) { | ||
return <div className={style.OpBlock}>{data.title}</div>; | ||
} |
37 changes: 18 additions & 19 deletions
37
apps/client/src/features/operator/op-event/OpEvent.module.scss
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,27 +1,26 @@ | ||
.alias{ | ||
background-color: red; | ||
width: fit-content; | ||
height: fit-content; | ||
padding: 0.2rem; | ||
align-items: center; | ||
.alias { | ||
background-color: red; | ||
width: fit-content; | ||
height: fit-content; | ||
padding: 0.2rem; | ||
align-items: center; | ||
} | ||
|
||
.title{ | ||
font-size: 1rem; | ||
.title { | ||
font-size: 1rem; | ||
} | ||
|
||
.time{ | ||
display: flex; | ||
flex-direction: column; | ||
font-size: 0.65rem; | ||
text-align: right; | ||
.time { | ||
display: flex; | ||
flex-direction: column; | ||
font-size: 0.65rem; | ||
text-align: right; | ||
} | ||
|
||
.time > div { | ||
margin-bottom: -4px; /* Adjust the value as needed */ | ||
} | ||
|
||
margin-bottom: -4px; /* Adjust the value as needed */ | ||
} | ||
|
||
.title{ | ||
flex: 1; | ||
} | ||
.title { | ||
flex: 1; | ||
} |
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
19 changes: 9 additions & 10 deletions
19
apps/client/src/features/operator/time-block/TimeBlock.module.scss
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,12 +1,11 @@ | ||
.block{ | ||
padding: 0.65rem; | ||
border: 1px solid hotpink; | ||
display: flex; | ||
justify-content: space-between; | ||
.TimeBlock { | ||
padding: 0.65rem; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.clock{ | ||
display: flex; | ||
gap: 1.5rem; | ||
margin-right:1rem; | ||
} | ||
.clock { | ||
display: flex; | ||
gap: 1.5rem; | ||
margin-right: 1rem; | ||
} |
17 changes: 10 additions & 7 deletions
17
apps/client/src/features/operator/time-block/TimeBlock.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 |
---|---|---|
@@ -1,20 +1,23 @@ | ||
import styles from './TimeBlock.module.scss'; | ||
import { Play } from 'lucide-react'; | ||
import { IoPlay } from '@react-icons/all-files/io5/IoPlay'; | ||
|
||
import { useTimer } from '../../../common/hooks/useSocket'; | ||
import { formatTime } from '../../../common/utils/time'; | ||
|
||
type Props = {}; | ||
import styles from './TimeBlock.module.scss'; | ||
|
||
export default function TimeBlock({}: Props) { | ||
export default function TimeBlock() { | ||
const timer = useTimer(); | ||
const timeNow = formatTime(timer.clock, { | ||
showSeconds: true, | ||
format: 'hh:mm:ss a', | ||
}); | ||
|
||
return ( | ||
<div className={styles.block}> | ||
<Play size={17} /> | ||
<div className={styles.clock}>{timeNow} <div>00:10:00</div></div> | ||
<div className={styles.TimeBlock}> | ||
<IoPlay size={17} /> | ||
<div className={styles.clock}> | ||
<span className={styles.timer}>{timeNow}</span> <span className={styles.timer}>00:10:00</span> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.