fix: display version number
This commit is contained in:
parent
e6ab5700de
commit
d91c90a5c2
@ -41,7 +41,11 @@
|
||||
<div class={cn('grid gap-2', className)}>
|
||||
<Popover.Root>
|
||||
<Popover.Trigger
|
||||
class={cn(buttonVariants({ variant: 'input' }), 'bg-based', !value && 'text-subtext')}
|
||||
class={cn(
|
||||
buttonVariants({ variant: 'input' }),
|
||||
'bg-based text-md md:text-sm',
|
||||
!value && 'text-subtext'
|
||||
)}
|
||||
>
|
||||
<CalendarIcon class="mr-2 size-4" />
|
||||
{#if value && value.start}
|
||||
|
@ -9,7 +9,7 @@
|
||||
bind:ref
|
||||
data-slot="tabs-list"
|
||||
class={cn(
|
||||
'bg-based inline-flex h-9 w-fit items-center justify-center gap-1 rounded-lg p-[3px]',
|
||||
'bg-based inline-flex h-11 w-fit items-center justify-center gap-1 rounded-lg p-[3px]',
|
||||
className
|
||||
)}
|
||||
{...restProps}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import pkg from '../../../package.json' with { type: 'json' };
|
||||
import * as Sheet from '$lib/ui/sheet';
|
||||
import * as DropdownMenu from '$lib/ui/dropdown-menu';
|
||||
import * as Avatar from '$lib/ui/avatar';
|
||||
@ -223,6 +224,6 @@
|
||||
</div>
|
||||
|
||||
<footer class="border-surface text-subtext bg-mantle flex justify-center border-t py-1 text-xs">
|
||||
v. version
|
||||
v. {pkg.version}
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -27,11 +27,9 @@
|
||||
</script>
|
||||
|
||||
<div class="mx-4 my-2 flex flex-wrap items-center justify-center gap-2">
|
||||
<LoaderCircle class={cn('invisible animate-spin', get.loading() && 'visible')} />
|
||||
|
||||
<Input
|
||||
bind:value={get.input.filter}
|
||||
class="bg-based w-md"
|
||||
class="bg-based max-w-sm"
|
||||
placeholder="Filter"
|
||||
onchange={() => {
|
||||
get.submit();
|
||||
@ -65,6 +63,8 @@
|
||||
get.submit();
|
||||
}}
|
||||
/>
|
||||
|
||||
<LoaderCircle class={cn('invisible animate-spin', get.loading() && 'visible')} />
|
||||
</div>
|
||||
|
||||
{#snippet editModal(item: Item)}
|
||||
@ -260,9 +260,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap justify-center gap-2 px-4 sm:hidden">
|
||||
{#if get.loading() && get.output.items.length == 0}
|
||||
<span>Loading</span>
|
||||
{:else}
|
||||
{#if get.output.items.length > 0}
|
||||
{#each get.output.items as item (item.id)}
|
||||
<Card class="flex flex-wrap gap-4">
|
||||
<div class="flex flex-col">
|
||||
|
@ -17,6 +17,9 @@
|
||||
let tabValue = $state('login');
|
||||
|
||||
async function redirect() {
|
||||
localStorage.setItem('username', login.input.username);
|
||||
login.input.password = '';
|
||||
|
||||
if (page.url.searchParams.has('redir')) {
|
||||
const uri = decodeURIComponent(page.url.searchParams.get('redir')!);
|
||||
await goto(uri);
|
||||
@ -27,6 +30,10 @@
|
||||
}
|
||||
|
||||
const login = coolForm(AuthClient, AuthService.method.login, {
|
||||
init: {
|
||||
username: localStorage.getItem('username') ?? ''
|
||||
},
|
||||
reset: false,
|
||||
onResult: () => {
|
||||
redirect();
|
||||
}
|
||||
@ -93,7 +100,7 @@
|
||||
<div class="flex gap-1">
|
||||
<Button type="submit" loading={login.loading()} class="grow">Submit</Button>
|
||||
{#if login.input.username}
|
||||
<Button type="button" onclick={passkeyLogin}><Fingerprint /></Button>
|
||||
<Button type="button" onclick={passkeyLogin} class="min-w-18"><Fingerprint /></Button>
|
||||
{/if}
|
||||
</div>
|
||||
</form>
|
||||
|
@ -15,6 +15,9 @@ export default defineConfig({
|
||||
changeOrigin: true
|
||||
}
|
||||
},
|
||||
fs: {
|
||||
allow: ['package.json']
|
||||
},
|
||||
host: '0.0.0.0'
|
||||
}
|
||||
});
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@ -30,9 +29,6 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
|
||||
slog.SetDefault(logger)
|
||||
|
||||
// Get env
|
||||
env, err := getEnv()
|
||||
if err != nil {
|
||||
@ -91,7 +87,7 @@ func main() {
|
||||
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
sig := <-sigs
|
||||
slog.Warn(fmt.Sprintf("Received signal %s, exiting", sig))
|
||||
log.Printf("Received signal %s, exiting", sig)
|
||||
|
||||
// Close HTTP server
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
@ -120,7 +116,7 @@ type env struct {
|
||||
func getEnv() (*env, error) {
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
slog.Warn("Failed to load .env file, using environment variables")
|
||||
log.Println("Failed to load .env file, using environment variables")
|
||||
}
|
||||
|
||||
// Create
|
||||
|
Loading…
x
Reference in New Issue
Block a user