diff --git a/src/components/ItemTypeCategories.vue b/src/components/ItemTypeCategories.vue new file mode 100644 index 0000000..3cf863b --- /dev/null +++ b/src/components/ItemTypeCategories.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/src/components/ItemTypeOverview.vue b/src/components/ItemTypeOverview.vue index 419844d..033b95f 100644 --- a/src/components/ItemTypeOverview.vue +++ b/src/components/ItemTypeOverview.vue @@ -23,6 +23,7 @@ import { itemsStore } from "@/store/items-state"; import { debounce } from "lodash"; import { setPageTitle } from "@/router/pageTitle"; import { capitalizeFirstLetter } from "@/utilities/text-format"; +import { userStore } from "@/store/user-state"; interface Props { itemType: string; @@ -80,6 +81,8 @@ watch(customDiscFilter, async (_, __) => { onMounted(async () => { initFlowbite(); // Include on any component where you need flowbite JS functionality + userStore.addRecentlyViewedItem(props.itemType); + setPageTitle(capitalizeFirstLetter(formatItemType(props.itemType).toLocaleLowerCase())); // Load sales with any filters @@ -144,10 +147,10 @@ async function loadEnchantments(): Promise { return uniqueItems .map( (i: string) => - ({ - text: formatEnchantment(i), - value: i, - } as DropdownOption) + ({ + text: formatEnchantment(i), + value: i, + } as DropdownOption) ) .sort((a, b) => a.text.localeCompare(b.text)); } @@ -174,10 +177,10 @@ async function loadPotions(): Promise { return uniqueItems .map( (i: string) => - ({ - text: formatPotionEffect(i), - value: i, - } as DropdownOption) + ({ + text: formatPotionEffect(i), + value: i, + } as DropdownOption) ) .sort((a, b) => a.text.localeCompare(b.text)); } @@ -241,7 +244,9 @@ function getWikiLink() { frags[i] = frags[i]!.charAt(0).toUpperCase() + frags[i]!.slice(1); } - return `https://minecraft.wiki/w/${frags.join("_")}`; + let itemName = frags.join("_").replace("Of", "of"); + + return `https://minecraft.wiki/w/${itemName}`; } @@ -249,42 +254,59 @@ function getWikiLink() {
- +
-
- -

{{ formatItemType(itemType)?.toLocaleLowerCase() }}

-

{{ itemInfo.description }}

- - -

- {{ numUndiscoveredMusicDiscs }} custom discs have not been sold yet (possibly undiscovered). -

+
+ +
+ +

{{ formatItemType(itemType)?.toLocaleLowerCase() }}

- -

- More info -

-

- Minecraft Wiki -

+ + + +

{{ itemInfo.description }}

+ + +

+ {{ numUndiscoveredMusicDiscs }} custom discs have not been sold yet (possibly undiscovered). +

+ + +

+ More info +

+

+ Minecraft Wiki +

+
+ + +
+
+ +
+
+ +
+

Villager Trade

- {{ villagerTrade.villager }}: {{ villagerTrade.price }} {{ villagerTrade.currency }} for {{ villagerTrade.quantity }} + {{ villagerTrade.villager }}: {{ villagerTrade.price }} {{ villagerTrade.currency }} for {{ + villagerTrade.quantity }} {{ villagerTrade.itemType }} {{ villagerTrade.extraInfo ? `(${villagerTrade.extraInfo})` : "" }}

@@ -302,31 +324,17 @@ function getWikiLink() {

- - + - + @@ -351,39 +359,24 @@ function getWikiLink() {
- - + - +
-