@everymatrix/casino-game-thumbnail 0.0.93 → 0.0.97
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-game-thumbnail",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.97",
|
|
4
4
|
"main": "dist/casino-game-thumbnail.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "e7af402eef393716b94058dc74dda99a39b649f1"
|
|
40
40
|
}
|
|
@@ -112,16 +112,6 @@
|
|
|
112
112
|
isLoggedIn = true;
|
|
113
113
|
sessionID = session;
|
|
114
114
|
playerID = userid;
|
|
115
|
-
if(endpoint) {
|
|
116
|
-
checkSession(endpoint, session).then((res:any) => {
|
|
117
|
-
sessionID = res.data.Guid;
|
|
118
|
-
playerID = res.data.UserID;
|
|
119
|
-
isLoggedIn = true;
|
|
120
|
-
}, (err:any) => {
|
|
121
|
-
isLoggedIn = false;
|
|
122
|
-
console.error('err on session', err);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
115
|
}
|
|
126
116
|
|
|
127
117
|
const setOnLoad = () => {
|
|
@@ -148,19 +138,14 @@
|
|
|
148
138
|
|
|
149
139
|
const setClientStylingURL = () => {
|
|
150
140
|
let cssFile = document.createElement('style');
|
|
151
|
-
cssFile.innerHTML = `@import ${clientstylingurl}`;
|
|
152
141
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
.
|
|
157
|
-
cssFile.innerHTML = data
|
|
142
|
+
fetch(new URL(clientstylingurl))
|
|
143
|
+
.then((res:any) => res.text())
|
|
144
|
+
.then((data:any) => {
|
|
145
|
+
cssFile.innerHTML = data
|
|
158
146
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
147
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile); });
|
|
148
|
+
});
|
|
164
149
|
}
|
|
165
150
|
|
|
166
151
|
onMount(() => {
|
|
@@ -179,58 +164,60 @@
|
|
|
179
164
|
$: clientstylingurl && setClientStylingURL();
|
|
180
165
|
</script>
|
|
181
166
|
|
|
182
|
-
<div
|
|
183
|
-
<
|
|
184
|
-
|
|
185
|
-
<div class="
|
|
186
|
-
{
|
|
187
|
-
{#if
|
|
188
|
-
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
167
|
+
<div bind:this={customStylingContainer}>
|
|
168
|
+
<div class="GameContainer" on:mouseenter={gameHover} on:mouseleave={gameBlur} on:touchstart={gameTouch} on:touchleave={gameTouchLeave}>
|
|
169
|
+
<img src={gamethumbnail} class="GameBg {hover ? 'GameContainerHovered' : ''} {loaded ? 'Loaded' : ''}" alt="game thumbnail" bind:this={image} loading="lazy" />
|
|
170
|
+
<div class="GameInfoWrapper" on:mouseenter={() => enter()} on:mouseleave={() => leave()}>
|
|
171
|
+
<div class="GameInfo {hover ? 'GameHovered' : ''}">
|
|
172
|
+
{#if fav}
|
|
173
|
+
{#if !isMobile(userAgent) && !gamefavorite && isLoggedIn}
|
|
174
|
+
<div class="FavIconContainer" on:click="{() => toggleFavoriteGame(gameid)}">
|
|
175
|
+
<svg version="1.1" class="UnfavoredIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="20px" y="20px"
|
|
176
|
+
viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512.001 512.001;" xml:space="preserve"><path style="fill: white" d="M511.266,197.256c-1.764-5.431-6.458-9.388-12.108-10.209l-158.722-23.065L269.452,20.155
|
|
177
|
+
c-2.527-5.12-7.741-8.361-13.451-8.361c-5.709,0-10.924,3.242-13.451,8.361l-70.988,143.828L12.843,187.047
|
|
178
|
+
c-5.65,0.821-10.344,4.779-12.108,10.209c-1.765,5.43-0.293,11.391,3.795,15.376l114.848,111.955L92.27,482.67
|
|
179
|
+
c-0.965,5.627,1.349,11.315,5.968,14.67c4.618,3.355,10.74,3.798,15.797,1.142L256,423.846l141.961,74.637
|
|
180
|
+
c2.195,1.154,4.591,1.723,6.979,1.723c3.11,0,6.206-0.966,8.818-2.865c4.619-3.356,6.933-9.043,5.968-14.671L392.61,324.587
|
|
181
|
+
l114.86-111.954C511.559,208.647,513.031,202.686,511.266,197.256z M366.023,308.608c-3.536,3.446-5.15,8.412-4.314,13.278
|
|
182
|
+
l23.311,135.898l-122.038-64.162c-4.37-2.297-9.591-2.297-13.961,0l-122.045,64.163l23.304-135.9
|
|
183
|
+
c0.834-4.866-0.779-9.83-4.313-13.276l-98.731-96.244l136.445-19.829c4.886-0.71,9.108-3.778,11.294-8.205L256,60.685
|
|
184
|
+
l61.023,123.645c2.186,4.427,6.408,7.496,11.294,8.206l136.447,19.828L366.023,308.608z"/></svg>
|
|
185
|
+
</div>
|
|
186
|
+
{/if}
|
|
200
187
|
{/if}
|
|
188
|
+
<p class="GameInfoName" title="{gamename}">{gamename}</p>
|
|
189
|
+
<button class="GameInfoBtn" on:click="{() => toggleGameFrame(gameid)}">{$_('gameThumbnail.playNow')}</button>
|
|
190
|
+
</div>
|
|
191
|
+
<span class="GameInfoVendor">
|
|
192
|
+
{ gamevendor ? gamevendor : '-'}
|
|
193
|
+
</span>
|
|
194
|
+
</div>
|
|
195
|
+
{#if !isMobile(userAgent) && gamefavorite && isLoggedIn && favorites}
|
|
196
|
+
<div class="FavIconContainer" on:click="{() => toggleFavoriteGame(gameid)}">
|
|
197
|
+
<svg version="1.1" class="FavoredIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.481 19.481" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 19.481 19.481">
|
|
198
|
+
<path style="fill: white" d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
|
|
199
|
+
</svg>
|
|
200
|
+
</div>
|
|
201
|
+
{:else if isMobile(userAgent) && gamefavorite && isLoggedIn && favorites}
|
|
202
|
+
<div class="FavIconContainer">
|
|
203
|
+
<svg version="1.1" class="FavoredIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.481 19.481" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 19.481 19.481">
|
|
204
|
+
<path style="fill: white" d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
|
|
205
|
+
</svg>
|
|
206
|
+
</div>
|
|
207
|
+
{/if}
|
|
208
|
+
<div class="GameExtraInfo">
|
|
209
|
+
{#if gameisnew}
|
|
210
|
+
<span class="GameExtraInfoLabel NewGameTag">{$_('gameThumbnail.new')}</span>
|
|
211
|
+
{/if}
|
|
212
|
+
{#if (parseInt(gamepopularity) > 0)}
|
|
213
|
+
<span class="GameExtraInfoLabel PopularGameTag">{$_('gameThumbnail.hot')}</span>
|
|
201
214
|
{/if}
|
|
202
|
-
<p class="GameInfoName" title="{gamename}">{gamename}</p>
|
|
203
|
-
<button class="GameInfoBtn" on:click="{() => toggleGameFrame(gameid)}">{$_('gameThumbnail.playNow')}</button>
|
|
204
215
|
</div>
|
|
205
|
-
<span class="GameInfoVendor">
|
|
206
|
-
{ gamevendor ? gamevendor : '-'}
|
|
207
|
-
</span>
|
|
208
216
|
</div>
|
|
209
|
-
{#if
|
|
210
|
-
<
|
|
211
|
-
<svg version="1.1" class="FavoredIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.481 19.481" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 19.481 19.481">
|
|
212
|
-
<path style="fill: white" d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
|
|
213
|
-
</svg>
|
|
214
|
-
</div>
|
|
215
|
-
{:else if isMobile(userAgent) && gamefavorite && isLoggedIn && favorites}
|
|
216
|
-
<div class="FavIconContainer">
|
|
217
|
-
<svg version="1.1" class="FavoredIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.481 19.481" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 19.481 19.481">
|
|
218
|
-
<path style="fill: white" d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
|
|
219
|
-
</svg>
|
|
220
|
-
</div>
|
|
217
|
+
{#if showgamename}
|
|
218
|
+
<p class="GameNameBelow" title="{gamename}">{gamename}</p>
|
|
221
219
|
{/if}
|
|
222
|
-
<div class="GameExtraInfo">
|
|
223
|
-
{#if gameisnew}
|
|
224
|
-
<span class="GameExtraInfoLabel NewGameTag">{$_('gameThumbnail.new')}</span>
|
|
225
|
-
{/if}
|
|
226
|
-
{#if (parseInt(gamepopularity) > 0)}
|
|
227
|
-
<span class="GameExtraInfoLabel PopularGameTag">{$_('gameThumbnail.hot')}</span>
|
|
228
|
-
{/if}
|
|
229
|
-
</div>
|
|
230
220
|
</div>
|
|
231
|
-
{#if showgamename}
|
|
232
|
-
<p class="GameNameBelow" title="{gamename}">{gamename}</p>
|
|
233
|
-
{/if}
|
|
234
221
|
|
|
235
222
|
|
|
236
223
|
<style lang="scss">
|
package/src/translations.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export const GameThumbnailTranslations = {
|
|
2
2
|
en: {
|
|
3
3
|
gameThumbnail: {
|
|
4
|
-
playNow: '
|
|
4
|
+
playNow: 'Start now!',
|
|
5
5
|
new: 'NEW',
|
|
6
|
-
hot: '
|
|
6
|
+
hot: 'Hot'
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
9
|
de: {
|
|
10
10
|
gameThumbnail: {
|
|
11
|
-
playNow: 'Jetzt
|
|
11
|
+
playNow: 'Jetzt starten!',
|
|
12
12
|
new: 'NEU',
|
|
13
|
-
hot: '
|
|
13
|
+
hot: 'Hot'
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
it: {
|
|
17
17
|
gameThumbnail: {
|
|
18
|
-
playNow: '
|
|
19
|
-
new: '
|
|
20
|
-
hot: '
|
|
18
|
+
playNow: 'Inizia ora!',
|
|
19
|
+
new: 'NOVITÀ',
|
|
20
|
+
hot: 'HOT'
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
fr: {
|
|
@@ -54,5 +54,47 @@ export const GameThumbnailTranslations = {
|
|
|
54
54
|
new: 'NOU',
|
|
55
55
|
hot: 'POPULAR'
|
|
56
56
|
}
|
|
57
|
+
},
|
|
58
|
+
hr: {
|
|
59
|
+
gameThumbnail: {
|
|
60
|
+
playNow: 'Započnite sada!',
|
|
61
|
+
new: 'NOVO',
|
|
62
|
+
hot: 'Vruće'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
hu: {
|
|
66
|
+
gameThumbnail: {
|
|
67
|
+
playNow: 'Játsszon most!',
|
|
68
|
+
new: 'ÚJ',
|
|
69
|
+
hot: 'Hot'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
pl: {
|
|
73
|
+
gameThumbnail: {
|
|
74
|
+
playNow: 'Rozpocznij teraz!',
|
|
75
|
+
new: 'NOWOŚĆ',
|
|
76
|
+
hot: 'Hot'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
pt: {
|
|
80
|
+
gameThumbnail: {
|
|
81
|
+
playNow: 'Comece agora!',
|
|
82
|
+
new: 'NOVO',
|
|
83
|
+
hot: 'Hot'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
sl: {
|
|
87
|
+
gameThumbnail: {
|
|
88
|
+
playNow: 'Začnite zdaj!',
|
|
89
|
+
new: 'NOVO',
|
|
90
|
+
hot: 'Vroče'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
sr: {
|
|
94
|
+
gameThumbnail: {
|
|
95
|
+
playNow: 'Započnite sada!',
|
|
96
|
+
new: 'NOVO',
|
|
97
|
+
hot: 'Vruće'
|
|
98
|
+
}
|
|
57
99
|
}
|
|
58
100
|
};
|