diff --git a/v2/internal/runtime/js/core/dialog.js b/v2/internal/runtime/js/core/dialog.js index 564c12a7e..3d09594d7 100644 --- a/v2/internal/runtime/js/core/dialog.js +++ b/v2/internal/runtime/js/core/dialog.js @@ -12,7 +12,6 @@ The lightweight framework for web-like apps import { SendMessage } from 'ipc'; - /** * Open a dialog with the given parameters * @@ -20,5 +19,5 @@ import { SendMessage } from 'ipc'; * @param {object} options */ export function Open(options) { - SendMessage('DO', JSON.stringify(options)); + SendMessage('DO'+JSON.stringify(options)); } diff --git a/v2/test/kitchensink/dialog.go b/v2/test/kitchensink/dialog.go new file mode 100644 index 000000000..5893d3856 --- /dev/null +++ b/v2/test/kitchensink/dialog.go @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + + wails "github.com/wailsapp/wails/v2" + "github.com/wailsapp/wails/v2/pkg/options" +) + +// Dialog struct +type Dialog struct { + runtime *wails.Runtime +} + +// WailsInit is called at application startup +func (l *Dialog) WailsInit(runtime *wails.Runtime) error { + // Perform your setup here + l.runtime = runtime + return nil +} + +// Open Dialog +func (l *Dialog) Open(options *options.OpenDialog) []string { + fmt.Printf("%#v\n", options) + // Perform your setup here + return l.runtime.Dialog.Open(options) +} diff --git a/v2/test/kitchensink/frontend/package-lock.json b/v2/test/kitchensink/frontend/package-lock.json index 39ec4f970..19eafc399 100644 --- a/v2/test/kitchensink/frontend/package-lock.json +++ b/v2/test/kitchensink/frontend/package-lock.json @@ -135,9 +135,9 @@ } }, "@wails/runtime": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@wails/runtime/-/runtime-1.0.10.tgz", - "integrity": "sha512-YXIBJOT0G09YwVhRA2GJoHkwr8uEnk8kvviu5jUiq8XLFnAB2Ff+9rgVLoae+Zyi+bdTxTypYKUbpxUiF6ZkDA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@wails/runtime/-/runtime-1.1.0.tgz", + "integrity": "sha512-9YmFyIYgu5R1eaodusTYVQV/p+jSygnofr2ezAqI7/oDBHHWraS7hEePM1hbego+2podkzSQ+f48bfXtSPyHFQ==", "dev": true }, "alphanum-sort": { @@ -1470,9 +1470,9 @@ "dev": true }, "nanoid": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", - "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", + "version": "3.1.15", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.15.tgz", + "integrity": "sha512-n8rXUZ8UU3lV6+43atPrSizqzh25n1/f00Wx1sCiE7R1sSHytZLTTiQl8DjC4IDLOnEZDlgJhy0yO4VsIpMxow==", "dev": true }, "neo-async": { @@ -1651,14 +1651,14 @@ "dev": true }, "postcss": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.1.2.tgz", - "integrity": "sha512-mToqEVFq8jF9TFhlIK4HhE34zknFJuNTgqtsr60vUvrWn+9TIYugCwiV1JZRxCuOrej2jjstun1bn4Bc7/1HkA==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.1.3.tgz", + "integrity": "sha512-AKsHGqd7HmXmL/EgyAjI4Gx719A5yQdt9HzyXrI8M/hzxfumecYS95kfvIt40UZqPVNoEt0Va1M3PG54XtNPbg==", "dev": true, "requires": { "colorette": "^1.2.1", "line-column": "^1.0.2", - "nanoid": "^3.1.12", + "nanoid": "^3.1.15", "source-map": "^0.6.1" } }, @@ -3429,9 +3429,9 @@ } }, "svelte-preprocess": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.5.1.tgz", - "integrity": "sha512-fZiLMg+mJzp5y4bsvBtl6wE1WCp+s5L87BoKMONGLXk8HSZD5HuRJzxhM0yhM9LHF0jP5kYG22P2Vc/vrv4I0A==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.5.2.tgz", + "integrity": "sha512-ClUX5NecnGBwI+nJnnBvKKy0XutCq5uHTIKe6cPhpvuOj9AAnyvef9wOZAE93yr85OKPutGCNIJa/X1TrJ7O0Q==", "dev": true, "requires": { "@types/pug": "^2.0.4", diff --git a/v2/test/kitchensink/frontend/package.json b/v2/test/kitchensink/frontend/package.json index eb4885373..181007198 100644 --- a/v2/test/kitchensink/frontend/package.json +++ b/v2/test/kitchensink/frontend/package.json @@ -11,10 +11,10 @@ "@rollup/plugin-commonjs": "^11.0.0", "@rollup/plugin-node-resolve": "^7.0.0", "@rollup/plugin-url": "^5.0.1", - "@wails/runtime": "^1.0.10", + "@wails/runtime": "^1.1.0", "focus-visible": "^5.2.0", "halfmoon": "^1.1.1", - "postcss": "^8.1.2", + "postcss": "^8.1.3", "postcss-import": "^12.0.1", "rollup": "^2.32.1", "rollup-plugin-livereload": "^1.0.0", @@ -25,7 +25,7 @@ "sirv-cli": "^0.4.4", "svelte": "^3.29.4", "svelte-highlight": "^0.6.2", - "svelte-preprocess": "^4.5.1" + "svelte-preprocess": "^4.5.2" }, "dependencies": {} } diff --git a/v2/test/kitchensink/frontend/src/components/CodeSnippet.svelte b/v2/test/kitchensink/frontend/src/components/CodeSnippet.svelte index 21e20dfc9..8b566f8ab 100644 --- a/v2/test/kitchensink/frontend/src/components/CodeSnippet.svelte +++ b/v2/test/kitchensink/frontend/src/components/CodeSnippet.svelte @@ -18,7 +18,7 @@ -
runtime.Dialog
component.
+
+