diff --git a/src/pages/Pokedex.vue b/src/pages/Pokedex.vue index d374ba4..479bd0b 100644 --- a/src/pages/Pokedex.vue +++ b/src/pages/Pokedex.vue @@ -83,10 +83,6 @@ function getPokemonData() { }) } -function changeTheme() { - isDark.value = !isDark.value -} - const pokemonColors = computed(() => { if (isDark.value) { return { @@ -110,12 +106,14 @@ watch(() => route.params.id, () => { onMounted(() => { appState.clearPageDisplay() + const pokemonId = route.params.id + setButtonActions([ - { buttonNumber: 1, label: 'LIST', action: () => router.push('/') }, - { buttonNumber: 2, label: 'STATS', action: () => console.log('Stats view - TBA') }, - { buttonNumber: 3, label: 'EVOL', action: () => console.log('Evolution chain - TBA') }, - { buttonNumber: 4, label: 'MOVES', action: () => console.log('Moves list - TBA') }, - { buttonNumber: 5, label: 'THEME', action: changeTheme } + { buttonNumber: 1, label: 'LOCA', action: () => router.push(`/pokemon/${pokemonId}/locations`) }, + { buttonNumber: 2, label: 'COLOR', action: () => router.push(`/pokemon/${pokemonId}/colors`) }, + { buttonNumber: 3, label: 'FORMS', action: () => router.push(`/pokemon/${pokemonId}/forms`) }, + { buttonNumber: 4, label: 'SHAPE', action: () => router.push(`/pokemon/${pokemonId}/shapes`) }, + { buttonNumber: 5, label: 'SPEC', action: () => router.push(`/pokemon/${pokemonId}/species`) } ]) }) diff --git a/src/pages/PokemonColors.vue b/src/pages/PokemonColors.vue new file mode 100644 index 0000000..c64a260 --- /dev/null +++ b/src/pages/PokemonColors.vue @@ -0,0 +1,200 @@ + + + + + + + ⚠ + No color data available + + + + + + + + + Primary Color + + + + + + + + + + + {{ colorData.name }} + + + {{ colorHex }} + + + Pokédex classification color + + + + + + + + + Translations + + + + + + + {{ nameEntry.language.name }} + + + {{ nameEntry.name }} + + + + + + + + + + + + + + + + + + + + + LOADING DATA + Fetching color information... + + + + + diff --git a/src/pages/PokemonForms.vue b/src/pages/PokemonForms.vue new file mode 100644 index 0000000..341ddf7 --- /dev/null +++ b/src/pages/PokemonForms.vue @@ -0,0 +1,175 @@ + + + + + + + ⚠ + No form data available + + + + + + + + + {{ formatFormName(form.name) }} + + + + Default + + + Mega + + + Battle + + + + + + + + + + + + + + + + + + + + + + + + + Form Name + {{ form.form_name }} + + + + Types + + + {{ type.type.name }} + + + + + + Order + + Form: {{ form.form_order }} | Overall: {{ form.order }} + + + + + + + + + + + + + + + + + + + + + + LOADING DATA + Fetching form information... + + + + + diff --git a/src/pages/PokemonLocations.vue b/src/pages/PokemonLocations.vue new file mode 100644 index 0000000..66cc1d5 --- /dev/null +++ b/src/pages/PokemonLocations.vue @@ -0,0 +1,185 @@ + + + + + + + ⚠ + No location data available + This Pokémon cannot be found in the wild + + + + + + + + + {{ formatLocationName(location.name) }} + + + + + + + {{ version.version }} + Max: {{ version.maxChance }}% + + + + + + {{ formatMethodName(method.method) }} + Lv {{ method.minLevel }}-{{ method.maxLevel }} + + {{ method.chance }}% + + + + + + + + + + + + + + + + + + + + + + LOADING DATA + Fetching location information... + + + + + diff --git a/src/pages/PokemonShapes.vue b/src/pages/PokemonShapes.vue new file mode 100644 index 0000000..ae63fa6 --- /dev/null +++ b/src/pages/PokemonShapes.vue @@ -0,0 +1,243 @@ + + + + + + + ⚠ + No shape data available + + + + + + + + + Body Shape + + + + + + {{ shapeIcon }} + + + + + {{ shapeData.name }} + + + {{ sortedAwesomeNames[0].awesome_name }} + + + Pokédex body shape classification + + + + + + + + + Scientific Names + + + + + + + {{ nameEntry.language.name }} + + + {{ nameEntry.awesome_name }} + + + + + + + + + Translations + + + + + + + {{ nameEntry.language.name }} + + + {{ nameEntry.name }} + + + + + + + + + + + + + + + + + + + + + LOADING DATA + Fetching shape information... + + + + + diff --git a/src/pages/PokemonSpecies.vue b/src/pages/PokemonSpecies.vue new file mode 100644 index 0000000..9ce6e03 --- /dev/null +++ b/src/pages/PokemonSpecies.vue @@ -0,0 +1,246 @@ + + + + + + + ⚠ + No species data available + + + + + + + + + Baby + + + Legendary + + + Mythical + + + + + + Base Stats + + + + + Capture Rate + {{ speciesData.capture_rate }}/255 + + + + + + + + + Base Happiness + {{ speciesData.base_happiness }} + + + + Gender Ratio + {{ genderRateText }} + + + + Hatch Counter + {{ speciesData.hatch_counter }} + + + + + + + Classification + + + + Generation + {{ formatName(speciesData.generation.name) }} + + + + Growth Rate + {{ speciesData.growth_rate.name }} + + + + Habitat + {{ speciesData.habitat.name }} + + + + Egg Groups + + + {{ group.name }} + + + + + + + + + Evolution + + + + Evolves From + {{ formatName(speciesData.evolves_from_species.name) }} + + + + + + + Pokedex Entries + + + + {{ formatName(entry.pokedex.name) }} + #{{ String(entry.entry_number).padStart(3, '0') }} + + + + + + + Additional Info + + + + ✓ Has gender differences + + + ✓ Forms are switchable + + + + + + + + + + + + + + + + + + + + + LOADING DATA + Fetching species information... + + + + + diff --git a/src/router.js b/src/router.js index 18a4dba..7119d47 100644 --- a/src/router.js +++ b/src/router.js @@ -2,6 +2,11 @@ import { createRouter, createWebHistory } from "vue-router"; import Home from "./pages/Home.vue"; import Pokedex from "./pages/Pokedex.vue"; import Pokemon from "./pages/Pokemon.vue"; +import PokemonLocations from "./pages/PokemonLocations.vue"; +import PokemonColors from "./pages/PokemonColors.vue"; +import PokemonForms from "./pages/PokemonForms.vue"; +import PokemonShapes from "./pages/PokemonShapes.vue"; +import PokemonSpecies from "./pages/PokemonSpecies.vue"; import Settings from "./pages/Settings.vue"; import Maps from "./pages/Maps.vue"; import Games from "./pages/Games.vue"; @@ -11,6 +16,11 @@ import NotFound from "./pages/NotFound.vue"; const routes = [ { path: "/", component: Home, name: "home" }, { path: "/pokemon/:id", component: Pokedex, name: "pokemon" }, + { path: "/pokemon/:id/locations", component: PokemonLocations, name: "pokemon-locations" }, + { path: "/pokemon/:id/colors", component: PokemonColors, name: "pokemon-colors" }, + { path: "/pokemon/:id/forms", component: PokemonForms, name: "pokemon-forms" }, + { path: "/pokemon/:id/shapes", component: PokemonShapes, name: "pokemon-shapes" }, + { path: "/pokemon/:id/species", component: PokemonSpecies, name: "pokemon-species" }, { path: "/pokemon", component: Pokemon, name: "pokemon-list" }, { path: "/settings", component: Settings, name: "settings" }, { path: "/maps", component: Maps, name: "maps" },
No color data available
No form data available
No location data available
This Pokémon cannot be found in the wild
No shape data available
No species data available