@vixoniccom/footbal-score 1.4.6-dev.0 → 1.4.6-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "parameters": {
3
3
  "league": 1,
4
+ "debugTimezone" : false,
4
5
  "timeStart": "10 am",
5
6
  "timeEnd": "1 am",
6
7
  "matchesYesterday": false,
package/build.zip CHANGED
Binary file
@@ -98,4 +98,11 @@ export const dataInputs = [
98
98
  description: 'Duración por página (en segundos)',
99
99
  range: new NumberRangeValue(1, 100),
100
100
  }),
101
+ new Switch({
102
+ id: 'debugTimezone',
103
+ label: 'Debug Timezone',
104
+ displayOnTrue: 'Visible',
105
+ displayOnFalse: 'Oculto',
106
+ defaultValue: false,
107
+ }),
101
108
  ]
@@ -373,6 +373,14 @@
373
373
  "type": "number-input",
374
374
  "range": "[1:100:]",
375
375
  "description": "Duración por página (en segundos)"
376
+ },
377
+ {
378
+ "id": "debugTimezone",
379
+ "label": "Debug Timezone",
380
+ "type": "switch",
381
+ "defaultValue": false,
382
+ "displayOnTrue": "Visible",
383
+ "displayOnFalse": "Oculto"
376
384
  }
377
385
  ]
378
386
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixoniccom/footbal-score",
3
3
  "alias": "Resultados Deportivos",
4
- "version": "1.4.6-dev.0",
4
+ "version": "1.4.6-dev.1",
5
5
  "description": "Muestra resultados en vivo de fútbol.",
6
6
  "main": "main.js",
7
7
  "author": "",
package/src/App.tsx CHANGED
@@ -56,7 +56,7 @@ export const App: React.FunctionComponent<Props> = ({ data, start }) => {
56
56
  const [dataFixture, setDataFixture] = useState<any[]>([])
57
57
  const [leagueState, setLeagueState] = useState<string>('')
58
58
  const { parameters, downloadsPath } = data
59
- const { backgroundImage, padding, msj0 = '', league = '9' } = parameters
59
+ const { backgroundImage, padding, msj0 = '', league = '9', debugTimezone = false } = parameters
60
60
  const backgroundImageState = backgroundImage?.filename
61
61
  ? `url("${downloadsPath}/${backgroundImage.filename}")`
62
62
  : ''
@@ -142,42 +142,68 @@ export const App: React.FunctionComponent<Props> = ({ data, start }) => {
142
142
  fetchAndSchedule()
143
143
  }, [league])
144
144
 
145
+ const timezone = (() => {
146
+ try { return Intl.DateTimeFormat().resolvedOptions().timeZone } catch { return 'UTC' }
147
+ })()
148
+
145
149
  return (
146
- dataFixture.length > 0 ?
147
- <div style={{
148
- position: 'absolute',
149
- top: 0,
150
- bottom: 0,
151
- left: 0,
152
- right: 0,
153
- backgroundImage: backgroundImageState,
154
- backgroundSize: '100% 100%',
155
- padding: padding
156
- }}>
157
- <FontLoader paths={['nameFormat.font', 'statusFormat.font', 'timeFormat.font', 'titleFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font', 'goalsFormat.font']} parameters={parameters} downloadsPath={downloadsPath} />
158
- {parameters.titleEnabled &&
150
+ <>
151
+ {dataFixture.length > 0 ?
152
+ <div style={{
153
+ position: 'absolute',
154
+ top: 0,
155
+ bottom: 0,
156
+ left: 0,
157
+ right: 0,
158
+ backgroundImage: backgroundImageState,
159
+ backgroundSize: '100% 100%',
160
+ padding: padding
161
+ }}>
162
+ <FontLoader paths={['nameFormat.font', 'statusFormat.font', 'timeFormat.font', 'titleFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font', 'goalsFormat.font']} parameters={parameters} downloadsPath={downloadsPath} />
163
+ {parameters.titleEnabled &&
164
+ <div style={{ display: 'flex', position: 'relative', flex: '1 1 0%', flexDirection: 'column' }}>
165
+ <FormattedText text={parameters.title0 || 'Partidos Mundial'} format={parameters.titleFormat} />
166
+ </div>
167
+ }
168
+ <Table dataFixture={dataFixture} parameters={parameters} />
169
+ </div> :
170
+ <div style={{
171
+ position: 'absolute',
172
+ top: 0,
173
+ bottom: 0,
174
+ left: 0,
175
+ right: 0,
176
+ backgroundImage: backgroundImageState,
177
+ backgroundSize: '100% 100%',
178
+ padding: padding,
179
+ display: 'flex',
180
+ alignItems: parameters.alignVerticalMsj
181
+ }}>
182
+ <FontLoader paths={['nameFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font', 'formatMjs.font']} parameters={parameters} downloadsPath={downloadsPath} />
159
183
  <div style={{ display: 'flex', position: 'relative', flex: '1 1 0%', flexDirection: 'column' }}>
160
- <FormattedText text={parameters.title0 || 'Partidos Mundial'} format={parameters.titleFormat} />
184
+ <FormattedText text={msj0 || 'Sin partidos'} format={parameters.formatMjs} />
161
185
  </div>
162
- }
163
- <Table dataFixture={dataFixture} parameters={parameters} />
164
- </div> :
165
- <div style={{
166
- position: 'absolute',
167
- top: 0,
168
- bottom: 0,
169
- left: 0,
170
- right: 0,
171
- backgroundImage: backgroundImageState,
172
- backgroundSize: '100% 100%',
173
- padding: padding,
174
- display: 'flex',
175
- alignItems: parameters.alignVerticalMsj
176
- }}>
177
- <FontLoader paths={['nameFormat.font', 'descriptionFormat.font', 'dateDayFormat.font', 'dateMonthFormat.font', 'formatMjs.font']} parameters={parameters} downloadsPath={downloadsPath} />
178
- <div style={{ display: 'flex', position: 'relative', flex: '1 1 0%', flexDirection: 'column' }}>
179
- <FormattedText text={msj0 || 'Sin partidos'} format={parameters.formatMjs} />
180
186
  </div>
181
- </div>
187
+ }
188
+ {debugTimezone && (
189
+ <div style={{
190
+ position: 'fixed',
191
+ bottom: 8,
192
+ right: 8,
193
+ background: 'rgba(0,0,0,0.75)',
194
+ color: '#00ff00',
195
+ fontSize: 10,
196
+ fontFamily: 'monospace',
197
+ padding: '4px 8px',
198
+ borderRadius: 4,
199
+ zIndex: 9999,
200
+ lineHeight: 1.4,
201
+ pointerEvents: 'none',
202
+ whiteSpace: 'nowrap',
203
+ }}>
204
+ TZ: {timezone}
205
+ </div>
206
+ )}
207
+ </>
182
208
  )
