Changed position names in sidebar
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { LANE_IMAGES, lanePositionToIndex } from '~/utils/cdragon';
|
||||
import { LANE_IMAGES, lanePositionToIndex, POSITIONS_STR } from '~/utils/cdragon';
|
||||
|
||||
defineProps<{
|
||||
championName: String
|
||||
@@ -28,7 +28,7 @@ function handleStateChange(newState : string, newLane: number) {
|
||||
<div style="display: flex; align-items: center; margin-top: 30px;">
|
||||
<h1 style="font-size: 2.4rem; padding-left: 20px;">{{ championName }}</h1>
|
||||
<img style="margin-left: 10px;" width="40" height="40" :src="LANE_IMAGES[lanePositionToIndex(lane.data)]" />
|
||||
<h2 style="margin-left: 5px; font-size: 1.8rem; font-weight: 200;">{{ lane.data.toLowerCase() }}</h2>
|
||||
<h2 style="margin-left: 5px; font-size: 1.8rem; font-weight: 200;">{{ POSITIONS_STR[lanePositionToIndex(lane.data.toLowerCase())] }}</h2>
|
||||
</div>
|
||||
|
||||
<h2 :class="'sidebar-link ' + (state == 'runes' && laneState == i ? 'sidebar-link-selected' : '')"
|
||||
|
||||
@@ -2,6 +2,7 @@ const CDRAGON_BASE = "https://raw.communitydragon.org/latest/"
|
||||
|
||||
/* Lanes */
|
||||
const POSITIONS = ["top", "jungle", "middle", "bottom", "utility"]
|
||||
const POSITIONS_STR = ["top", "jungle", "mid", "bot", "support"]
|
||||
const LANE_IMAGES = Array(5).fill("").map((_, index) => "/img/lanes/icon-position-" + POSITIONS[index] + ".png")
|
||||
const LANE_IMAGES_HOVER = Array(5).fill("").map((_, index) => "/img/lanes/icon-position-" + POSITIONS[index] + "-hover.png")
|
||||
const LANE_IMAGES_SELECTED = Array(5).fill("").map((_, index) => "/img/lanes/icon-position-" + POSITIONS[index] + "-blue.png")
|
||||
@@ -28,4 +29,7 @@ function mapPath(assetPath : string) {
|
||||
return assetPath.toLowerCase().replace("/lol-game-data/assets/", "plugins/rcp-be-lol-game-data/global/default/")
|
||||
}
|
||||
|
||||
export { mapPath, CDRAGON_BASE, laneIndexToPosition, lanePositionToIndex, POSITIONS, LANE_IMAGES, LANE_IMAGES_HOVER, LANE_IMAGES_SELECTED}
|
||||
export {
|
||||
mapPath, CDRAGON_BASE, laneIndexToPosition, lanePositionToIndex,
|
||||
POSITIONS, LANE_IMAGES, LANE_IMAGES_HOVER, LANE_IMAGES_SELECTED, POSITIONS_STR
|
||||
}
|
||||
Reference in New Issue
Block a user