diff --git a/src/lib/components/ui/card/card-action.svelte b/src/lib/components/ui/card/card-action.svelte
new file mode 100644
index 0000000..cc36c56
--- /dev/null
+++ b/src/lib/components/ui/card/card-action.svelte
@@ -0,0 +1,20 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/card-content.svelte b/src/lib/components/ui/card/card-content.svelte
new file mode 100644
index 0000000..bc90b83
--- /dev/null
+++ b/src/lib/components/ui/card/card-content.svelte
@@ -0,0 +1,15 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/card-description.svelte b/src/lib/components/ui/card/card-description.svelte
new file mode 100644
index 0000000..9b20ac7
--- /dev/null
+++ b/src/lib/components/ui/card/card-description.svelte
@@ -0,0 +1,20 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/card-footer.svelte b/src/lib/components/ui/card/card-footer.svelte
new file mode 100644
index 0000000..cf43353
--- /dev/null
+++ b/src/lib/components/ui/card/card-footer.svelte
@@ -0,0 +1,20 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/card-header.svelte b/src/lib/components/ui/card/card-header.svelte
new file mode 100644
index 0000000..8a91abb
--- /dev/null
+++ b/src/lib/components/ui/card/card-header.svelte
@@ -0,0 +1,23 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/card-title.svelte b/src/lib/components/ui/card/card-title.svelte
new file mode 100644
index 0000000..22586e6
--- /dev/null
+++ b/src/lib/components/ui/card/card-title.svelte
@@ -0,0 +1,20 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/card.svelte b/src/lib/components/ui/card/card.svelte
new file mode 100644
index 0000000..99448cc
--- /dev/null
+++ b/src/lib/components/ui/card/card.svelte
@@ -0,0 +1,23 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/card/index.ts b/src/lib/components/ui/card/index.ts
new file mode 100644
index 0000000..4d3fce4
--- /dev/null
+++ b/src/lib/components/ui/card/index.ts
@@ -0,0 +1,25 @@
+import Root from "./card.svelte";
+import Content from "./card-content.svelte";
+import Description from "./card-description.svelte";
+import Footer from "./card-footer.svelte";
+import Header from "./card-header.svelte";
+import Title from "./card-title.svelte";
+import Action from "./card-action.svelte";
+
+export {
+ Root,
+ Content,
+ Description,
+ Footer,
+ Header,
+ Title,
+ Action,
+ //
+ Root as Card,
+ Content as CardContent,
+ Description as CardDescription,
+ Footer as CardFooter,
+ Header as CardHeader,
+ Title as CardTitle,
+ Action as CardAction,
+};
diff --git a/src/lib/services/workspaces.ts b/src/lib/services/workspaces.ts
index 4c897ce..7caf735 100644
--- a/src/lib/services/workspaces.ts
+++ b/src/lib/services/workspaces.ts
@@ -1,5 +1,33 @@
import type { Workspace } from "$lib/types/workspace";
+let ws: Workspace[] = [
+ {
+ Id: "1",
+ Name: "Test 1",
+ Description: "This is a test description"
+ },
+ {
+ Id: "2",
+ Name: "Test 2",
+ Description: "This is a longer test description"
+ },
+ {
+ Id: "3",
+ Name: "Test 3",
+ Description: "This is a slightly longer test description"
+ },
+ {
+ Id: "4",
+ Name: "Test 4",
+ Description: "This is an even slightly longer test description"
+ },
+ {
+ Id: "5",
+ Name: "Test 5",
+ Description: "This is a veryyyyyyyyyyyyyyyyyyyyyyyyyyy longggggggggggggggggggggggggggg test descriptionnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
+ },
+]
+
export async function get_workspaces(): Promise {
- return []
+ return ws
}
\ No newline at end of file
diff --git a/src/lib/types/workspace.ts b/src/lib/types/workspace.ts
index 2d4b5a5..da7331a 100644
--- a/src/lib/types/workspace.ts
+++ b/src/lib/types/workspace.ts
@@ -1,4 +1,5 @@
export type Workspace = {
- Id: string,
- Name: string,
-}
\ No newline at end of file
+ Id: string;
+ Name: string;
+ Description: string;
+};
diff --git a/src/routes/workspaces/+page.svelte b/src/routes/workspaces/+page.svelte
index 4ba93a2..432e7cf 100644
--- a/src/routes/workspaces/+page.svelte
+++ b/src/routes/workspaces/+page.svelte
@@ -3,24 +3,65 @@
import { Button } from "$lib/components/ui/button/index.js";
import FolderCodeIcon from "@lucide/svelte/icons/folder-code";
import { get_workspaces } from "$lib/services/workspaces";
+ import type { Workspace } from "$lib/types/workspace";
+ import * as Card from "$lib/components/ui/card/index";
- get_workspaces;
+ let showPrompt = false;
+ let workspaces: Workspace[] = [];
+
+ get_workspaces().then((ws) => {
+ if (ws.length == 0) {
+ showPrompt = true;
+ } else {
+ workspaces = ws;
+ }
+ });
-
-
-
-
-
- No Workspaces Yet
-
- You haven't created any Workspaces yet. Get started by creating your first
- project.
-
-
-
-
-
+{#if showPrompt}
+
+
+
+
+
+ No Workspaces Yet
+
+ You haven't created any Workspaces yet. Get started by creating your
+ first project.
+
+
+
+
+
+
+
+
+{:else}
+
+
+ {#each workspaces as workspace (workspace.Id)}
+
+
+ {workspace.Name}
+
+ {workspace.Description}
+
+
+
+
+
+
+
+ {/each}
-
-
+
+{/if}