aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/App.svelte
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-03-10 15:39:25 +0100
committerMaksymilian Jopek <maks@jopek.eu>2022-03-10 15:39:25 +0100
commit58e1ffa9effc92f5ddebee4068d5931be12201b0 (patch)
tree45b3fb1e652c7ec72e486fb9c21b1fda0deb7db9 /frontend/src/App.svelte
downloadбібліотека-58e1ffa9effc92f5ddebee4068d5931be12201b0.tar.gz
бібліотека-58e1ffa9effc92f5ddebee4068d5931be12201b0.tar.zst
бібліотека-58e1ffa9effc92f5ddebee4068d5931be12201b0.zip
Initial commit w/ v1.0.0
Diffstat (limited to 'frontend/src/App.svelte')
-rw-r--r--frontend/src/App.svelte32
1 files changed, 32 insertions, 0 deletions
diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte
new file mode 100644
index 0000000..ee4d894
--- /dev/null
+++ b/frontend/src/App.svelte
@@ -0,0 +1,32 @@
+<script lang="ts">
+ import DbInput from "./DBInput.svelte";
+ import Login from "./Login.svelte";
+ import Books from "./Books.svelte";
+ import AddBook from "./AddBook.svelte";
+ let whereami = "check-db";
+ // whereami = "books";
+ let ebook = {};
+ // whereami = "books";
+
+ $: {
+ console.log(whereami);
+ }
+</script>
+
+{#if whereami === "check-db"}
+ <DbInput bind:whereami />
+{:else if whereami === "login"}
+ <Login bind:whereami />
+{:else if whereami === "books"}
+ <Books bind:whereami bind:ebook />
+{:else if whereami === "add-book"}
+ <AddBook bind:whereami mode="add" ebook={null} />
+{:else if whereami === "edit-book"}
+ <AddBook bind:whereami mode="edit" bind:ebook />
+{/if}
+
+<style>
+ :root {
+ font-family: "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell;
+ }
+</style>