Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meter-data
Submodule meter-data updated 400 files
34 changes: 33 additions & 1 deletion src/layouts/DamageMeter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@
github.com/lost-ark-dev/loa-details
</span>
</nav>

<q-linear-progress size="25px" :value="getBossStatus().percent" color="red"
v-if="settingsStore.settings.damageMeter.header.bossHP.enabled && getActiveBoss() != null">
<div class="absolute-full flex flex-center">
<q-badge color="transparent" text-color="white" :label="getBossStatus().status" />
</div>
</q-linear-progress>
<DamageMeterTable
v-if="!isMinimized && sessionState"
:session-state="sessionState"
Expand Down Expand Up @@ -715,6 +720,33 @@ const tabs: ComputedRef<{
widthLeft: width,
};
});

function getActiveBoss() {
if (sessionState.value.currentBoss && sessionState.value.currentBoss.name) {
return sessionState.value.currentBoss
}
return null
}

const getBossStatus = () => {
const boss = getActiveBoss()
if (!boss) return {
percent: 0,
status: "No Active Boss"
}

let percent = (boss.currentHp / boss.maxHp)
let status = `${boss.name} ${boss.currentHp}/${boss.maxHp} (${(percent*100).toFixed(2)}%)`
if (boss.currentHp < 0) {
percent = 0
status = `${boss.name} 0 (${boss.currentHp})/${boss.maxHp} (0%)`
}

return {
percent: percent,
status
}
}
</script>

<style>
Expand Down