Skip to content

Commit c1ff8bf

Browse files
committed
Enhance SocialLinks component by adding new social links for Instagram and Google Docs; implement language-specific filtering for links based on current locale. Update localization files to include new entries for matchups and progress documents in English, French, and 'laranguiva' for improved user experience.
1 parent 5cfec9c commit c1ff8bf

4 files changed

Lines changed: 84 additions & 20 deletions

File tree

frontend/src/i18n/locales/en.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,19 @@
207207
"pickrate": "PICKRATE",
208208
"matchups": "Easy and Common",
209209
"matchups-hard": "Hardest and Common",
210-
"otp": "OTP"
210+
"otp": "OTP",
211+
"search": "Search...",
212+
"search-name": "Name",
213+
"search-easy": "Easy Matchup",
214+
"search-hard": "Hard Matchup",
215+
"all-tiers": "All tiers",
216+
"tier-list": "TIER-LIST",
217+
"bronze-list": "BRONZE-LIST",
218+
"pro-list": "PRO-LIST",
219+
"graph": "GRAPH",
220+
"list": "LIST",
221+
"all": "All",
222+
"no-otp": "No OTP"
211223
},
212224
"legal": {
213225
"title": "Legal Notice and Privacy Policy",

frontend/src/i18n/locales/fr.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,19 @@
207207
"pickrate": "PICKRATE",
208208
"matchups": "Facile et Commun",
209209
"matchups-hard": "Le plus dur et Commun",
210-
"otp": "OTP"
210+
"otp": "OTP",
211+
"search": "Rechercher...",
212+
"search-name": "Nom",
213+
"search-easy": "Matchup Facile",
214+
"search-hard": "Matchup Difficile",
215+
"all-tiers": "Tous les tiers",
216+
"tier-list": "TIER-LISTE",
217+
"bronze-list": "BRONZE-LISTE",
218+
"pro-list": "PRO-LISTE",
219+
"graph": "GRAPHIQUE",
220+
"list": "LISTE",
221+
"all": "Tous",
222+
"no-otp": "Sans OTP"
211223
},
212224
"legal": {
213225
"title": "Mentions légales et Politique de confidentialité",

frontend/src/i18n/locales/laranguiva.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,19 @@
206206
"pickrate": "PICKRATE",
207207
"matchups": "Facile et Commun",
208208
"matchups-hard": "Le plus dur et Commun",
209-
"otp": "OTP"
209+
"otp": "OTP",
210+
"search": "Rechercheriva...",
211+
"search-name": "Nomriva",
212+
"search-easy": "Matchupriva Facile",
213+
"search-hard": "Matchupriva Difficile",
214+
"all-tiers": "Tous les tieRiva",
215+
"tier-list": "TIER-LISTERIVA",
216+
"bronze-list": "BRONZE-LISTERIVA",
217+
"pro-list": "PRO-LISTERIVA",
218+
"graph": "GRAPHIQUERIVA",
219+
"list": "LISTERIVA",
220+
"all": "Tousriva",
221+
"no-otp": "Sans OTPriva"
210222
},
211223
"footer": {
212224
"legal": "Lelalegal",

frontend/src/views/StatistiqueView.vue

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ const sortBy = ref<'score' | 'pickrate' | 'tier'>('score')
301301
const sortOrder = ref<'asc' | 'desc'>('desc')
302302
const searchType = ref<'name' | 'easy' | 'hard'>('name')
303303
const searchQuery = ref('')
304+
const selectedTierFilter = ref<string | 'all'>('all')
304305
305306
const sortedAndFilteredChampions = computed(() => {
306307
const roleData = tierData.value[selectedRole.value] as ChampionData[]
@@ -340,6 +341,12 @@ const sortedAndFilteredChampions = computed(() => {
340341
filtered = filtered.filter(champion => !champion?.otp)
341342
}
342343
344+
if (selectedTierFilter.value !== 'all') {
345+
filtered = filtered.filter(
346+
champion => champion?.tier === selectedTierFilter.value,
347+
)
348+
}
349+
343350
if (searchQuery.value) {
344351
const query = searchQuery.value.toLowerCase()
345352
filtered = filtered.filter(champion => {
@@ -391,10 +398,10 @@ const sortedAndFilteredChampions = computed(() => {
391398
>
392399
{{
393400
type === 'normal'
394-
? 'TIER-LISTE'
401+
? $t('statistique.tier-list')
395402
: type === 'bronze'
396-
? 'BRONZE-LISTE'
397-
: 'PRO-LISTE'
403+
? $t('statistique.bronze-list')
404+
: $t('statistique.pro-list')
398405
}}
399406
</button>
400407
</div>
@@ -406,7 +413,9 @@ const sortedAndFilteredChampions = computed(() => {
406413
:class="{ active: displayMode === mode }"
407414
@click="displayMode = mode as 'graph' | 'list'"
408415
>
409-
{{ mode === 'graph' ? 'GRAPHIQUE' : 'LISTE' }}
416+
{{
417+
mode === 'graph' ? $t('statistique.graph') : $t('statistique.list')
418+
}}
410419
</button>
411420
</div>
412421

@@ -427,9 +436,9 @@ const sortedAndFilteredChampions = computed(() => {
427436
{{ role.replace('LANE', '').replace('-BOT', '') }}
428437
</button>
429438
<select v-model="filterType" class="filter-select">
430-
<option value="all">Tous</option>
431-
<option value="otp">OTP</option>
432-
<option value="no-otp">Sans OTP</option>
439+
<option value="all">{{ $t('statistique.all') }}</option>
440+
<option value="otp">{{ $t('statistique.otp') }}</option>
441+
<option value="no-otp">{{ $t('statistique.no-otp') }}</option>
433442
</select>
434443
</div>
435444

@@ -475,20 +484,31 @@ const sortedAndFilteredChampions = computed(() => {
475484
<input
476485
v-model="searchQuery"
477486
type="text"
478-
placeholder="Rechercher..."
487+
:placeholder="$t('statistique.search')"
479488
class="search-input"
480489
/>
481490
<select v-model="searchType" class="search-type">
482-
<option value="name">Nom</option>
483-
<option value="easy">Matchup Facile</option>
484-
<option value="hard">Matchup Difficile</option>
491+
<option value="name">{{ $t('statistique.search-name') }}</option>
492+
<option value="easy">{{ $t('statistique.search-easy') }}</option>
493+
<option value="hard">{{ $t('statistique.search-hard') }}</option>
494+
</select>
495+
</div>
496+
<div class="filter-controls">
497+
<select v-model="selectedTierFilter" class="tier-filter">
498+
<option value="all">{{ $t('statistique.all-tiers') }}</option>
499+
<option value="S+">S+</option>
500+
<option value="S">S</option>
501+
<option value="A">A</option>
502+
<option value="B">B</option>
503+
<option value="C">C</option>
504+
<option value="F">F</option>
485505
</select>
486506
</div>
487507
<div class="sort-controls">
488508
<select v-model="sortBy" class="sort-select">
489-
<option value="tier">Tier</option>
490-
<option value="score">Score CP</option>
491-
<option value="pickrate">Pickrate</option>
509+
<option value="tier">{{ $t('statistique.tier') }}</option>
510+
<option value="score">{{ $t('statistique.score') }}</option>
511+
<option value="pickrate">{{ $t('statistique.pickrate') }}</option>
492512
</select>
493513
<button
494514
class="sort-order"
@@ -583,15 +603,15 @@ const sortedAndFilteredChampions = computed(() => {
583603
color: TIER_COLORS[selectedTier as keyof typeof TIER_COLORS],
584604
}"
585605
>
586-
Score : {{ champion.score }}
606+
{{ $t('statistique.score') }} : {{ champion.score }}
587607
</span>
588608
<span
589609
class="champion-score"
590610
:style="{
591611
color: TIER_COLORS[selectedTier as keyof typeof TIER_COLORS],
592612
}"
593613
>
594-
Pickrate : {{ champion.pickrate }}%
614+
{{ $t('statistique.pickrate') }} : {{ champion.pickrate }}%
595615
</span>
596616
</div>
597617
</div>
@@ -781,7 +801,8 @@ const sortedAndFilteredChampions = computed(() => {
781801
}
782802
783803
.search-type,
784-
.sort-select {
804+
.sort-select,
805+
.tier-filter {
785806
background: transparent;
786807
border: var(--border-size) solid var(--color-gold-300);
787808
color: var(--color-gold-300);
@@ -791,6 +812,12 @@ const sortedAndFilteredChampions = computed(() => {
791812
font-family: var(--font-beaufort);
792813
}
793814
815+
.filter-controls {
816+
display: flex;
817+
gap: 0.5rem;
818+
align-items: center;
819+
}
820+
794821
.sort-controls {
795822
display: flex;
796823
gap: 0.5rem;
@@ -817,6 +844,7 @@ const sortedAndFilteredChampions = computed(() => {
817844
}
818845
819846
.search-controls,
847+
.filter-controls,
820848
.sort-controls {
821849
width: 100%;
822850
}

0 commit comments

Comments
 (0)