Code format
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { type Food, FoodService } from '$lib/database/food'
|
||||
import { toast } from 'svelte-sonner'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import type { Err } from '$lib/types'
|
||||
import { foodStore } from '$lib/store/foodStore'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let item: Food = {
|
||||
food: '',
|
||||
amount: 0,
|
||||
|
@@ -1,18 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { appWindow } from '@tauri-apps/api/window'
|
||||
import { faXmark, faWindowMinimize } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faWindowMinimize, faXmark } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faGithub } from '@fortawesome/free-brands-svg-icons'
|
||||
import Fa from 'svelte-fa'
|
||||
import { link } from 'svelte-spa-router'
|
||||
import { link, location } from 'svelte-spa-router'
|
||||
import { Button } from '$components/ui/button'
|
||||
import { Sun, Moon } from 'lucide-svelte'
|
||||
import { Moon, Sun } from 'lucide-svelte'
|
||||
import { toggleMode } from 'mode-watcher'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
import { location } from 'svelte-spa-router'
|
||||
import { dbStateStore } from '$lib/store/dbState'
|
||||
import { DBService } from '$lib/database'
|
||||
|
||||
Fa
|
||||
|
||||
// You can structure your links however you'd like, but I like to keep them in an array of objects
|
||||
type Link = {
|
||||
label: string
|
||||
@@ -23,6 +23,10 @@
|
||||
label: 'Home',
|
||||
href: '/'
|
||||
},
|
||||
{
|
||||
label: 'Daily',
|
||||
href: '/daily'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
@@ -45,8 +49,10 @@
|
||||
class="flex space-x-4 text-xl font-bold select-none"
|
||||
on:dragstart|preventDefault
|
||||
>
|
||||
<div class:text-amber-500="{$dbStateStore.transacting}" on:click={DBService.Begin} class="cursor-pointer">T</div>
|
||||
<div class:text-emerald-600={$dbStateStore.transacting} on:click={DBService.Commit} class="cursor-pointer">C</div>
|
||||
<div class:text-amber-500="{$dbStateStore.transacting}" on:click={DBService.Begin} class="cursor-pointer">T
|
||||
</div>
|
||||
<div class:text-emerald-600={$dbStateStore.transacting} on:click={DBService.Commit} class="cursor-pointer">C
|
||||
</div>
|
||||
<div class:text-red-700={$dbStateStore.transacting} on:click={DBService.Rollback} class="cursor-pointer">R</div>
|
||||
{#each links as { href, label }}
|
||||
<a
|
||||
|
Reference in New Issue
Block a user