1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2024-12-01 13:20:54 +00:00

Updated stats grid too

This commit is contained in:
Romein van Buren 2023-01-17 16:45:22 +01:00
parent 928b4d229c
commit 49b2f52af8
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
2 changed files with 20 additions and 2 deletions

View File

@ -136,7 +136,7 @@
{#each columns as column} {#each columns as column}
{@const value = item[column.key]} {@const value = item[column.key]}
<td class:right={column.right} title={value}> <td class:right={column.right} title={value}>
{formatValue(value)} <div class="value">{formatValue(value)}</div>
</td> </td>
{/each} {/each}
</tr> </tr>
@ -212,6 +212,14 @@
padding: 0; padding: 0;
} }
td .value {
height: 2.1ex;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 25em;
}
tbody tr.selected td { tbody tr.selected td {
background-color: #00008b; background-color: #00008b;
color: #fff; color: #fff;

View File

@ -7,7 +7,10 @@
<div class="stats"> <div class="stats">
<CodeExample code="db.stats()" /> <CodeExample code="db.stats()" />
<ObjectGrid data={collection.stats} />
<div class="grid">
<ObjectGrid data={collection.stats} />
</div>
</div> </div>
<style> <style>
@ -16,4 +19,11 @@
gap: 0.5rem; gap: 0.5rem;
grid-template: auto 1fr / 1fr; grid-template: auto 1fr / 1fr;
} }
.stats .grid {
overflow: auto;
min-height: 0;
min-width: 0;
border: 1px solid #ccc;
}
</style> </style>