@everymatrix/casino-games-category-section 0.0.272 → 0.0.275
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-games-category-section",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.275",
|
|
4
4
|
"main": "dist/casino-games-category-section.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": "6b4c5e75ec17a99271b51d6cd70f107340dd5dab"
|
|
40
40
|
}
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
|
|
387
|
+
|
|
388
388
|
// @TODO categoryId type fix
|
|
389
389
|
const loadMoreGames = (categoryId:any) => {
|
|
390
390
|
limit += 1;
|
|
@@ -393,10 +393,17 @@
|
|
|
393
393
|
getData(categoryId, offset, limit).then((res:any) => {
|
|
394
394
|
categoryData = res;
|
|
395
395
|
// @TODO categoryData type fix
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
/**
|
|
397
|
+
* This check is needed to prevent requests with less items
|
|
398
|
+
* that started before but ended after the last request to add items to list
|
|
399
|
+
* This could also use abort controller instead but refactoring is needed
|
|
400
|
+
*/
|
|
401
|
+
if(categoryData.games.items.length > shownCategoryData.length){
|
|
402
|
+
shownCategoryData = categoryData.games.items;
|
|
403
|
+
shownCategoryData.forEach((item:any) => {
|
|
404
|
+
item.isFavorite = checkFavorite(item.id);
|
|
405
|
+
});
|
|
406
|
+
}
|
|
400
407
|
});
|
|
401
408
|
}
|
|
402
409
|
}
|
|
@@ -603,7 +610,7 @@
|
|
|
603
610
|
<div class="CasinoGamesContainer" part="CasinoGamesContainer">
|
|
604
611
|
<div class="CasinoGamesHeader" part="CasinoGamesHeader">
|
|
605
612
|
<h3 class="CategoryName" part="CategoryName" bind:this={categoryName}>
|
|
606
|
-
|
|
613
|
+
{$_('gamesCategorySection.favorites')}
|
|
607
614
|
</h3>
|
|
608
615
|
</div>
|
|
609
616
|
<ul class="{(favoriteGamesData.items.length != 0) ? 'CasinoGamesGrid' : ''} 'GamesListIncreasedGap'}" part="{(favoriteGamesData.items.length != 0) ? 'CasinoGamesGrid' : ''} 'GamesListIncreasedGap'}" bind:this={container}>
|
|
@@ -684,16 +691,16 @@
|
|
|
684
691
|
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
|
|
685
692
|
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
|
|
686
693
|
l61.023,123.645c2.186,4.427,6.408,7.496,11.294,8.206l136.447,19.828L366.023,308.608z"/></svg>
|
|
687
|
-
<span class="NoFavoriteText NoFavoriteTextHighlight" part="NoFavoriteText NoFavoriteTextHighlight">
|
|
694
|
+
<span class="NoFavoriteText NoFavoriteTextHighlight" part="NoFavoriteText NoFavoriteTextHighlight">{$_('gamesCategorySection.noFavoritesTitle')}</span>
|
|
688
695
|
{#if isMobile(userAgent)}
|
|
689
|
-
<span class="NoFavoriteText" part="NoFavoriteText">
|
|
696
|
+
<span class="NoFavoriteText" part="NoFavoriteText">{$_('gamesCategorySection.noFavoritesMobile')}</span>
|
|
690
697
|
{:else}
|
|
691
|
-
<span class="NoFavoriteText" part="NoFavoriteText">
|
|
698
|
+
<span class="NoFavoriteText" part="NoFavoriteText">{$_('gamesCategorySection.noFavorites')}</span>
|
|
692
699
|
{/if}
|
|
693
700
|
</p>
|
|
694
701
|
{/each}
|
|
695
702
|
{:else}
|
|
696
|
-
<p>
|
|
703
|
+
<p>{$_('gamesCategorySection.waiting')}</p>
|
|
697
704
|
{/if}
|
|
698
705
|
</ul>
|
|
699
706
|
</div>
|
package/src/translations.js
CHANGED
|
@@ -5,8 +5,13 @@ export const GamesCategorySectionTranslations = {
|
|
|
5
5
|
viewAll: 'Show all',
|
|
6
6
|
searchedItems: 'Search result',
|
|
7
7
|
recentSearchedItems: 'Recently searched',
|
|
8
|
+
favorites: 'Favorites',
|
|
8
9
|
noRecentSearch: 'No search started yet. Simply search for a game.',
|
|
9
|
-
noResults: 'Sorry, no results found. Please try again.'
|
|
10
|
+
noResults: 'Sorry, no results found. Please try again.',
|
|
11
|
+
noFavoritesMobile: 'You can now add games to favorites by tapping on the star icon located on the game page.',
|
|
12
|
+
noFavorites: 'You can now add games to favorites by clicking on the star icon located on the game thumbnail.',
|
|
13
|
+
noFavoritesTitle: 'You do not have any favored games yet.',
|
|
14
|
+
waiting: 'Waiting',
|
|
10
15
|
}
|
|
11
16
|
},
|
|
12
17
|
de: {
|
|
@@ -75,8 +80,13 @@ export const GamesCategorySectionTranslations = {
|
|
|
75
80
|
viewAll: 'Vezi toate',
|
|
76
81
|
searchedItems: 'Rezultatele cautarii',
|
|
77
82
|
recentSearchedItems: 'Cautari recente',
|
|
83
|
+
favorites: 'Favorite',
|
|
78
84
|
noRecentSearch: 'Nici o căutare nu a început încă. Pur și simplu căutați un joc.',
|
|
79
|
-
noResults: 'Ne pare rau, nu s-au gasit rezultate. Va rugam sa incercati din nou'
|
|
85
|
+
noResults: 'Ne pare rau, nu s-au gasit rezultate. Va rugam sa incercati din nou',
|
|
86
|
+
noFavoritesMobile: 'Acum puteți adăuga jocuri la favorite atingând pictograma stea situată pe pagina jocului.',
|
|
87
|
+
noFavorites: 'Acum puteți adăuga jocuri la favorite făcând clic pe pictograma stea situată pe miniatura jocului.',
|
|
88
|
+
noFavoritesTitle: 'Nu aveți încă niciun joc preferat.',
|
|
89
|
+
waiting: 'Aşteptare',
|
|
80
90
|
}
|
|
81
91
|
},
|
|
82
92
|
hr: {
|