Show row tooltips and keep HP delta icon
This commit is contained in:
@@ -933,12 +933,9 @@ function buildHistoryContent(actor, tabArg) {
|
||||
{
|
||||
label: "Details",
|
||||
render: (entry) => {
|
||||
const parts = [];
|
||||
if (entry.source) parts.push(entry.source);
|
||||
if (entry.breakdown || entry.amount != null) {
|
||||
parts.push(entry.breakdown ? entry.breakdown : `${entry.amount} damage`);
|
||||
}
|
||||
return parts.join(" → ");
|
||||
if (entry.breakdown) return entry.breakdown;
|
||||
if (entry.amount != null) return `${entry.amount} damage`;
|
||||
return "";
|
||||
},
|
||||
getTitle: (entry) => entry.breakdown ?? "",
|
||||
},
|
||||
@@ -1074,7 +1071,10 @@ function renderHistoryTable(entries, columns, id, rowsPerPage = 10, currentPage
|
||||
const rows = paginatedEntries
|
||||
.map(
|
||||
(entry) => `
|
||||
<tr>
|
||||
<tr${(() => {
|
||||
const rowTitle = columns.map((col) => (col.getTitle ? col.getTitle(entry) : "")).find((t) => t);
|
||||
return rowTitle ? ` title="${rowTitle}"` : "";
|
||||
})()}>
|
||||
${columns.map((col) => {
|
||||
const cellContent = col.render(entry) ?? "";
|
||||
const title = col.getTitle ? col.getTitle(entry) : "";
|
||||
|
||||
Reference in New Issue
Block a user