File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ export async function retrieveCustomDiscs(): Promise<void> {
1515 }
1616 let response = ( await httpResponse . json ( ) ) . result as CustomDiscsOverview ;
1717
18+ itemsStore . customMusicDiscsUnsold = response . unsoldDiscs ;
19+
1820 // Update custom music disc store
1921 for ( const disc of response . discs ) {
2022 let storeDisc = getDiscFromStore ( disc . name ) ;
Original file line number Diff line number Diff line change @@ -11,12 +11,13 @@ export interface CustomMusicDisc {
1111 maxPrice : number ;
1212 averagePrice : number ;
1313 latestSale ?: string ;
14- } ;
14+ }
1515
1616export const itemsStore = reactive ( {
1717 customMusicDiscs : { } as { [ discName : string ] : CustomMusicDisc } ,
1818 customMusicDiscSources : new Set < string > ( ) ,
1919 customMusicDiscVersions : new Set < string > ( ) ,
20+ customMusicDiscsUnsold : 0 ,
2021 customDiscsLastUpdated : new Date ( 0 ) ,
2122 customDiscsStatsLastUpdated : new Date ( 0 ) ,
2223
Original file line number Diff line number Diff line change @@ -50,9 +50,6 @@ const villagerTrades = computed(() => {
5050 return itemsStore .villagerTrades .filter ((t ) => t .itemType ?.toLocaleLowerCase () == itemType );
5151});
5252
53- // Specific item type data
54- const numUndiscoveredMusicDiscs = ref (0 );
55-
5653// Name filter
5754const nameFilter = ref (" " );
5855watch (nameFilter , async (_ , __ ) => {
@@ -276,8 +273,8 @@ function getWikiLink() {
276273 <p class =" text-gray-300" v-if =" itemInfo?.description" >{{ itemInfo.description }}</p >
277274
278275 <!-- Specific item type info -->
279- <p class =" text-gray-300" v-if =" numUndiscoveredMusicDiscs > 0" >
280- {{ numUndiscoveredMusicDiscs }} custom discs have not been sold yet (possibly undiscovered).
276+ <p class =" text-gray-300" v-if =" itemsStore.customMusicDiscsUnsold > 0" >
277+ {{ itemsStore.customMusicDiscsUnsold }} custom discs have not been sold yet (possibly undiscovered).
281278 </p >
282279
283280 <!-- More info -->
You can’t perform that action at this time.
0 commit comments