refactor(web): improve resource page layout

This commit is contained in:
Luke committed 2023-03-22 22:04:21 +01:00
1 parent d97f11ac7b
commit 3c199c2217
2 files changed
+13 -5

No files matched your search

@@ -44,6 +44,7 @@
const { headerRows, rows, tableAttrs, tableBodyAttrs } = table.createViewModel(columns);
</script>
<div class="px-4">
<table {...$tableAttrs} class="w-full">
<thead class="bg-dark-600">
{#each $headerRows as headerRow (headerRow.id)}
@@ -77,7 +78,7 @@
{...attrs}
class={`${
cell.id === 'time' && 'text-center'
} p-2 bg-dark-700 border-b-[1px] border-dark-400 truncate max-w-[200px]`}
} p-2 bg-dark-700 border-b-[0px] border-dark-400 truncate max-w-[200px]`}
>
<Render of={cell.render()} />
</td>
@@ -88,3 +89,4 @@
{/each}
</tbody>
</table>
</div>
@@ -1,15 +1,21 @@
<script lang="ts">
import { IconChevronLeft } from '@tabler/icons-svelte';
import { meta, router } from 'tinro';
import { router } from 'tinro';
const data = meta();
</script>
<div class="p-4 flex items-center">
<div class="p-4 grid grid-flow-col grid-cols-3 items-center ">
<button
on:click={() => router.goto('/')}
class="flex p-2 bg-dark-600 text-dark-100 hover:text-white rounded-md justify-center items-center hover:bg-dark-500 outline-none border-[1px] border-transparent focus-visible:border-cyan-600"
class="flex p-2 w-12 bg-dark-600 text-dark-100 hover:text-white rounded-md justify-center items-center hover:bg-dark-500 outline-none border-[1px] border-transparent focus-visible:border-cyan-600"
>
<IconChevronLeft />
Resources
</button>
<p class="text-center text-lg">{data.params.resource}</p>
<div class="text-end text-dark-100 flex flex-col text-xs">
<p>Queries: 530</p>
<p>Time: 3014 ms</p>
<p class="text-yellow-500">Slow queries: 3</p>
</div>
</div>