WIP: Staged all changes
This commit is contained in:
28
frontend/src/pages/Dashboard.svelte
Normal file
28
frontend/src/pages/Dashboard.svelte
Normal file
@@ -0,0 +1,28 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { plugins, fetchPlugins, selectedPlugin } from '../lib/stores.js';
|
||||
|
||||
onMount(async () => {
|
||||
await fetchPlugins();
|
||||
});
|
||||
|
||||
function selectPlugin(plugin) {
|
||||
selectedPlugin.set(plugin);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-4">Available Tools</h1>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{#each $plugins as plugin}
|
||||
<div
|
||||
class="border rounded-lg p-4 cursor-pointer hover:bg-gray-100"
|
||||
on:click={() => selectPlugin(plugin)}
|
||||
>
|
||||
<h2 class="text-xl font-semibold">{plugin.name}</h2>
|
||||
<p class="text-gray-600">{plugin.description}</p>
|
||||
<span class="text-sm text-gray-400">v{plugin.version}</span>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user