@vixoniccom/footbal-score 1.0.1-beta.4 → 1.0.1-beta.5

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.1-beta.5](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.1-beta.4...v1.0.1-beta.5) (2022-11-21)
6
+
5
7
  ### [1.0.1-beta.4](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.1-beta.3...v1.0.1-beta.4) (2022-11-16)
6
8
 
7
9
  ### [1.0.1-beta.3](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.1-beta.2...v1.0.1-beta.3) (2022-11-16)
package/build.zip CHANGED
Binary file
@@ -10,6 +10,15 @@
10
10
  "type": "label",
11
11
  "label": "Datos"
12
12
  },
13
+ {
14
+ "id": "timeRequest",
15
+ "type": "number-input",
16
+ "range": "[60000:12000000]",
17
+ "required": false,
18
+ "label": "Tiempo de actualización app",
19
+ "description": "Por defecto son 60000 ms (1 minutos)",
20
+ "defaultValue":"60000"
21
+ },
13
22
  {
14
23
  "type": "switch",
15
24
  "id": "titleEnabled",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixoniccom/footbal-score",
3
3
  "alias": "Resultados Deportivos",
4
- "version": "1.0.1-beta.4",
4
+ "version": "1.0.1-beta.5",
5
5
  "description": "Muestra resultados en vivo de fútbol.",
6
6
  "main": "main.js",
7
7
  "author": "",
package/src/App.tsx CHANGED
@@ -19,8 +19,10 @@ export const App = ({ data, start }: Props) => {
19
19
  const { backgroundImage,
20
20
  padding,
21
21
  msj0 = '',
22
+ timeRequest
22
23
  } = parameters
23
-
24
+ console.log("🚀 ~ file: App.tsx ~ line 24 ~ App ~ timeRequest", timeRequest)
25
+
24
26
  let backgroundImageState = backgroundImage && backgroundImage.filename
25
27
  ? `url("${downloadsPath}/${backgroundImage.filename}")`
26
28
  : ''
@@ -31,12 +33,13 @@ export const App = ({ data, start }: Props) => {
31
33
  }
32
34
 
33
35
  //Request data every 5 minutes
34
- // useEffect(() => {
35
- // const interval = setInterval(() => {
36
- // if (start) getData()
37
- // }, 300000)
38
- // return () => clearInterval(interval)
39
- // }, [])
36
+ useEffect(() => {
37
+ const interval = setInterval(() => {
38
+ console.log('start', start)
39
+ if (start) getData()
40
+ }, timeRequest || 60000)
41
+ return () => clearInterval(interval)
42
+ }, [timeRequest])
40
43
 
41
44
  useEffect(() => {
42
45
  if (start) getData()
@@ -6,6 +6,7 @@ export const Results = (goals: any) => {
6
6
 
7
7
  const { configureState } = useContext(ConfigureContext)
8
8
  const { parameters } = configureState
9
+ console.log("🚀 ~ file: Results.tsx ~ line 9 ~ Results ~ parameters", parameters.goalsFormat)
9
10
 
10
11
 
11
12
  return (
@@ -1,6 +1,5 @@
1
1
  import React, { useContext } from 'react'
2
2
  // import { TeamItems } from './TeamItems'
3
- import { Results } from './Results';
4
3
  import { Time } from './Time';
5
4
  import { FormattedText } from '../FormattedText';
6
5
  import { ConfigureContext } from '../../contex/configureContext/ConfigureContext';
@@ -23,8 +22,8 @@ export const Row = (item: any) => {
23
22
  rowGap,
24
23
  widthStatus,
25
24
  widthTime,
25
+ goalsFormat
26
26
  } = parameters
27
- console.log("🚀 ~ file: Row.tsx ~ line 27 ~ Row ~ descriptionEnabled", descriptionEnabled)
28
27
 
29
28
  let gridColumns = descriptionEnabled ? `${widthTime || "200px"} ${widthStatus || "200px"} ${widthDescription || "200px"} ${widthImage || "300px"} ${widthScore || "100px"} ${widthImage || "300px"} ${widthDescription || "200px"}` :
30
29
  ` ${widthTime || "100px"} ${widthStatus || "100px"} ${widthImage || "300px"} ${widthScore || "100px"} ${widthImage || "300px"}`
@@ -64,7 +63,15 @@ export const Row = (item: any) => {
64
63
  <img src={teams.home.logo} style={{ width: `${imageSize}%` }} />
65
64
  </div>
66
65
 
67
- <Results goals={goals} />
66
+ <div style={{
67
+ display: 'flex',
68
+ justifyContent: 'center',
69
+ }}>
70
+ <FormattedText text={goals.home ? goals.home : 0} format={goalsFormat} />
71
+ <FormattedText text={"-"} format={goalsFormat} />
72
+ <FormattedText text={goals.away ? goals.away : 0} format={goalsFormat} />
73
+ </div>
74
+
68
75
  <div
69
76
  style={{
70
77
  display: 'flex',
@@ -62,7 +62,8 @@ const INITIAL_STATE: VixonicData = {
62
62
  columnGap: "10px",
63
63
  rowGap: "30px",
64
64
  widthStatus: "200px",
65
- widthTime: "200px"
65
+ widthTime: "200px",
66
+ timeRequest: 60000
66
67
  }
67
68
  }
68
69
 
@@ -51,6 +51,7 @@ export const parameterReducer = (state: VixonicData, action: ConfigureAction) =>
51
51
  rowGap: parameters.rowGap,
52
52
  widthTime: parameters.widthTime,
53
53
  widthStatus: parameters.widthStatus,
54
+ timeRequest: parameters.timeRequest,
54
55
  }
55
56
  }
56
57
  default:
@@ -25,6 +25,7 @@ declare type VixonicParameters = Partial<{
25
25
  dateDayFormat: DateFormat
26
26
  timeFormat: DateFormat
27
27
  goalsFormat: DateFormat
28
+ timeRequest: number
28
29
  dateEnabled: boolean
29
30
  title0: string
30
31
  titleEnabled: boolean
@@ -3,6 +3,7 @@
3
3
  "urlBaseApi": "mandomedio",
4
4
  "msj0": "No hay partidos",
5
5
  "statusEnabled": true,
6
+ "timeRequest":60000,
6
7
  "rowGap":"30px",
7
8
  "columnGap":"10px",
8
9
  "padding": "30px 25px 80px 40px",