From d377134e3b7212f0fa23104bf37e5ce74c1c6948 Mon Sep 17 00:00:00 2001 From: Blossomi Shymae <87099578+BlossomiShymae@users.noreply.github.com> Date: Sat, 12 Oct 2024 19:03:16 -0500 Subject: [PATCH] Update runes page --- pages/runes/index.vue | 89 +++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/pages/runes/index.vue b/pages/runes/index.vue index 372aafd..4b67a4d 100644 --- a/pages/runes/index.vue +++ b/pages/runes/index.vue @@ -1,47 +1,62 @@ - - \ No newline at end of file + +const { isNumeric } = useIsNumeric(); +const filteredRunes = computed(() => { + let filtered = []; + if (isNumeric(query.value)) + filtered = runes.value.filter((x) => x.id == parseInt(query.value, 10)); + else + filtered = runes.value.filter((x) => x.name.toLocaleLowerCase().includes(query.value.toLocaleLowerCase())); + return filtered; +}) + + + \ No newline at end of file