wails icon indicating copy to clipboard operation
wails copied to clipboard

JS Helper library

Open SheetJSDev opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

API library e.g. @wails/api that addresses common use cases. It does not need to be added to every app.

For example, showing messages is a common problem. Normally JS developers would use alert but that does not work in all environments. The current workaround is to dig into Go.

Ideally there would be an official library like

import { Dialog } from "@wails/api";

await Dialog.message("world", { title: "Hello", type: "info" });

Describe alternatives you've considered

No response

Additional context

No response

SheetJSDev avatar Aug 31 '22 19:08 SheetJSDev

Dialogs are available in the Runtime: https://wails.io/docs/next/reference/runtime/dialog. They're just not ported to JS yet.

leaanthony avatar Aug 31 '22 21:08 leaanthony

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 02 '22 02:11 stale[bot]

@SheetJSDev do you think this is still needed or will enhancing the current JS runtime suffice?

leaanthony avatar Nov 12 '22 20:11 leaanthony