@golstats/gsc-lineups-reports 1.1.0 → 1.1.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.
- package/dist/gsc-lineups-reports.es.js +1832 -1803
- package/dist/gsc-lineups-reports.umd.js +7 -7
- package/package.json +1 -1
- package/src/components/Lineup2D/LineupRecentItem.vue +8 -3
- package/src/components/gsc-header-historico-lineup.vue +18 -12
- package/src/components/gsc-header-postmatch-lineup.vue +18 -12
- package/src/components/gsc-header-probables-lineup.vue +14 -8
- package/src/components/gsc-header-recientes-lineup.vue +30 -24
- package/src/components/gsc-lineup-dosd.vue +34 -32
- package/src/components/gsc-lineups.vue +49 -48
- package/src/utils/imageUrl.js +30 -0
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
:localTeam="{
|
|
36
36
|
acronym: headerInfoHistoricItemGame.home_team_abbreviation,
|
|
37
37
|
img:
|
|
38
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
38
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
39
39
|
headerInfoHistoricItemGame.home_team +
|
|
40
|
-
'.png'
|
|
40
|
+
'.png', provider)
|
|
41
41
|
}"
|
|
42
42
|
:visitTeam="{
|
|
43
43
|
acronym: headerInfoHistoricItemGame.away_team_abbreviation,
|
|
44
44
|
img:
|
|
45
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
45
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
46
46
|
headerInfoHistoricItemGame.away_team +
|
|
47
|
-
'.png'
|
|
47
|
+
'.png', provider)
|
|
48
48
|
}"
|
|
49
49
|
:probablyTeamHome="{ acronym: rivalHomeAbrev, img: rivalHomeImg }"
|
|
50
50
|
:probablyTeamAway="{ acronym: rivalVisitAbrev, img: rivalVisitImg }"
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
v-if="Object.keys(gameInfoheader).length > 0"
|
|
59
59
|
:localTeam="{
|
|
60
60
|
acronym: gameInfoheader.home_team_abbreviation,
|
|
61
|
-
img: 'https://golstatsimages.blob.core.windows.net/teams-80/' + gameInfoheader.home_team + '.png'
|
|
61
|
+
img: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameInfoheader.home_team + '.png', provider)
|
|
62
62
|
}"
|
|
63
63
|
:visitTeam="{
|
|
64
64
|
acronym: gameInfoheader.away_team_abbreviation,
|
|
65
|
-
img: 'https://golstatsimages.blob.core.windows.net/teams-80/' + gameInfoheader.away_team + '.png'
|
|
65
|
+
img: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameInfoheader.away_team + '.png', provider)
|
|
66
66
|
}"
|
|
67
67
|
:probablyTeamHome="{ acronym: rivalHomeAbrev, img: rivalHomeImg }"
|
|
68
68
|
:probablyTeamAway="{ acronym: rivalVisitAbrev, img: rivalVisitImg }"
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
slideRightArrowBackgroundImage="none"
|
|
164
164
|
>
|
|
165
165
|
<template #default="{ item }">
|
|
166
|
-
<LineupRecentItem :game="item" :teamSelect="teamSelect" />
|
|
166
|
+
<LineupRecentItem :game="item" :teamSelect="teamSelect" :provider="provider" />
|
|
167
167
|
</template>
|
|
168
168
|
</GSCCarousel>
|
|
169
169
|
<div v-else class="containernofoundsearchrecientes">
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
:areNavigationArrowsVisible="false"
|
|
205
205
|
>
|
|
206
206
|
<template #default="{ item }">
|
|
207
|
-
<LineupRecentItem :game="item" :teamSelect="teamSelect" style="max-width: 200px" />
|
|
207
|
+
<LineupRecentItem :game="item" :teamSelect="teamSelect" :provider="provider" style="max-width: 200px" />
|
|
208
208
|
</template>
|
|
209
209
|
</GSCCarousel>
|
|
210
210
|
<MatchDetails
|
|
@@ -315,6 +315,7 @@
|
|
|
315
315
|
import axios from 'axios'
|
|
316
316
|
import { connectSocket, connectChannel } from '@/utils/socketConnection'
|
|
317
317
|
import { getApiUrl } from '@/utils/apiUrl'
|
|
318
|
+
import { getImageUrl } from '@/utils/imageUrl'
|
|
318
319
|
let calendarResizeObserver = null
|
|
319
320
|
import tijuanaImage from '@/components/Lineup2D/tijuana.png'
|
|
320
321
|
import LineupField from '@/components/Lineup2D/LineupField.vue'
|
|
@@ -855,6 +856,7 @@ export default {
|
|
|
855
856
|
}
|
|
856
857
|
},
|
|
857
858
|
methods: {
|
|
859
|
+
getImageUrl,
|
|
858
860
|
clickOnDeleteFilter() {
|
|
859
861
|
this.vDeleteFilter = true
|
|
860
862
|
setTimeout(() => {
|
|
@@ -992,12 +994,12 @@ export default {
|
|
|
992
994
|
this.gameInfoheader.away_team_abbreviation ==
|
|
993
995
|
this.gamesRecientes[this.gameInfoheader.away_team_abbreviation][indexGame]
|
|
994
996
|
.home_team_abbreviation
|
|
995
|
-
? 'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
997
|
+
? getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
996
998
|
this.gamesRecientes[this.gameInfoheader.away_team_abbreviation][indexGame].away_team +
|
|
997
|
-
'.png'
|
|
998
|
-
: 'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
999
|
+
'.png', this.provider)
|
|
1000
|
+
: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
999
1001
|
this.gamesRecientes[this.gameInfoheader.away_team_abbreviation][indexGame].home_team +
|
|
1000
|
-
'.png'
|
|
1002
|
+
'.png', this.provider)
|
|
1001
1003
|
this.cleaneDataProbablesAway()
|
|
1002
1004
|
this.getLineupDataProbablesAway(
|
|
1003
1005
|
this.gamesRecientes[this.gameInfoheader.away_team_abbreviation][indexGame].id
|
|
@@ -1022,12 +1024,12 @@ export default {
|
|
|
1022
1024
|
this.gameInfoheader.home_team_abbreviation ==
|
|
1023
1025
|
this.gamesRecientes[this.gameInfoheader.home_team_abbreviation][indexGame]
|
|
1024
1026
|
.away_team_abbreviation
|
|
1025
|
-
? 'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1027
|
+
? getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1026
1028
|
this.gamesRecientes[this.gameInfoheader.home_team_abbreviation][indexGame].home_team +
|
|
1027
|
-
'.png'
|
|
1028
|
-
: 'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1029
|
+
'.png', this.provider)
|
|
1030
|
+
: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1029
1031
|
this.gamesRecientes[this.gameInfoheader.home_team_abbreviation][indexGame].away_team +
|
|
1030
|
-
'.png'
|
|
1032
|
+
'.png', this.provider)
|
|
1031
1033
|
this.cleaneDataProbablesHome()
|
|
1032
1034
|
this.getLineupDataProbablesHome(
|
|
1033
1035
|
this.gamesRecientes[this.gameInfoheader.home_team_abbreviation][indexGame].id
|
|
@@ -1769,7 +1771,7 @@ export default {
|
|
|
1769
1771
|
})
|
|
1770
1772
|
|
|
1771
1773
|
this.awayTeamLogo =
|
|
1772
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png'
|
|
1774
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png', this.provider)
|
|
1773
1775
|
}
|
|
1774
1776
|
this.playersAway.sort((a, b) =>
|
|
1775
1777
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0
|
|
@@ -1854,7 +1856,7 @@ export default {
|
|
|
1854
1856
|
})
|
|
1855
1857
|
|
|
1856
1858
|
this.awayTeamLogo =
|
|
1857
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png'
|
|
1859
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png', this.provider)
|
|
1858
1860
|
}
|
|
1859
1861
|
}
|
|
1860
1862
|
} catch (e) {
|
|
@@ -1952,7 +1954,7 @@ export default {
|
|
|
1952
1954
|
idSubstitution: 0
|
|
1953
1955
|
})
|
|
1954
1956
|
this.homeTeamLogo =
|
|
1955
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png'
|
|
1957
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png', this.provider)
|
|
1956
1958
|
}
|
|
1957
1959
|
}
|
|
1958
1960
|
if (data.data.away_team.team_id == this.gameInfoheader.home_team) {
|
|
@@ -2035,7 +2037,7 @@ export default {
|
|
|
2035
2037
|
})
|
|
2036
2038
|
|
|
2037
2039
|
this.homeTeamLogo =
|
|
2038
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png'
|
|
2040
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png', this.provider)
|
|
2039
2041
|
}
|
|
2040
2042
|
}
|
|
2041
2043
|
} catch (e) {
|
|
@@ -2152,7 +2154,7 @@ export default {
|
|
|
2152
2154
|
substitutionOut: false,
|
|
2153
2155
|
abrevNamePlayer: abrevNamePlayerHome,
|
|
2154
2156
|
imgTeam:
|
|
2155
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png',
|
|
2157
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png', this.provider),
|
|
2156
2158
|
substitutionMin: '',
|
|
2157
2159
|
substitutionDataID: '',
|
|
2158
2160
|
shirt_number: data.data.home_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -2175,7 +2177,7 @@ export default {
|
|
|
2175
2177
|
id_team: data.data.home_team.team_id
|
|
2176
2178
|
})
|
|
2177
2179
|
this.homeTeamLogo =
|
|
2178
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png'
|
|
2180
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png', this.provider)
|
|
2179
2181
|
}
|
|
2180
2182
|
this.playersHome.sort((a, b) =>
|
|
2181
2183
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0
|
|
@@ -2249,7 +2251,7 @@ export default {
|
|
|
2249
2251
|
substitutionOut: false,
|
|
2250
2252
|
abrevNamePlayer: abrevNamePlayerHomeBench,
|
|
2251
2253
|
imgTeam:
|
|
2252
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png',
|
|
2254
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.home_team.team_id + '.png', this.provider),
|
|
2253
2255
|
substitutionMin: '',
|
|
2254
2256
|
substitutionDataID: '',
|
|
2255
2257
|
shirt_number: data.data.home_team.bench[index].jerseyNumber,
|
|
@@ -2367,7 +2369,7 @@ export default {
|
|
|
2367
2369
|
substitutionOut: false,
|
|
2368
2370
|
abrevNamePlayer: abrevNamePlayerAway,
|
|
2369
2371
|
imgTeam:
|
|
2370
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png',
|
|
2372
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png', this.provider),
|
|
2371
2373
|
substitutionMin: '',
|
|
2372
2374
|
substitutionDataID: '',
|
|
2373
2375
|
shirt_number: data.data.away_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -2390,7 +2392,7 @@ export default {
|
|
|
2390
2392
|
id_team: data.data.away_team.team_id
|
|
2391
2393
|
})
|
|
2392
2394
|
this.awayTeamLogo =
|
|
2393
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png'
|
|
2395
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png', this.provider)
|
|
2394
2396
|
}
|
|
2395
2397
|
this.playersAway.sort((a, b) =>
|
|
2396
2398
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0
|
|
@@ -2464,7 +2466,7 @@ export default {
|
|
|
2464
2466
|
substitutionOut: false,
|
|
2465
2467
|
abrevNamePlayer: abrevNamePlayerAwayBench,
|
|
2466
2468
|
imgTeam:
|
|
2467
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png',
|
|
2469
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + data.data.away_team.team_id + '.png', this.provider),
|
|
2468
2470
|
substitutionMin: '',
|
|
2469
2471
|
substitutionDataID: '',
|
|
2470
2472
|
shirt_number: data.data.away_team.bench[index].jerseyNumber,
|
|
@@ -2721,7 +2723,7 @@ export default {
|
|
|
2721
2723
|
substitutionIn: false,
|
|
2722
2724
|
substitutionOut: false,
|
|
2723
2725
|
abrevNamePlayer: abrevNamePlayerHomeBench,
|
|
2724
|
-
imgTeam: 'https://golstatsimages.blob.core.windows.net/teams-80/' + this.home_team_id + '.png',
|
|
2726
|
+
imgTeam: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + this.home_team_id + '.png', this.provider),
|
|
2725
2727
|
substitutionMin: '',
|
|
2726
2728
|
substitutionDataID: '',
|
|
2727
2729
|
shirt_number: benchEvent[this.home_team_id][index].jerseyNumber,
|
|
@@ -2817,7 +2819,7 @@ export default {
|
|
|
2817
2819
|
substitutionIn: false,
|
|
2818
2820
|
substitutionOut: false,
|
|
2819
2821
|
abrevNamePlayer: abrevNamePlayerAwayBench,
|
|
2820
|
-
imgTeam: 'https://golstatsimages.blob.core.windows.net/teams-80/' + this.away_team_id + '.png',
|
|
2822
|
+
imgTeam: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + this.away_team_id + '.png', this.provider),
|
|
2821
2823
|
substitutionMin: '',
|
|
2822
2824
|
substitutionDataID: '',
|
|
2823
2825
|
shirt_number: benchEvent[this.away_team_id][index].jerseyNumber,
|
|
@@ -2921,7 +2923,7 @@ export default {
|
|
|
2921
2923
|
substitutionIn: false,
|
|
2922
2924
|
substitutionOut: false,
|
|
2923
2925
|
abrevNamePlayer: abrevNamePlayerHome,
|
|
2924
|
-
imgTeam: 'https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png',
|
|
2926
|
+
imgTeam: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png', this.provider),
|
|
2925
2927
|
substitutionMin: '',
|
|
2926
2928
|
substitutionDataID: '',
|
|
2927
2929
|
shirt_number: gameEvent.data[index].jersey_number,
|
|
@@ -2944,7 +2946,7 @@ export default {
|
|
|
2944
2946
|
id_team: gameEvent.team_id
|
|
2945
2947
|
})
|
|
2946
2948
|
this.homeTeamLogo =
|
|
2947
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png'
|
|
2949
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png', this.provider)
|
|
2948
2950
|
}
|
|
2949
2951
|
|
|
2950
2952
|
this.playersHome.sort((a, b) =>
|
|
@@ -3028,7 +3030,7 @@ export default {
|
|
|
3028
3030
|
substitutionIn: false,
|
|
3029
3031
|
substitutionOut: false,
|
|
3030
3032
|
abrevNamePlayer: abrevNamePlayerAway,
|
|
3031
|
-
imgTeam: 'https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png',
|
|
3033
|
+
imgTeam: getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png', this.provider),
|
|
3032
3034
|
substitutionMin: '',
|
|
3033
3035
|
substitutionDataID: '',
|
|
3034
3036
|
shirt_number: gameEvent.data[index].jersey_number,
|
|
@@ -3051,7 +3053,7 @@ export default {
|
|
|
3051
3053
|
id_team: gameEvent.team_id
|
|
3052
3054
|
})
|
|
3053
3055
|
this.awayTeamLogo =
|
|
3054
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png'
|
|
3056
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png', this.provider)
|
|
3055
3057
|
}
|
|
3056
3058
|
this.playersAway.sort((a, b) =>
|
|
3057
3059
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0
|
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
import axios from 'axios'
|
|
276
276
|
import { /*connectSocket,*/ connectChannel } from '@/utils/socketConnection'
|
|
277
277
|
import { getApiUrl } from '@/utils/apiUrl'
|
|
278
|
+
import { getImageUrl } from '@/utils/imageUrl'
|
|
278
279
|
import CardPlayer from './gsc-player-card.vue'
|
|
279
280
|
import HeaderPlayerHistorico from './gsc-header-historico-lineup.vue'
|
|
280
281
|
import HeaderPlayerRecientes from './gsc-header-recientes-lineup.vue'
|
|
@@ -1166,9 +1167,9 @@ export default {
|
|
|
1166
1167
|
substitutionOut: false,
|
|
1167
1168
|
abrevNamePlayer: abrevNamePlayerHomeBench,
|
|
1168
1169
|
imgTeam:
|
|
1169
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1170
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1170
1171
|
this.home_team_id +
|
|
1171
|
-
'.png',
|
|
1172
|
+
'.png', this.provider),
|
|
1172
1173
|
substitutionMin: '',
|
|
1173
1174
|
substitutionDataID: '',
|
|
1174
1175
|
shirt_number: benchEvent[this.home_team_id][index].jerseyNumber,
|
|
@@ -1273,9 +1274,9 @@ export default {
|
|
|
1273
1274
|
substitutionOut: false,
|
|
1274
1275
|
abrevNamePlayer: abrevNamePlayerAwayBench,
|
|
1275
1276
|
imgTeam:
|
|
1276
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1277
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1277
1278
|
this.away_team_id +
|
|
1278
|
-
'.png',
|
|
1279
|
+
'.png', this.provider),
|
|
1279
1280
|
substitutionMin: '',
|
|
1280
1281
|
substitutionDataID: '',
|
|
1281
1282
|
shirt_number: benchEvent[this.away_team_id][index].jerseyNumber,
|
|
@@ -1392,9 +1393,9 @@ export default {
|
|
|
1392
1393
|
substitutionOut: false,
|
|
1393
1394
|
abrevNamePlayer: abrevNamePlayerHome,
|
|
1394
1395
|
imgTeam:
|
|
1395
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1396
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1396
1397
|
gameEvent.team_id +
|
|
1397
|
-
'.png',
|
|
1398
|
+
'.png', this.provider),
|
|
1398
1399
|
substitutionMin: '',
|
|
1399
1400
|
substitutionDataID: '',
|
|
1400
1401
|
shirt_number: gameEvent.data[index].jersey_number,
|
|
@@ -1417,7 +1418,7 @@ export default {
|
|
|
1417
1418
|
id_team: gameEvent.team_id,
|
|
1418
1419
|
})
|
|
1419
1420
|
this.homeTeamLogo =
|
|
1420
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png'
|
|
1421
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png', this.provider)
|
|
1421
1422
|
}
|
|
1422
1423
|
|
|
1423
1424
|
this.playersHome.sort((a, b) =>
|
|
@@ -1515,9 +1516,9 @@ export default {
|
|
|
1515
1516
|
substitutionOut: false,
|
|
1516
1517
|
abrevNamePlayer: abrevNamePlayerAway,
|
|
1517
1518
|
imgTeam:
|
|
1518
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1519
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
1519
1520
|
gameEvent.team_id +
|
|
1520
|
-
'.png',
|
|
1521
|
+
'.png', this.provider),
|
|
1521
1522
|
substitutionMin: '',
|
|
1522
1523
|
substitutionDataID: '',
|
|
1523
1524
|
shirt_number: gameEvent.data[index].jersey_number,
|
|
@@ -1540,7 +1541,7 @@ export default {
|
|
|
1540
1541
|
id_team: gameEvent.team_id,
|
|
1541
1542
|
})
|
|
1542
1543
|
this.awayTeamLogo =
|
|
1543
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png'
|
|
1544
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' + gameEvent.team_id + '.png', this.provider)
|
|
1544
1545
|
}
|
|
1545
1546
|
this.playersAway.sort((a, b) =>
|
|
1546
1547
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0,
|
|
@@ -2161,9 +2162,9 @@ export default {
|
|
|
2161
2162
|
substitutionOut: false,
|
|
2162
2163
|
abrevNamePlayer: abrevNamePlayerHome,
|
|
2163
2164
|
imgTeam:
|
|
2164
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2165
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2165
2166
|
data.data.home_team.team_id +
|
|
2166
|
-
'.png',
|
|
2167
|
+
'.png', this.provider),
|
|
2167
2168
|
substitutionMin: '',
|
|
2168
2169
|
substitutionDataID: '',
|
|
2169
2170
|
shirt_number: data.data.home_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -2186,9 +2187,9 @@ export default {
|
|
|
2186
2187
|
id_team: data.data.home_team.team_id,
|
|
2187
2188
|
})
|
|
2188
2189
|
this.homeTeamLogo =
|
|
2189
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2190
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2190
2191
|
data.data.home_team.team_id +
|
|
2191
|
-
'.png'
|
|
2192
|
+
'.png', this.provider)
|
|
2192
2193
|
}
|
|
2193
2194
|
this.playersHome.sort((a, b) =>
|
|
2194
2195
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0,
|
|
@@ -2270,9 +2271,9 @@ export default {
|
|
|
2270
2271
|
substitutionOut: false,
|
|
2271
2272
|
abrevNamePlayer: abrevNamePlayerHomeBench,
|
|
2272
2273
|
imgTeam:
|
|
2273
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2274
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2274
2275
|
data.data.home_team.team_id +
|
|
2275
|
-
'.png',
|
|
2276
|
+
'.png', this.provider),
|
|
2276
2277
|
substitutionMin: '',
|
|
2277
2278
|
substitutionDataID: '',
|
|
2278
2279
|
shirt_number: data.data.home_team.bench[index].jerseyNumber,
|
|
@@ -2396,9 +2397,9 @@ export default {
|
|
|
2396
2397
|
substitutionOut: false,
|
|
2397
2398
|
abrevNamePlayer: abrevNamePlayerHome,
|
|
2398
2399
|
imgTeam:
|
|
2399
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2400
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2400
2401
|
data.data.away_team.team_id +
|
|
2401
|
-
'.png',
|
|
2402
|
+
'.png', this.provider),
|
|
2402
2403
|
substitutionMin: '',
|
|
2403
2404
|
substitutionDataID: '',
|
|
2404
2405
|
shirt_number: data.data.away_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -2421,9 +2422,9 @@ export default {
|
|
|
2421
2422
|
id_team: data.data.away_team.team_id,
|
|
2422
2423
|
})
|
|
2423
2424
|
this.homeTeamLogo =
|
|
2424
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2425
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2425
2426
|
data.data.away_team.team_id +
|
|
2426
|
-
'.png'
|
|
2427
|
+
'.png', this.provider)
|
|
2427
2428
|
}
|
|
2428
2429
|
this.playersHome.sort((a, b) =>
|
|
2429
2430
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0,
|
|
@@ -2505,9 +2506,9 @@ export default {
|
|
|
2505
2506
|
substitutionOut: false,
|
|
2506
2507
|
abrevNamePlayer: abrevNamePlayerHomeBench,
|
|
2507
2508
|
imgTeam:
|
|
2508
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2509
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2509
2510
|
data.data.away_team.team_id +
|
|
2510
|
-
'.png',
|
|
2511
|
+
'.png', this.provider),
|
|
2511
2512
|
substitutionMin: '',
|
|
2512
2513
|
substitutionDataID: '',
|
|
2513
2514
|
shirt_number: data.data.away_team.bench[index].jerseyNumber,
|
|
@@ -2773,9 +2774,9 @@ export default {
|
|
|
2773
2774
|
substitutionOut: false,
|
|
2774
2775
|
abrevNamePlayer: abrevNamePlayerAway,
|
|
2775
2776
|
imgTeam:
|
|
2776
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2777
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2777
2778
|
data.data.home_team.team_id +
|
|
2778
|
-
'.png',
|
|
2779
|
+
'.png', this.provider),
|
|
2779
2780
|
substitutionMin: '',
|
|
2780
2781
|
substitutionDataID: '',
|
|
2781
2782
|
shirt_number: data.data.home_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -2798,9 +2799,9 @@ export default {
|
|
|
2798
2799
|
id_team: data.data.home_team.team_id,
|
|
2799
2800
|
})
|
|
2800
2801
|
this.awayTeamLogo =
|
|
2801
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2802
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2802
2803
|
data.data.home_team.team_id +
|
|
2803
|
-
'.png'
|
|
2804
|
+
'.png', this.provider)
|
|
2804
2805
|
}
|
|
2805
2806
|
this.playersAway.sort((a, b) =>
|
|
2806
2807
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0,
|
|
@@ -2882,9 +2883,9 @@ export default {
|
|
|
2882
2883
|
substitutionOut: false,
|
|
2883
2884
|
abrevNamePlayer: abrevNamePlayerAwayBench,
|
|
2884
2885
|
imgTeam:
|
|
2885
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2886
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
2886
2887
|
data.data.home_team.team_id +
|
|
2887
|
-
'.png',
|
|
2888
|
+
'.png', this.provider),
|
|
2888
2889
|
substitutionMin: '',
|
|
2889
2890
|
substitutionDataID: '',
|
|
2890
2891
|
shirt_number: data.data.home_team.bench[index].jerseyNumber,
|
|
@@ -3002,9 +3003,9 @@ export default {
|
|
|
3002
3003
|
substitutionOut: false,
|
|
3003
3004
|
abrevNamePlayer: abrevNamePlayerAway,
|
|
3004
3005
|
imgTeam:
|
|
3005
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3006
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3006
3007
|
data.data.away_team.team_id +
|
|
3007
|
-
'.png',
|
|
3008
|
+
'.png', this.provider),
|
|
3008
3009
|
substitutionMin: '',
|
|
3009
3010
|
substitutionDataID: '',
|
|
3010
3011
|
shirt_number: data.data.away_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -3027,9 +3028,9 @@ export default {
|
|
|
3027
3028
|
id_team: data.data.away_team.team_id,
|
|
3028
3029
|
})
|
|
3029
3030
|
this.awayTeamLogo =
|
|
3030
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3031
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3031
3032
|
data.data.away_team.team_id +
|
|
3032
|
-
'.png'
|
|
3033
|
+
'.png', this.provider)
|
|
3033
3034
|
}
|
|
3034
3035
|
this.playersAway.sort((a, b) =>
|
|
3035
3036
|
a.position_id > b.position_id ? 1 : b.position_id > a.position_id ? -1 : 0,
|
|
@@ -3111,9 +3112,9 @@ export default {
|
|
|
3111
3112
|
substitutionOut: false,
|
|
3112
3113
|
abrevNamePlayer: abrevNamePlayerAwayBench,
|
|
3113
3114
|
imgTeam:
|
|
3114
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3115
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3115
3116
|
data.data.away_team.team_id +
|
|
3116
|
-
'.png',
|
|
3117
|
+
'.png', this.provider),
|
|
3117
3118
|
substitutionMin: '',
|
|
3118
3119
|
substitutionDataID: '',
|
|
3119
3120
|
shirt_number: data.data.away_team.bench[index].jerseyNumber,
|
|
@@ -3798,9 +3799,9 @@ export default {
|
|
|
3798
3799
|
substitutionOut: false,
|
|
3799
3800
|
abrevNamePlayer: abrevNamePlayerHome,
|
|
3800
3801
|
imgTeam:
|
|
3801
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3802
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3802
3803
|
data.data.home_team.team_id +
|
|
3803
|
-
'.png',
|
|
3804
|
+
'.png', this.provider),
|
|
3804
3805
|
substitutionMin: '',
|
|
3805
3806
|
substitutionDataID: '',
|
|
3806
3807
|
shirt_number: data.data.home_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -3823,13 +3824,13 @@ export default {
|
|
|
3823
3824
|
id_team: data.data.home_team.team_id,
|
|
3824
3825
|
})
|
|
3825
3826
|
this.homeTeamLogo =
|
|
3826
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3827
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3827
3828
|
data.data.home_team.team_id +
|
|
3828
|
-
'.png'
|
|
3829
|
+
'.png', this.provider)
|
|
3829
3830
|
this.homeTeamLogo =
|
|
3830
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3831
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3831
3832
|
data.data.home_team.team_id +
|
|
3832
|
-
'.png'
|
|
3833
|
+
'.png', this.provider)
|
|
3833
3834
|
if (this.selectOptMenuheader == 'Historicos') {
|
|
3834
3835
|
if (data.data.home_team.team_id == this.homeTeam.team_id) {
|
|
3835
3836
|
this.homeTeamAbrev = this.homeTeam.acronym
|
|
@@ -3923,9 +3924,9 @@ export default {
|
|
|
3923
3924
|
substitutionOut: false,
|
|
3924
3925
|
abrevNamePlayer: abrevNamePlayerHomeBench,
|
|
3925
3926
|
imgTeam:
|
|
3926
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3927
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
3927
3928
|
data.data.home_team.team_id +
|
|
3928
|
-
'.png',
|
|
3929
|
+
'.png', this.provider),
|
|
3929
3930
|
substitutionMin: '',
|
|
3930
3931
|
substitutionDataID: '',
|
|
3931
3932
|
shirt_number: data.data.home_team.bench[index].jerseyNumber,
|
|
@@ -4030,9 +4031,9 @@ export default {
|
|
|
4030
4031
|
substitutionOut: false,
|
|
4031
4032
|
abrevNamePlayer: abrevNamePlayerAway,
|
|
4032
4033
|
imgTeam:
|
|
4033
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
4034
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
4034
4035
|
data.data.away_team.team_id +
|
|
4035
|
-
'.png',
|
|
4036
|
+
'.png', this.provider),
|
|
4036
4037
|
substitutionMin: '',
|
|
4037
4038
|
substitutionDataID: '',
|
|
4038
4039
|
shirt_number: data.data.away_team.starting_lineup[0].lineup[index].jersey_number,
|
|
@@ -4055,9 +4056,9 @@ export default {
|
|
|
4055
4056
|
id_team: data.data.away_team.team_id,
|
|
4056
4057
|
})
|
|
4057
4058
|
this.awayTeamLogo =
|
|
4058
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
4059
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
4059
4060
|
data.data.away_team.team_id +
|
|
4060
|
-
'.png'
|
|
4061
|
+
'.png', this.provider)
|
|
4061
4062
|
if (this.selectOptMenuheader == 'Historicos') {
|
|
4062
4063
|
if (data.data.away_team.team_id == this.visitingTeam.team_id) {
|
|
4063
4064
|
this.awayTeamAbrev = this.visitingTeam.acronym
|
|
@@ -4149,9 +4150,9 @@ export default {
|
|
|
4149
4150
|
substitutionOut: false,
|
|
4150
4151
|
abrevNamePlayer: abrevNamePlayerAwayBench,
|
|
4151
4152
|
imgTeam:
|
|
4152
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
4153
|
+
getImageUrl('https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
4153
4154
|
data.data.away_team.team_id +
|
|
4154
|
-
'.png',
|
|
4155
|
+
'.png', this.provider),
|
|
4155
4156
|
substitutionMin: '',
|
|
4156
4157
|
substitutionDataID: '',
|
|
4157
4158
|
shirt_number: data.data.away_team.bench[index].jerseyNumber,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inserta el proveedor activo en una URL de imágenes de GolStats
|
|
3
|
+
* (dominio `golstatsimages.blob.core.windows.net`, escudos `teams-*`, etc.).
|
|
4
|
+
*
|
|
5
|
+
* Regla A: provider es 1, 0 o null/undefined → URL sin cambios.
|
|
6
|
+
* Regla B: provider >= 2 → se inserta `/<provider>` después del contenedor.
|
|
7
|
+
*
|
|
8
|
+
* https://host/teams-80/16906.png → https://host/teams-80/2/16906.png
|
|
9
|
+
*
|
|
10
|
+
* El proveedor no puede ir justo después del host: Azure exige que el primer
|
|
11
|
+
* segmento sea un nombre de contenedor válido (mínimo 3 caracteres) y responde
|
|
12
|
+
* 400 ante `/2/teams-80/16906.png`.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} originalUrl URL original (con el id ya interpolado)
|
|
15
|
+
* @param {number|null} provider ID del proveedor
|
|
16
|
+
* @returns {string} URL final
|
|
17
|
+
*/
|
|
18
|
+
export function getImageUrl(originalUrl, provider) {
|
|
19
|
+
if (!provider || provider <= 1) {
|
|
20
|
+
return originalUrl
|
|
21
|
+
}
|
|
22
|
+
const parsed = new URL(originalUrl)
|
|
23
|
+
const segments = parsed.pathname.split('/').filter((s) => s !== '')
|
|
24
|
+
if (segments.length === 0) {
|
|
25
|
+
return originalUrl
|
|
26
|
+
}
|
|
27
|
+
const [container, ...rest] = segments
|
|
28
|
+
const path = [container, provider, ...rest].join('/')
|
|
29
|
+
return `${parsed.origin}/${path}${parsed.search}`
|
|
30
|
+
}
|