From 9cbaf7880be3f977fa24373f7cc10d7663f58427 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 19 Aug 2024 11:02:15 +0200 Subject: [PATCH] Add close and refresh keybinds --- .gitignore | 2 ++ app.go | 5 +++++ frontend/src/App.svelte | 12 ++++++++++++ frontend/wailsjs/go/main/App.d.ts | 2 ++ frontend/wailsjs/go/main/App.js | 4 ++++ 5 files changed, 25 insertions(+) diff --git a/.gitignore b/.gitignore index e23709e..2a6977b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ frontend/dist build bills.db main.log +bills.db-shm +bills.db-wal diff --git a/app.go b/app.go index e11596c..33ef853 100644 --- a/app.go +++ b/app.go @@ -3,6 +3,8 @@ package main import ( "context" "time" + + "github.com/wailsapp/wails/v2/pkg/runtime" ) // App struct @@ -20,6 +22,9 @@ func NewApp() *App { func (a *App) startup(ctx context.Context) { a.ctx = ctx } +func (a *App) Close() { + runtime.Quit(a.ctx) +} func (a *App) GetBills() WailsBills { res := WailsBills{} diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 8f2caea..7cab344 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,8 +1,20 @@ + +