|
Detailed player specific metrics coming soon! This will include
@@ -155,6 +175,8 @@ import { timeText } from '~/utilities/TimeHelper'
import { InstanceOutfitWarsResponseInterface } from '~/interfaces/InstanceOutfitWarsResponseInterface'
import { Ps2AlertsEventType } from '~/ps2alerts-constants/ps2AlertsEventType'
import CountdownSpinner from '~/components/common/CountdownSpinner.vue'
+import { profileLink } from '~/utilities/ProfileApi'
+import { World } from '~/ps2alerts-constants/world'
export default Vue.extend({
name: 'AlertCharacterMetrics',
@@ -250,6 +272,16 @@ export default Vue.extend({
this.init()
},
methods: {
+ // Links use the alert's own server; an outfit record's embedded world can be stale
+ profileHref(type: 'character' | 'outfit', id: string): string {
+ // The outfitwar prop defaults to a placeholder with no world
+ const outfitwar = this.outfitwar as { world?: World } | undefined
+ return profileLink(type, id, this.alert?.world ?? outfitwar?.world)
+ },
+ // Outfit ids 0 to 4 are the "no outfit" placeholders
+ hasOutfit(outfit?: { id: string }): boolean {
+ return !!outfit && parseInt(outfit.id, 10) > 4
+ },
reset() {
this.loaded = false
this.clearTimers()
diff --git a/components/alert/AlertOutfitMetrics.vue b/components/alert/AlertOutfitMetrics.vue
index 15a25c02..04d2871a 100644
--- a/components/alert/AlertOutfitMetrics.vue
+++ b/components/alert/AlertOutfitMetrics.vue
@@ -155,6 +155,16 @@
No results!
+
+
+ {{ item.outfit.name }}
+
+ {{ item.outfit.name }}
+
4
+ },
reset() {
this.loaded = false
this.clearTimers()
|