Skip to content

Commit

Permalink
chore: update analytics events
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnovd committed Apr 27, 2024
1 parent 20a4dba commit af67802
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
3 changes: 3 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const notificationsButtons = computed(() => [
},
{
text: t('common.update'),
attrs: {
'data-umami-event': `update service worker from version ${import.meta.env.__APP_VERSION__}`,
},
onClick: () => {
updateServiceWorker(true)
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/DamageCalculator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
:color="sideName"
:value="isEffectEnabled(side, effect)"
:label="effect.name"
:data-umami-event="`damage calculator: select ${effect.name} effect`"
:data-umami-event="`check ${effect.name} effect`"
@change="onSelectCreatureEffect(side, effect, $event)"
/>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PickCreatureButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<button
class="pick-creature-button"
:data-umami-event="`damage calculator: pick ${color} creature`"
:data-umami-event="`pick ${color} creature`"
:class="`color-${color}`"
@click="showSelectUnitModal = true"
>
Expand Down
7 changes: 3 additions & 4 deletions src/components/SelectHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@
{{ selected.name }}
</template>

<template #option="{ option }">
<template #option="{ option: hero }">
<ObjectPortrait
:folder="`/images/heroes/portraits/small`"
:file="{ name: option.id, alt: option.name }"
:data-umami-event="`damage calculator: select ${$options.name} hero`"
:file="{ name: hero.id, alt: hero.name }"
:width="46"
:height="30"
:lazy-loading="false"
/>
{{ option.name }}
{{ hero.name }}
</template>
</BaseSelect>
</template>
Expand Down
6 changes: 3 additions & 3 deletions src/components/SelectTerrain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
{{ selected.name }}
</template>

<template #option="{ option }">
<template #option="{ option: terrain }">
<ObjectPortrait
:folder="`/images/terrains`"
:file="{ name: option.id, alt: option.name }"
:file="{ name: terrain.id, alt: terrain.name }"
width="46px"
height="30px"
/>
{{ option.name }}
{{ terrain.name }}
</template>
</BaseSelect>
</template>
Expand Down
2 changes: 2 additions & 0 deletions src/components/base/BaseNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<div v-if="buttons.length" class="notification-buttons">
<button
v-for="(button, index) in buttons"
v-bind="button.attrs"
:key="`button-${index}`"
class="notification-button"
@click="onClick(button)"
Expand All @@ -23,6 +24,7 @@ import { nextTick, ref } from 'vue'
interface BaseNotificationButtonProp {
text: string
attrs?: Record<string, string>
onClick?: () => void
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/damageCalculator/SelectSkillButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
v-for="level in levels"
:key="level.id"
class="skill-button"
:data-umami-event="`damage calculator: select skill ${name}, level ${level.value}`"
:data-umami-event="`select skill ${name}, level ${level.value}`"
:class="{ active: selectedLevel === level.value }"
@click="onClick(level.value)"
>
Expand Down

0 comments on commit af67802

Please sign in to comment.