tooltips fix
This commit is contained in:
@@ -35,7 +35,8 @@ export class FrontcraftArmoryComponent implements OnInit{
|
|||||||
itemname: item.name,
|
itemname: item.name,
|
||||||
iconname: item.icon.replace('.jpg', ''),
|
iconname: item.icon.replace('.jpg', ''),
|
||||||
quality: item.quality.replace(/^\w/, c => c.toUpperCase()),
|
quality: item.quality.replace(/^\w/, c => c.toUpperCase()),
|
||||||
url: "https://classic.wowhead.com/item="+item.id
|
url: "https://classic.wowhead.com/item="+item.id,
|
||||||
|
tooltip: "unavailable"
|
||||||
}})
|
}})
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class FrontcraftCharacterComponent implements OnInit{
|
|||||||
gear1:string[] = []
|
gear1:string[] = []
|
||||||
|
|
||||||
boss2= {}
|
boss2= {}
|
||||||
gear2:Item[] = []
|
gear2:string[] = []
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private api: ApiService,
|
private api: ApiService,
|
||||||
@@ -50,7 +50,7 @@ export class FrontcraftCharacterComponent implements OnInit{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
fetch(this.dataLink).then(raw => raw.json().then(async (json) => {
|
fetch(this.dataLink).then(raw => raw.json().then((json) => {
|
||||||
if(json.length < 1) return
|
if(json.length < 1) return
|
||||||
const data = json[0]
|
const data = json[0]
|
||||||
|
|
||||||
@@ -58,14 +58,18 @@ export class FrontcraftCharacterComponent implements OnInit{
|
|||||||
name: data.encounterName,
|
name: data.encounterName,
|
||||||
date: data.startTime
|
date: data.startTime
|
||||||
}
|
}
|
||||||
|
this.gear2 = data.gear.map(item => {return <Item>{
|
||||||
this.gear2 = await Promise.all(data.gear.map(i => i.name).map(itemName => this.api.get('ItemManager').getItem(itemName)))
|
itemname: item.name,
|
||||||
this.gear2 = this.gear2.filter(i => i!=null)
|
iconname: item.icon.replace('.jpg', ''),
|
||||||
|
quality: item.quality.replace(/^\w/, c => c.toUpperCase()),
|
||||||
|
url: "https://classic.wowhead.com/item="+item.id,
|
||||||
|
tooltip: "unavailable"
|
||||||
|
}}).filter(item => item.itemname != "Unknown Item")
|
||||||
}))
|
}))
|
||||||
|
|
||||||
fetch(this.dataLink).then(raw => raw.json().then(async (json) => {
|
fetch(this.dataLink).then(raw => raw.json().then((json) => {
|
||||||
if(json.length < 2) return
|
if(json.length < 2) return
|
||||||
|
|
||||||
const data = json[1]
|
const data = json[1]
|
||||||
|
|
||||||
this.boss1 = {
|
this.boss1 = {
|
||||||
@@ -73,9 +77,13 @@ export class FrontcraftCharacterComponent implements OnInit{
|
|||||||
date: data.startTime
|
date: data.startTime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.gear1 = data.gear.map(item => {return <Item>{
|
||||||
this.gear1 = await Promise.all(data.gear.map(i => i.name).map(itemName => this.api.get('ItemManager').getItem(itemName)))
|
itemname: item.name,
|
||||||
this.gear1 = this.gear1.filter(i => i!=null)
|
iconname: item.icon.replace('.jpg', ''),
|
||||||
|
quality: item.quality.replace(/^\w/, c => c.toUpperCase()),
|
||||||
|
url: "https://classic.wowhead.com/item="+item.id,
|
||||||
|
tooltip: "unavailable"
|
||||||
|
}}).filter(item => item.itemname != "Unknown Item")
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user