183
209
  }
@@ -21,8 +21,10 @@ export const getFixture = async (league: string, yesterday?: boolean, tomorrow?:
21
21
  const timezone = (() => {
22
22
  try {
23
23
  const tz = Intl.DateTimeFormat().resolvedOptions().timeZone
24
+ console.log(`[football-score] Timezone resolved: ${tz}`)
24
25
  return tz
25
26
  } catch (error) {
27
+ console.warn('[football-score] Failed to resolve timezone, defaulting to UTC', error)
26
28
  return 'UTC'
27
29
  }
28
30
  })()
@@ -5,5 +5,5 @@ declare type VixonicData = {
5
5
  }
6
6
 
7
7
  declare type VixonicParameters = Partial<{
8
- league: '1' | '9' | '4' | '22' | '15' | '1220' | '128' | '265', matchesYesterday: boolean, matchesTomorrow: boolean, timeStart: '12m' | '1m' | '2m' | '3m' | '4m' | '5m' | '6m' | '7m' | '8m' | '9m' | '10m' | '11m' | '12pm' | '1pm' | '2pm' | '3pm' | '4pm' | '5pm' | '6pm' | '7pm' | '8pm' | '9pm' | '10pm' | '11pm', timeEnd: '12m' | '1m' | '2m' | '3m' | '4m' | '5m' | '6m' | '7m' | '8m' | '9m' | '10m' | '11m' | '12pm' | '1pm' | '2pm' | '3pm' | '4pm' | '5pm' | '6pm' | '7pm' | '8pm' | '9pm' | '10pm' | '11pm', updateTime: 300000 | 600000 | 1800000 | 3600000 | 21600000 | 43200000 | 86400000, titleEnabled: boolean, title0: string, titleFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, msj0: string, formatMjs: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, alignVerticalMsj: 'flex-start' | 'center' | 'flex-end', itemsPerPage: number, durationPerPage: number, backgroundImage: {id?: string, filename?: string, extension?: string}, padding: string, columnGap: string, rowGap: string, timeFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthTime: string, statusFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthStatus: string, goalsFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthScore: string, descriptionEnabled: boolean, descriptionFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthDescription: string, imageSize: number, widthImage: string
8
+ league: '1' | '9' | '4' | '22' | '15' | '1220' | '128' | '265', matchesYesterday: boolean, matchesTomorrow: boolean, timeStart: '12m' | '1m' | '2m' | '3m' | '4m' | '5m' | '6m' | '7m' | '8m' | '9m' | '10m' | '11m' | '12pm' | '1pm' | '2pm' | '3pm' | '4pm' | '5pm' | '6pm' | '7pm' | '8pm' | '9pm' | '10pm' | '11pm', timeEnd: '12m' | '1m' | '2m' | '3m' | '4m' | '5m' | '6m' | '7m' | '8m' | '9m' | '10m' | '11m' | '12pm' | '1pm' | '2pm' | '3pm' | '4pm' | '5pm' | '6pm' | '7pm' | '8pm' | '9pm' | '10pm' | '11pm', updateTime: 300000 | 600000 | 1800000 | 3600000 | 21600000 | 43200000 | 86400000, titleEnabled: boolean, title0: string, titleFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, msj0: string, formatMjs: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, alignVerticalMsj: 'flex-start' | 'center' | 'flex-end', itemsPerPage: number, durationPerPage: number, backgroundImage: {id?: string, filename?: string, extension?: string}, padding: string, columnGap: string, rowGap: string, timeFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthTime: string, statusFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthStatus: string, goalsFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthScore: string, descriptionEnabled: boolean, descriptionFormat: { fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }, widthDescription: string, imageSize: number, widthImage: string, debugTimezone: boolean
9
9
  }>
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "parameters": {
3
3
  "league": 1,
4
+ "debugTimezone" : false,
4
5
  "timeStart": "10 am",
5
6
  "timeEnd": "1 am",
6
7
  "matchesYesterday": false,