From 8d9c163d3ba3afb0301c12a7c94baf472958ee50 Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Wed, 18 Jan 2023 13:55:00 +0100 Subject: [PATCH] Call window.runtime methods via Wails JS --- frontend/src/app.svelte | 5 +++-- frontend/src/organisms/connection/dblist.svelte | 3 ++- frontend/src/organisms/connection/index.svelte | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/app.svelte b/frontend/src/app.svelte index 1f54e78..cffd941 100644 --- a/frontend/src/app.svelte +++ b/frontend/src/app.svelte @@ -1,6 +1,7 @@ diff --git a/frontend/src/organisms/connection/dblist.svelte b/frontend/src/organisms/connection/dblist.svelte index 551ae6d..e7c6080 100644 --- a/frontend/src/organisms/connection/dblist.svelte +++ b/frontend/src/organisms/connection/dblist.svelte @@ -3,6 +3,7 @@ import { createEventDispatcher } from 'svelte'; import { DropCollection, DropDatabase, OpenCollection, OpenConnection, OpenDatabase } from '../../../wailsjs/go/app/App'; import Grid from '../../components/grid.svelte'; + import { WindowSetTitle } from '../../../wailsjs/runtime'; export let hosts = {}; export let activeHostKey = ''; @@ -32,7 +33,7 @@ }); activeHostKey = hostKey; dispatch('connected', hostKey); - window.runtime.WindowSetTitle(`${hosts[activeHostKey].name} - Mongodup`); + WindowSetTitle(`${hosts[activeHostKey].name} - Mongodup`); } busy.end(); diff --git a/frontend/src/organisms/connection/index.svelte b/frontend/src/organisms/connection/index.svelte index fa6eb35..752ce8a 100644 --- a/frontend/src/organisms/connection/index.svelte +++ b/frontend/src/organisms/connection/index.svelte @@ -1,6 +1,7 @@