11import { useDesktop , useDesktopDispatch } from '@/app/SystemFolder/ControlPanels/AppManager/ClassicyAppManagerContext'
22import ClassicyApp from '@/app/SystemFolder/SystemResources/App/ClassicyApp'
3- import { quitAppHelper } from '@/app/SystemFolder/SystemResources/App/ClassicyAppUtils'
3+ import { quitMenuItemHelper } from '@/app/SystemFolder/SystemResources/App/ClassicyAppUtils'
44import ClassicyButton from '@/app/SystemFolder/SystemResources/Button/ClassicyButton'
55import ClassicyWindow from '@/app/SystemFolder/SystemResources/Window/ClassicyWindow'
66import classNames from 'classnames'
@@ -9,9 +9,9 @@ import epgStyles from './EPG.module.scss'
99import data from './testdata.json' with { type : 'json' }
1010
1111interface ClassicyEPGProps {
12- minutesPerGrid ?: number // Minutes
13- gridTimeWidth ?: number // Minutes
14- gridWidth ?: number // Minutes
12+ minutesPerGrid ?: number // in Minutes
13+ gridTimeWidth ?: number // in Minutes
14+ gridWidth ?: number // in Minutes
1515 gridStart ?: Date
1616 channelHeaderWidth ?: number
1717}
@@ -30,7 +30,7 @@ export type EPGChannel = {
3030 name : string
3131 title ?: string
3232 number : string
33- callsign : string
33+ callSign : string
3434 location : string
3535 icon : string
3636 grid : EPGProgram [ ]
@@ -65,10 +65,6 @@ const EPG: React.FC<ClassicyEPGProps> = ({
6565 return endTime
6666 } , [ gridStartTime , gridWidth ] )
6767
68- const quitApp = ( ) => {
69- desktopEventDispatch ( quitAppHelper ( appId , appName , appIcon ) )
70- }
71-
7268 const testClick = ( e ) => {
7369 alert ( e . target . id )
7470 }
@@ -77,17 +73,12 @@ const EPG: React.FC<ClassicyEPGProps> = ({
7773 {
7874 id : 'file' ,
7975 title : 'File' ,
80- menuChildren : [
81- {
82- id : appId + '_quit' ,
83- title : 'Quit' ,
84- onClickFunc : quitApp ,
85- } ,
86- ] ,
76+ menuChildren : [ quitMenuItemHelper ( appId , appName , appIcon ) ] ,
8777 } ,
8878 ]
8979
9080 const gridData = data as EPGChannel [ ]
81+ const defaultDocumentIcon = `${ process . env . NEXT_PUBLIC_BASE_PATH || '' } /img/icons/system/quicktime/movie.png`
9182
9283 const getProgramData = ( channel : EPGChannel , channelIndex : number ) => {
9384 return channel . grid . map ( ( gridItem ) => {
@@ -200,7 +191,7 @@ const EPG: React.FC<ClassicyEPGProps> = ({
200191 < img
201192 className = { epgStyles . epgChannelIcon }
202193 src = { `${ process . env . NEXT_PUBLIC_BASE_PATH || '' } /img/icons/applications/epg/channels/${ channel . icon } ` }
203- alt = { channel . number + ' ' + channel . callsign + ' - ' + channel . location }
194+ alt = { channel . number + ' ' + channel . callSign + ' - ' + channel . location }
204195 />
205196 { channel . name }
206197 </ div >
@@ -252,17 +243,20 @@ const EPG: React.FC<ClassicyEPGProps> = ({
252243 < div
253244 className = { classNames ( epgStyles . epgGridSetup , epgStyles . epgIndicatorHolder ) }
254245 style = { {
246+ pointerEvents : 'none' ,
255247 gridTemplateColumns : `${ channelHeaderWidth } fr repeat(${ gridWidth / minutesPerGrid } , 1fr)` ,
256248 } }
257249 >
258250 < div
259251 className = { epgStyles . epgIndicator }
260252 style = { { gridColumnStart : indicator + 2 , gridColumnEnd : indicator + 3 } }
261- > </ div >
253+ >
254+
255+ </ div >
262256 </ div >
263257 ) }
264258 < div
265- className = { epgStyles . epgGridSetup }
259+ className = { classNames ( epgStyles . epgGridSetup ) }
266260 style = { {
267261 gridTemplateColumns : `${ channelHeaderWidth } fr repeat(${ gridWidth / minutesPerGrid } , 1fr)` ,
268262 backgroundColor : 'var(--color-white)' ,
0 commit comments