From dc09d10f07050a4e36d4d9412d7113cca8d6191a Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Wed, 25 Feb 2026 14:59:42 +0100 Subject: [PATCH] Frontend updates and changes - Remove items/runes separate pages, put everything into a "build" page. - Show summoner spells. - Add a build variant selector, that for now only selects runes --- frontend/components/build/Viewer.vue | 698 ++++++++++++++++++++++++++ frontend/components/item/Tree.vue | 78 ++- frontend/components/nav/BottomBar.vue | 14 +- frontend/components/nav/SideBar.vue | 17 +- frontend/eslint.config.mjs | 5 +- frontend/pages/champion/[alias].vue | 16 +- frontend/types/cdragon.ts | 7 + 7 files changed, 782 insertions(+), 53 deletions(-) create mode 100644 frontend/components/build/Viewer.vue diff --git a/frontend/components/build/Viewer.vue b/frontend/components/build/Viewer.vue new file mode 100644 index 0000000..e39a5a8 --- /dev/null +++ b/frontend/components/build/Viewer.vue @@ -0,0 +1,698 @@ + + + + + diff --git a/frontend/components/item/Tree.vue b/frontend/components/item/Tree.vue index e312a8e..973f40a 100644 --- a/frontend/components/item/Tree.vue +++ b/frontend/components/item/Tree.vue @@ -71,7 +71,6 @@ onUnmounted(() => { }) function drawArrow(start: Element, end: Element) { - // console.log("drawArrow(", start, ", ", end, ")") if (start == null || end == null) return const arrow = new svgdomarrowsLinePath({ @@ -89,10 +88,14 @@ function drawArrow(start: Element, end: Element) { left: 0 } }, - style: 'stroke:var(--color-on-surface);stroke-width:3;fill:transparent;', + style: 'stroke:var(--color-on-surface);stroke-width:2;fill:transparent;', appendTo: document.body }) arrows.push(arrow) + // Redraw immediately after creation to ensure correct position + requestAnimationFrame(() => { + arrow.redraw() + }) } function refreshArrows() { @@ -123,30 +126,19 @@ function handleRefresh() { + + diff --git a/frontend/components/nav/BottomBar.vue b/frontend/components/nav/BottomBar.vue index 7295c83..6cd1232 100644 --- a/frontend/components/nav/BottomBar.vue +++ b/frontend/components/nav/BottomBar.vue @@ -10,7 +10,7 @@ const emit = defineEmits<{ stateChange: [state: string, lane: number] }>() -const state = ref('runes') +const state = ref('build') const laneState = ref(0) function handleStateChange(newState: string, newLane: number) { @@ -49,16 +49,10 @@ if (route.path.startsWith('/tierlist/')) { />