webui-dev / nim-webui

Use any web browser as GUI, with Nim in the backend and HTML5 in the frontend.
https://webui.me
MIT License
130 stars 9 forks source link

Update to WebUI v2.1.0 #7

Closed hassandraga closed 1 year ago

hassandraga commented 1 year ago

New Features

Breaking code

hassandraga commented 1 year ago

Sorry, the commit has the wrong title, Update to WebUI v2.0.7. I changed it to Update to WebUI v2.1.0.

AlbertShown commented 1 year ago

LGTM.

neroist commented 1 year ago

Some of the core functions such as _webui_browser_start_vivaldi still need to be wrapped.

AlbertShown commented 1 year ago

I just wanted to let you know that you don't need to. The function show(content); will handle everything now.

show("<html>Hello</html>"); -> Show as HTML content. show("index.html"); -> Show as a file. show("second.html"); -> Navigate (Refresh).

AlbertShown commented 1 year ago

The browser's order is like this now.

AlbertShown commented 1 year ago

Usually, all function that starts with _webui_xxx does not need to be care of by the wrappers.

neroist commented 1 year ago

I know that, but I would still like them to be available, however.

hassandraga commented 1 year ago

I know that, but I would still like them to be available, however.

Of course, that will be great. Something like showBrowser(content: string; browser: cuint).

showBrowser("<html>Hello World</html>", BrowserChrome);
showBrowser("index.html", BrowserFirefox);
hassandraga commented 1 year ago

This PR LGTM.