generated from schreifuchs/wails-template
fix weird scrolling bug
This commit is contained in:
parent
5bedea5312
commit
d62afd5673
@ -10,9 +10,11 @@
|
|||||||
let url: string = $state("/");
|
let url: string = $state("/");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main class="flex-col h-screen items-center bg-gray-50 dark:bg-gray-900">
|
<div
|
||||||
|
class="flex-col h-screen items-center bg-gray-50 dark:bg-gray-900 max-h-screen overflow-y-scroll overflow-x-scroll"
|
||||||
|
>
|
||||||
<Router bind:url>
|
<Router bind:url>
|
||||||
<Navbar class="border-b">
|
<Navbar class="border-b absolute top">
|
||||||
<div class="flex gap-5">
|
<div class="flex gap-5">
|
||||||
<button
|
<button
|
||||||
class="grid grid-cols-3 items-center"
|
class="grid grid-cols-3 items-center"
|
||||||
@ -26,12 +28,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<DarkMode />
|
<DarkMode />
|
||||||
</Navbar>
|
</Navbar>
|
||||||
<Route path="/"><Lendings clientId={null} /></Route>
|
<main class="mt-20">
|
||||||
<Route path="/books"><Books /></Route>
|
<Route path="/"><Lendings clientId={null} /></Route>
|
||||||
<Route path="/clients"><Clients /></Route>
|
<Route path="/books"><Books /></Route>
|
||||||
|
<Route path="/clients"><Clients /></Route>
|
||||||
|
|
||||||
<Route path="/clients/:id" let:params>
|
<Route path="/clients/:id" let:params>
|
||||||
<Lendings clientId={parseInt(params.id)} />
|
<Lendings clientId={parseInt(params.id)} />
|
||||||
</Route>
|
</Route>
|
||||||
|
</main>
|
||||||
</Router>
|
</Router>
|
||||||
</main>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<form onsubmit={submit}>
|
<form onsubmit={submit}>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Label>Name</Label>
|
<Label>Name</Label>
|
||||||
<Input type="text" bind:value={author.Name} />
|
<Input type="text" bind:value={author.Name} required />
|
||||||
</div>
|
</div>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Button type="submit">Save</Button>
|
<Button type="submit">Save</Button>
|
||||||
|
@ -41,13 +41,13 @@
|
|||||||
|
|
||||||
<form onsubmit={submit}>
|
<form onsubmit={submit}>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Label>Name</Label>
|
<Label>Title</Label>
|
||||||
<Input type="text" bind:value={book.Title} />
|
<Input type="text" bind:value={book.Title} required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Label>ISBN</Label>
|
<Label>ISBN</Label>
|
||||||
<Input pattern={ISBNRegex} type="text" bind:value={book.ISBN} />
|
<Input pattern={ISBNRegex} type="text" bind:value={book.ISBN} required />
|
||||||
</div>
|
</div>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Label>Author</Label>
|
<Label>Author</Label>
|
||||||
@ -58,6 +58,7 @@
|
|||||||
return { value: a.ID, name: a.Name };
|
return { value: a.ID, name: a.Name };
|
||||||
})}
|
})}
|
||||||
bind:value={book.AuthorID}
|
bind:value={book.AuthorID}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
<form onsubmit={submit}>
|
<form onsubmit={submit}>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Label>Name</Label>
|
<Label>Name</Label>
|
||||||
<Input type="text" bind:value={client.Name} />
|
<Input type="text" bind:value={client.Name} required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<Label>ISBN</Label>
|
<Label>Email</Label>
|
||||||
<Input type="email" bind:value={client.Email} />
|
<Input type="email" bind:value={client.Email} required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
return { value: b.ID, name: b.Title };
|
return { value: b.ID, name: b.Title };
|
||||||
})}
|
})}
|
||||||
bind:value={lending.BookID}
|
bind:value={lending.BookID}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
@ -58,6 +59,7 @@
|
|||||||
return { value: c.ID, name: `${c.Email} ~ ${c.Name}` };
|
return { value: c.ID, name: `${c.Email} ~ ${c.Name}` };
|
||||||
})}
|
})}
|
||||||
bind:value={lending.ClientID}
|
bind:value={lending.ClientID}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import {
|
import {
|
||||||
Badge,
|
Badge,
|
||||||
Button,
|
Button,
|
||||||
|
Heading,
|
||||||
Modal,
|
Modal,
|
||||||
Spinner,
|
Spinner,
|
||||||
Table,
|
Table,
|
||||||
@ -34,6 +35,8 @@
|
|||||||
onMount(update);
|
onMount(update);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<Heading class="m-5">Books</Heading>
|
||||||
|
|
||||||
{#if book}
|
{#if book}
|
||||||
<Modal bind:open={modal} title="Book">
|
<Modal bind:open={modal} title="Book">
|
||||||
<BookEditor
|
<BookEditor
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Heading,
|
||||||
Modal,
|
Modal,
|
||||||
Table,
|
Table,
|
||||||
TableBody,
|
TableBody,
|
||||||
@ -32,6 +33,7 @@
|
|||||||
onMount(update);
|
onMount(update);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<Heading class="m-5">Clients</Heading>
|
||||||
{#if client}
|
{#if client}
|
||||||
<Modal bind:open={modal} title="Client">
|
<Modal bind:open={modal} title="Client">
|
||||||
<ClientEditor
|
<ClientEditor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user