Added tierlistList on tier list x(
All checks were successful
pipeline / build-and-push-images (push) Successful in 33s
pipeline / deploy (push) Successful in 8s

This commit is contained in:
2024-12-05 14:34:25 +01:00
parent 87f703666e
commit 4776cda80d
4 changed files with 29 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
defineProps<{ defineProps<{
championName?: string championName?: string
championLanes?: Array<LaneData> championLanes?: Array<LaneData>
tierlistList?: boolean
}>() }>()
const emit = defineEmits<{ const emit = defineEmits<{
stateChange: [state: string, lane: number] stateChange: [state: string, lane: number]
@@ -12,6 +13,7 @@ const emit = defineEmits<{
<template> <template>
<NavSideBar :champion-name="championName" <NavSideBar :champion-name="championName"
:champion-lanes="championLanes" :champion-lanes="championLanes"
:tierlist-list="tierlistList"
@state-change="(s, l) => emit('stateChange', s, l)"/> @state-change="(s, l) => emit('stateChange', s, l)"/>
<NavBottomBar :champion-name="championName" <NavBottomBar :champion-name="championName"
:champion-lanes="championLanes" :champion-lanes="championLanes"

View File

@@ -4,6 +4,7 @@ import { LANE_IMAGES, lanePositionToIndex, POSITIONS_STR } from '~/utils/cdragon
defineProps<{ defineProps<{
championName?: string championName?: string
championLanes?: Array<LaneData> championLanes?: Array<LaneData>
tierlistList?: boolean
}>() }>()
const emit = defineEmits<{ const emit = defineEmits<{
stateChange: [state: string, lane: number] stateChange: [state: string, lane: number]
@@ -45,6 +46,8 @@ function handleStateChange(newState : string, newLane: number) {
style="margin-top: 10px; font-size: 1.9rem; padding-left: 35px;">Items</h2> style="margin-top: 10px; font-size: 1.9rem; padding-left: 35px;">Items</h2>
</div> </div>
<NavTierlistList v-if="tierlistList == true" style="margin-top: 30px;" />
</div> </div>
</template> </template>

View File

@@ -0,0 +1,22 @@
<script lang="ts" setup>
const route = useRoute()
const selected = ref("");
if(route.path.startsWith("/tierlist/")) {
const lane = route.params.lane as string
selected.value = lane
}
</script>
<template>
<div>
<h2 style="padding-left: 20px; font-size: 2.4rem; margin-bottom: 10px;">Tierlist</h2>
<NuxtLink style="margin-top: 5px; margin-bottom: 5px;" v-for="(pos, i) in POSITIONS" :to="'/tierlist/' + pos">
<div :class="selected == pos ? 'sidebar-link-selected' : ''"
class="sidebar-link" style="padding-left: 35px; display: flex; align-items: center;">
<img width="40" height="40" :src="LANE_IMAGES[i]" :alt="POSITIONS_STR[i]" />
<h3 style="font-size: 2.1rem; font-weight: 200; margin-left: 10px;">{{ POSITIONS_STR[i] }}</h3>
</div>
</NuxtLink>
</div>
</template>

View File

@@ -51,7 +51,7 @@ const d_tier = tierFromPickrate(0, 0.05)
</Head> </Head>
<div style="display: flex; min-height: 100vh; align-items: stretch; width: 100%;"> <div style="display: flex; min-height: 100vh; align-items: stretch; width: 100%;">
<NavSideBar/> <NavSideBar :tierlist-list="true" />
<div style="margin-left: 10px; width: 100%; overflow-y: scroll;"> <div style="margin-left: 10px; width: 100%; overflow-y: scroll;">