Always Display all Ethics + Text Formatting for the table
This commit is contained in:
parent
e8b7e395e2
commit
39f813bec3
1 changed files with 22 additions and 2 deletions
|
@ -64,6 +64,21 @@
|
||||||
pageData.ethicsData = new Map();
|
pageData.ethicsData = new Map();
|
||||||
pageData.gestaltCount = { total: 0, machines: 0 };
|
pageData.gestaltCount = { total: 0, machines: 0 };
|
||||||
|
|
||||||
|
chellarisData.ethics.forEach((ethic, id) => {
|
||||||
|
const newEthicsData: {
|
||||||
|
machine: boolean;
|
||||||
|
displayName: string;
|
||||||
|
regular: number;
|
||||||
|
fanatic: number;
|
||||||
|
} = {
|
||||||
|
machine: ethic.machine,
|
||||||
|
displayName: ethic.displayName,
|
||||||
|
regular: 0,
|
||||||
|
fanatic: 0
|
||||||
|
};
|
||||||
|
pageData.ethicsData.set(id, newEthicsData);
|
||||||
|
})
|
||||||
|
|
||||||
tmpGameData.empires.forEach((empire, index) => {
|
tmpGameData.empires.forEach((empire, index) => {
|
||||||
if (selectedGameGroups.includes(empire.group)) {
|
if (selectedGameGroups.includes(empire.group)) {
|
||||||
groupEmpires.set(index, empire);
|
groupEmpires.set(index, empire);
|
||||||
|
@ -187,7 +202,7 @@
|
||||||
{#each pageData.ethicsData as ethicData}
|
{#each pageData.ethicsData as ethicData}
|
||||||
{#if !ethicData[1].machine}
|
{#if !ethicData[1].machine}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{ethicData[1].displayName}</td>
|
<td class="table-label">{ethicData[1].displayName}</td>
|
||||||
<td>{ethicData[1].regular}</td>
|
<td>{ethicData[1].regular}</td>
|
||||||
<td>{ethicData[1].fanatic}</td>
|
<td>{ethicData[1].fanatic}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -207,7 +222,7 @@
|
||||||
{#each pageData.ethicsData as ethicData}
|
{#each pageData.ethicsData as ethicData}
|
||||||
{#if ethicData[1].machine}
|
{#if ethicData[1].machine}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{ethicData[1].displayName}</td>
|
<td class="table-label">{ethicData[1].displayName}</td>
|
||||||
<td>{ethicData[1].regular}</td>
|
<td>{ethicData[1].regular}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -238,6 +253,11 @@
|
||||||
td {
|
td {
|
||||||
padding: 0.3rem 0.5rem;
|
padding: 0.3rem 0.5rem;
|
||||||
border: 1px solid var(--color-text);
|
border: 1px solid var(--color-text);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-label {
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
|
|
Reference in a new issue