generated from dave/wails-template
Initial commit
This commit is contained in:
75
frontend/src/App.svelte
Normal file
75
frontend/src/App.svelte
Normal file
@@ -0,0 +1,75 @@
|
||||
<script lang="ts">
|
||||
import Header from "$lib/components/Header.svelte";
|
||||
import Router from "$lib/router/Router.svelte";
|
||||
import { Toaster } from "svelte-sonner";
|
||||
import { Close } from '$wails/main/App'
|
||||
|
||||
function keyDown(event: KeyboardEvent) {
|
||||
if (event.ctrlKey && event.key == "r") {
|
||||
window.location.reload();
|
||||
}
|
||||
if (event.ctrlKey && event.key == "w") {
|
||||
Close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--
|
||||
<Toaster
|
||||
toastOptions={{
|
||||
unstyled: true,
|
||||
classes: {
|
||||
toast: 'bg-blue-400',
|
||||
title: 'text-red-400',
|
||||
description: 'text-red-400',
|
||||
actionButton: 'bg-zinc-400',
|
||||
cancelButton: 'bg-orange-400',
|
||||
closeButton: 'bg-lime-400'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
toast('Hello World', {
|
||||
unstyled: true,
|
||||
classes: {
|
||||
toast: 'bg-blue-400',
|
||||
title: 'text-red-400 text-2xl',
|
||||
description: 'text-red-400',
|
||||
actionButton: 'bg-zinc-400',
|
||||
cancelButton: 'bg-orange-400',
|
||||
closeButton: 'bg-lime-400'
|
||||
}
|
||||
});
|
||||
|
||||
<Toaster
|
||||
toastOptions={{
|
||||
unstyled: true,
|
||||
classes: {
|
||||
error: 'bg-red-400',
|
||||
success: 'text-green-400',
|
||||
warning: 'text-yellow-400',
|
||||
info: 'bg-blue-400'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<Toaster>
|
||||
<LoadingIcon slot="loading-icon" />
|
||||
<SuccessIcon slot="success-icon" />
|
||||
<ErrorIcon slot="error-icon" />
|
||||
<InfoIcon slot="info-icon" />
|
||||
<WarningIcon slot="warning-icon" />
|
||||
</Toaster>
|
||||
|
||||
<Toaster duration={10000} />
|
||||
|
||||
<Toaster hotkey={['KeyC']} />
|
||||
-->
|
||||
<svelte:window on:keydown={keyDown} />
|
||||
<Toaster theme="dark" expand visibleToasts={9} />
|
||||
<template>
|
||||
<Header />
|
||||
<main class="flex-1">
|
||||
<Router />
|
||||
</main>
|
||||
</template>
|
||||
Reference in New Issue
Block a user