diff --git a/website/.vscode/settings.json b/website/.vscode/settings.json index ad8a4794e5b..f4441702d5a 100644 --- a/website/.vscode/settings.json +++ b/website/.vscode/settings.json @@ -2,4 +2,19 @@ "[mdx]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[css]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, } \ No newline at end of file diff --git a/website/blog/2021-09-27-v2-beta1-release-notes.mdx b/website/blog/2021-09-27-v2-beta1-release-notes.mdx index 14f73e57721..406af1a55f8 100644 --- a/website/blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/blog/2021-09-27-v2-beta1-release-notes.mdx @@ -5,76 +5,86 @@ authors: [leaanthony] tags: [wails, v2] --- -
- +
-
- +
-When I first announced Wails on Reddit, just over 2 years ago from a train in Sydney, I did not expect it to get much -attention. A few days later, a prolific tech vlogger released a tutorial video, gave it a positive review and from that +When I first announced Wails on Reddit, just over 2 years ago from a train in Sydney, I did not expect it to get much +attention. A few days later, a prolific tech vlogger released a tutorial video, gave it a positive review and from that point on, interest in the project has skyrocketed. -It was clear that people were excited about adding web frontends to their Go projects, and almost immediately pushed the +It was clear that people were excited about adding web frontends to their Go projects, and almost immediately pushed the project beyond the proof of concept that I had created. -At the time, Wails used the [webview](https://github.com/webview/webview) project to handle the frontend, and the only -option for Windows was the IE11 renderer. Many bug reports were rooted in this limitation: poor JavaScript/CSS support -and no dev tools to debug it. This was a frustrating development experience but there wasn't much that could have been +At the time, Wails used the [webview](https://github.com/webview/webview) project to handle the frontend, and the only +option for Windows was the IE11 renderer. Many bug reports were rooted in this limitation: poor JavaScript/CSS support +and no dev tools to debug it. This was a frustrating development experience but there wasn't much that could have been done to rectify it. -For a long time, I'd firmly believed that Microsoft would eventually have to sort out their browser situation. -The world was moving on, frontend development was booming and IE wasn't cutting it. -When Microsoft announced the move to using Chromium as the basis for their new browser direction, I knew it was only a +For a long time, I'd firmly believed that Microsoft would eventually have to sort out their browser situation. +The world was moving on, frontend development was booming and IE wasn't cutting it. +When Microsoft announced the move to using Chromium as the basis for their new browser direction, I knew it was only a matter of time until Wails could use it, and move the Windows developer experience to the next level. -Today, I am pleased to announce: **Wails v2 Beta for Windows**! There's a huge amount to unpack in this release, so +Today, I am pleased to announce: **Wails v2 Beta for Windows**! There's a huge amount to unpack in this release, so grab a drink, take a seat and we'll begin... ### No CGO Dependency! -No, I'm not joking: *No* *CGO* *dependency* 🀯! The thing about Windows is that, unlike MacOS and Linux, it doesn't +No, I'm not joking: _No_ _CGO_ _dependency_ 🀯! The thing about Windows is that, unlike MacOS and Linux, it doesn't come with a default compiler. In addition, CGO requires a mingw compiler and there's a ton of different installation -options. Removing the CGO requirement has massively simplified setup, as well as making debugging an awful lot easier. -Whilst I have put a fair bit of effort in getting this working, the majority of the +options. Removing the CGO requirement has massively simplified setup, as well as making debugging an awful lot easier. +Whilst I have put a fair bit of effort in getting this working, the majority of the credit should go to [John Chadwick](https://github.com/jchv) for not only starting a couple of projects to make this -possible, but also being open to someone taking those projects and building on them. Credit also to +possible, but also being open to someone taking those projects and building on them. Credit also to [Tad Vizbaras](https://github.com/tadvi) whose [winc](https://github.com/tadvi/winc) project started me down this path. ### WebView2 Chromium Renderer
- +
-
+
Finally, Windows developers get a first class rendering engine for their applications! Gone are the days of contorting your frontend code to work on Windows. On top of that, you get a first-class developer tools experience! The WebView2 component does, however, have a requirement to have the `WebView2Loader.dll` sitting alongside the binary. -This makes distribution just that little bit more painful than we gophers are used to. All solutions and libraries -(that I know of) that use WebView2 have this dependency. +This makes distribution just that little bit more painful than we gophers are used to. All solutions and libraries +(that I know of) that use WebView2 have this dependency. -However, I'm really excited to announce that Wails applications *have no such requirement*! Thanks to the wizardry of +However, I'm really excited to announce that Wails applications _have no such requirement_! Thanks to the wizardry of [John Chadwick](https://github.com/jchv), we are able to bundle this dll inside the binary and get Windows to load it -as if it were present on disk. +as if it were present on disk. Gophers rejoice! The single binary dream lives on! ### New Features
- +
-
+
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available -and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus +and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators. -There were a huge number of requests in v1 for the ability to have greater control of the window itself. -I'm happy to announce that there's new runtime APIs specifically for this. -It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native +There were a huge number of requests in v1 for the ability to have greater control of the window itself. +I'm happy to announce that there's new runtime APIs specifically for this. +It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs. There is now the option to generate IDE configuration along with your project. This means that if you open your project @@ -82,32 +92,39 @@ in a supported IDE, it will already be configured for building and debugging you but we hope to support other IDEs such as Goland soon.
- +
-
+
-### No requirement to bundle assets +### No requirement to bundle assets -A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to -announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an -`` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS. +A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to +announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an +`` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS. > Wow, that sounds like a webserver... -Yes, it works just like a webserver, except it isn't. +Yes, it works just like a webserver, except it isn't. > So how do I include my assets? -You just pass a single `embed.FS` that contains all your assets into your application configuration. -They don't even need to be in the top directory - Wails will just work it out for you. +You just pass a single `embed.FS` that contains all your assets into your application configuration. +They don't even need to be in the top directory - Wails will just work it out for you. ### New Development Experience
- +
-
- +
Now that assets don't need to be bundled, it's enabled a whole new development experience. The new `wails dev` command will build and run your application, but instead of using the assets in the `embed.FS`, it loads them directly @@ -115,65 +132,69 @@ from disk. It also provides the additional features: - - Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend - - Auto rebuild - Any changes to your Go code will rebuild and relaunch your application +- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend +- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application -In addition to this, a webserver will start on port 34115. This will serve your application to any browser that +In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend -and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the +and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. -In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides -JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models +In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides +JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! ### Remote Templates
- +
-
+
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very -opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty +opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather -than rely on the Wails project. So now you can create projects using community supported templates! I hope this will -inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer +than rely on the Wails project. So now you can create projects using community supported templates! I hope this will +inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create! ### In Conclusion -Wails v2 represents a new foundation for the project. -The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. +Wails v2 represents a new foundation for the project. +The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome. Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board. -There were many twists and turns, pivots and u-turns to get to this point. This was due partly to early technical decisions -that needed changing, and partly because some core problems we had spent time building workarounds for were fixed upstream: -Go’s embed feature is a good example. Fortunately, everything came together at the right time, and today we have the -very best solution that we can have. I believe the wait has been worth it - this would not have been possible even 2 +There were many twists and turns, pivots and u-turns to get to this point. This was due partly to early technical decisions +that needed changing, and partly because some core problems we had spent time building workarounds for were fixed upstream: +Go’s embed feature is a good example. Fortunately, everything came together at the right time, and today we have the +very best solution that we can have. I believe the wait has been worth it - this would not have been possible even 2 months ago. I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist: -- [Misitebao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder. +- [Misitebao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder. - [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version we have today possible. - [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails. - [Mat Ryer](https://github.com/matryer) - His support, encouragement and feedback has really helped drive the project forward. -And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), +And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes. -I look forward to seeing what people build with Wails in this next exciting phase of the project! +I look forward to seeing what people build with Wails in this next exciting phase of the project! Lea. diff --git a/website/blog/2021-11-08-v2-beta2-release-notes.mdx b/website/blog/2021-11-08-v2-beta2-release-notes.mdx index fcde9ede694..96d1c8ef7c2 100644 --- a/website/blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/blog/2021-11-08-v2-beta2-release-notes.mdx @@ -5,11 +5,14 @@ authors: [leaanthony] tags: [wails, v2] --- -
- +
-
+
Today marks the first beta release of Wails v2 for Mac! It's taken quite a while to get to this point and I'm hoping that today's release will give you something that's reasonably useful. There have been a number of twists and turns @@ -25,42 +28,46 @@ So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windo ### New Features
- +
-
+
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available -and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus +and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators. -There were a huge number of requests in v1 for the ability to have greater control of the window itself. -I'm happy to announce that there's new runtime APIs specifically for this. -It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native +There were a huge number of requests in v1 for the ability to have greater control of the window itself. +I'm happy to announce that there's new runtime APIs specifically for this. +It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs. ### Mac Specific Options In addition to the normal application options, Wails v2 for Mac also brings some Mac extras: - - Make your window all funky and translucent, like all the pretty swift apps! - - Highly customisable titlebar - - We support the NSAppearance options for the application - - Simple config to auto-create an "About" menu +- Make your window all funky and translucent, like all the pretty swift apps! +- Highly customisable titlebar +- We support the NSAppearance options for the application +- Simple config to auto-create an "About" menu -### No requirement to bundle assets +### No requirement to bundle assets -A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to -announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an -`` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS. +A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to +announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an +`` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS. > Wow, that sounds like a webserver... -Yes, it works just like a webserver, except it isn't. +Yes, it works just like a webserver, except it isn't. > So how do I include my assets? -You just pass a single `embed.FS` that contains all your assets into your application configuration. -They don't even need to be in the top directory - Wails will just work it out for you. +You just pass a single `embed.FS` that contains all your assets into your application configuration. +They don't even need to be in the top directory - Wails will just work it out for you. ### New Development Experience @@ -70,38 +77,42 @@ from disk. It also provides the additional features: - - Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend - - Auto rebuild - Any changes to your Go code will rebuild and relaunch your application +- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend +- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application -In addition to this, a webserver will start on port 34115. This will serve your application to any browser that +In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend -and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the +and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. -In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides -JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models +In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides +JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! ### Remote Templates
- +
-
+
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very -opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty +opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather -than rely on the Wails project. So now you can create projects using community supported templates! I hope this will -inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer +than rely on the Wails project. So now you can create projects using community supported templates! I hope this will +inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create! ### Native M1 Support @@ -110,33 +121,48 @@ Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wa builds:
- +
-
+
You can also specify `darwin/amd64` as a target too:
- +
-
+
Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
- +
-
+
### Cross Compilation to Windows Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
- +
-
- +
### WKWebView Renderer @@ -145,14 +171,14 @@ V1 relied on a (now deprecated) WebView component. V2 uses the most recent WKWeb ### In Conclusion As I'd said in the Windows release notes, Wails v2 represents a new foundation for the project. -The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. +The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome! Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board. -And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), +And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes. -I look forward to seeing what people build with Wails in this next exciting phase of the project! +I look forward to seeing what people build with Wails in this next exciting phase of the project! Lea. diff --git a/website/blog/2022-02-22-v2-beta3-release-notes.mdx b/website/blog/2022-02-22-v2-beta3-release-notes.mdx index 686c6b8c294..0bf3206817c 100644 --- a/website/blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/blog/2022-02-22-v2-beta3-release-notes.mdx @@ -5,11 +5,14 @@ authors: [leaanthony] tags: [wails, v2] --- -
- +
-
+
I'm pleased to finally announce that Wails v2 is now in beta for Linux! It is somewhat ironic that the very first experiments with v2 was on Linux and yet it has ended up as the last release. That being said, the v2 we have today @@ -18,33 +21,37 @@ is very different from those first experiments. So without further ado, let's go ### New Features
- +
-
+
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available -and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus +and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators. -There were a huge number of requests in v1 for the ability to have greater control of the window itself. -I'm happy to announce that there's new runtime APIs specifically for this. -It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native +There were a huge number of requests in v1 for the ability to have greater control of the window itself. +I'm happy to announce that there's new runtime APIs specifically for this. +It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs. ### No requirement to bundle assets -A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to -announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an -`` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS. +A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to +announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an +`` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS. > Wow, that sounds like a webserver... -Yes, it works just like a webserver, except it isn't. +Yes, it works just like a webserver, except it isn't. > So how do I include my assets? -You just pass a single `embed.FS` that contains all your assets into your application configuration. -They don't even need to be in the top directory - Wails will just work it out for you. +You just pass a single `embed.FS` that contains all your assets into your application configuration. +They don't even need to be in the top directory - Wails will just work it out for you. ### New Development Experience @@ -54,38 +61,42 @@ from disk. It also provides the additional features: - - Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend - - Auto rebuild - Any changes to your Go code will rebuild and relaunch your application +- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend +- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application -In addition to this, a webserver will start on port 34115. This will serve your application to any browser that +In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend -and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the +and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. -In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides -JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models +In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides +JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! ### Remote Templates
- +
-
+
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very -opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty +opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather -than rely on the Wails project. So now you can create projects using community supported templates! I hope this will -inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer +than rely on the Wails project. So now you can create projects using community supported templates! I hope this will +inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create! ### Cross Compilation to Windows @@ -93,15 +104,18 @@ community can create! Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
- +
-
- +
### In Conclusion As I'd said in the Windows release notes, Wails v2 represents a new foundation for the project. -The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. +The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome! Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board. @@ -111,7 +125,7 @@ filing detailed bug reports! Finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors) whose support drive the project in many ways behind the scenes. -I look forward to seeing what people build with Wails in this next exciting phase of the project! +I look forward to seeing what people build with Wails in this next exciting phase of the project! Lea. diff --git a/website/docs/community/showcase/emailit.mdx b/website/docs/community/showcase/emailit.mdx index d3ef849962c..7cb238a67a2 100644 --- a/website/docs/community/showcase/emailit.mdx +++ b/website/docs/community/showcase/emailit.mdx @@ -1,8 +1,8 @@ # EmailIt -

-
+

+ +

[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. - diff --git a/website/docs/community/showcase/encrypteasy.mdx b/website/docs/community/showcase/encrypteasy.mdx index 31d7b6ad5bb..8fd5e9e1e5c 100644 --- a/website/docs/community/showcase/encrypteasy.mdx +++ b/website/docs/community/showcase/encrypteasy.mdx @@ -1,8 +1,8 @@ - # EncryptEasy -

-
+

+ +

**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** diff --git a/website/docs/community/showcase/filehound.mdx b/website/docs/community/showcase/filehound.mdx index 687be3870b6..a557879e525 100644 --- a/website/docs/community/showcase/filehound.mdx +++ b/website/docs/community/showcase/filehound.mdx @@ -1,11 +1,10 @@ - # FileHound Export Utility -

-
+

+ +

- [FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. diff --git a/website/docs/community/showcase/minecraftupdater.mdx b/website/docs/community/showcase/minecraftupdater.mdx index 05a8e12bdc5..59f7350b23e 100644 --- a/website/docs/community/showcase/minecraftupdater.mdx +++ b/website/docs/community/showcase/minecraftupdater.mdx @@ -1,7 +1,10 @@ # Minecraft Updater -

-
+

+ +

[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/docs/community/showcase/modalfilemanager.mdx b/website/docs/community/showcase/modalfilemanager.mdx index f5016466bb7..a827108e29d 100644 --- a/website/docs/community/showcase/modalfilemanager.mdx +++ b/website/docs/community/showcase/modalfilemanager.mdx @@ -1,10 +1,12 @@ # Modal File Manager -

-
+

+ +

-[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. +[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. - diff --git a/website/docs/community/showcase/mollywallet.mdx b/website/docs/community/showcase/mollywallet.mdx index b752380280f..e30f37cc6e3 100644 --- a/website/docs/community/showcase/mollywallet.mdx +++ b/website/docs/community/showcase/mollywallet.mdx @@ -1,9 +1,8 @@ - # Molley Wallet -

-
+

+ +

[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. - diff --git a/website/docs/community/showcase/october.mdx b/website/docs/community/showcase/october.mdx index fbabff01e65..c67c7e845a8 100644 --- a/website/docs/community/showcase/october.mdx +++ b/website/docs/community/showcase/october.mdx @@ -1,11 +1,12 @@ # October -

-
+

+ +

[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. \ No newline at end of file +In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/docs/community/showcase/optimus.mdx b/website/docs/community/showcase/optimus.mdx index 36cbf2fdf8d..79537da8a26 100644 --- a/website/docs/community/showcase/optimus.mdx +++ b/website/docs/community/showcase/optimus.mdx @@ -1,9 +1,8 @@ - # Optimus -

-
+

+ +

[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. - diff --git a/website/docs/community/showcase/portfall.mdx b/website/docs/community/showcase/portfall.mdx index 2110094249d..8d149668b64 100644 --- a/website/docs/community/showcase/portfall.mdx +++ b/website/docs/community/showcase/portfall.mdx @@ -1,9 +1,8 @@ - # Portfall -

-
+

+ +

[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs - diff --git a/website/docs/community/showcase/restic-browser.mdx b/website/docs/community/showcase/restic-browser.mdx index 5642bb29885..1505ce07a48 100644 --- a/website/docs/community/showcase/restic-browser.mdx +++ b/website/docs/community/showcase/restic-browser.mdx @@ -1,11 +1,10 @@ - # Restic Browser -

-
+

+ +

[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. - - - diff --git a/website/docs/community/showcase/riftshare.mdx b/website/docs/community/showcase/riftshare.mdx index 59680bdb3a3..5223e88cff8 100644 --- a/website/docs/community/showcase/riftshare.mdx +++ b/website/docs/community/showcase/riftshare.mdx @@ -1,19 +1,19 @@ - # RiftShare -

-
+

+ +

Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) ## Features -* Easy secure file sharing between computers both in the local network and through the internet -* Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -* Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -* Automatic zipping of multiple selected files to send at once -* Full animations, progress bar, and cancellation support for sending and receiving -* Native OS File Selection -* Open files in one click once received -* Auto Update - don't worry about having the latest release! +- Easy secure file sharing between computers both in the local network and through the internet +- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) +- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) +- Automatic zipping of multiple selected files to send at once +- Full animations, progress bar, and cancellation support for sending and receiving +- Native OS File Selection +- Open files in one click once received +- Auto Update - don't worry about having the latest release! diff --git a/website/docs/community/showcase/scriptbar.mdx b/website/docs/community/showcase/scriptbar.mdx index cb5b373eaba..ab849b6b8fc 100644 --- a/website/docs/community/showcase/scriptbar.mdx +++ b/website/docs/community/showcase/scriptbar.mdx @@ -1,7 +1,8 @@ # ScriptBar -

-
+

+ +

[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/docs/community/showcase/surge.mdx b/website/docs/community/showcase/surge.mdx index b1693a6dec4..2d895dc29fa 100644 --- a/website/docs/community/showcase/surge.mdx +++ b/website/docs/community/showcase/surge.mdx @@ -1,9 +1,8 @@ - # Surge -

-
+

+ +

[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. - diff --git a/website/docs/community/showcase/wally.mdx b/website/docs/community/showcase/wally.mdx index 3e842af4016..ebe5a703fd9 100644 --- a/website/docs/community/showcase/wally.mdx +++ b/website/docs/community/showcase/wally.mdx @@ -1,9 +1,8 @@ - # Wally -

-
+

+ +

[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. - diff --git a/website/docs/community/showcase/wombat.mdx b/website/docs/community/showcase/wombat.mdx index 8fdbe7cd82b..8c8c8ce0f2f 100644 --- a/website/docs/community/showcase/wombat.mdx +++ b/website/docs/community/showcase/wombat.mdx @@ -1,10 +1,8 @@ - # Wombat -

-
+

+ +

- [Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. - diff --git a/website/docs/community/showcase/ytd.mdx b/website/docs/community/showcase/ytd.mdx index 7ccd32e26b9..6161755a7b0 100644 --- a/website/docs/community/showcase/ytd.mdx +++ b/website/docs/community/showcase/ytd.mdx @@ -1,10 +1,8 @@ - # Ytd -

-
+

+ +

- [Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. - diff --git a/website/docs/contributing/developing-new-features.mdx b/website/docs/contributing/developing-new-features.mdx index 1aa5ea145ab..513da220d41 100644 --- a/website/docs/contributing/developing-new-features.mdx +++ b/website/docs/contributing/developing-new-features.mdx @@ -8,19 +8,19 @@ We are always keen to add features to Wails and expand on what the project can d The process for adding new features are as follows: - Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current -[Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. + [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. - Before developing, check that the ticket includes the following information: - The purpose of the enhancement - What is out of scope for the enhancement - What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason) - If the ticket does not include this information, feel free to request the information from the -person who opened the ticket. Sometimes placeholder tickets are created and require more details + person who opened the ticket. Sometimes placeholder tickets are created and require more details - Comment on the ticket stating you wish to develop the feature - Clone the repository and create a branch with the format `feature/_` - New features often require documentation so please ensure you have also added or updated the documentation as part of -the changes + the changes - Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and -test cases listed with checkmarks, so that others can know what still needs to be tested. + test cases listed with checkmarks, so that others can know what still needs to be tested. - Once all the testing is completed, please update the status of the PR from draft and leave a message. :::note @@ -32,4 +32,3 @@ on the ticket first. :::warning Any PRs opened without a corresponding ticket may be rejected. ::: - diff --git a/website/docs/contributing/documenting.mdx b/website/docs/contributing/documenting.mdx index 1655a44fe71..a035a4b7b3e 100644 --- a/website/docs/contributing/documenting.mdx +++ b/website/docs/contributing/documenting.mdx @@ -8,7 +8,7 @@ This website is also the main documentation site for the project. Sometimes this out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the -project, it's *as important* as the code. +project, it's _as important_ as the code. We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site @@ -37,3 +37,10 @@ the documents in the `versioned_docs` or `versioned_sidebars` directories. The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. +## Languages + +The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. + +### Add new language + +If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation. diff --git a/website/docs/contributing/fixing-bugs.mdx b/website/docs/contributing/fixing-bugs.mdx index 7e1c78ad37b..d083267c46a 100644 --- a/website/docs/contributing/fixing-bugs.mdx +++ b/website/docs/contributing/fixing-bugs.mdx @@ -10,14 +10,14 @@ The process for fixing bugs are as follows: - Before developing, check that the ticket includes the following information: - The scope of the issue including platforms affected - The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to -prove that it is a Wails issue with a minimal reproducible example + prove that it is a Wails issue with a minimal reproducible example - The output of `wails doctor` - If the ticket does not include this information, feel free to request the information from the -person who opened the ticket. + person who opened the ticket. - Comment on the ticket stating you wish to develop a fix - Clone the repository and create a branch with the format `bugfix/_` - Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and -test cases listed with checkmarks, so that others can know what still needs to be tested. + test cases listed with checkmarks, so that others can know what still needs to be tested. - Once all the testing is completed, please update the status of the PR from draft and leave a message. :::note @@ -27,4 +27,4 @@ bugfixes should be discussed as the approach may have unintended side effects. :::warning Any PRs opened without a corresponding ticket may be rejected. -::: \ No newline at end of file +::: diff --git a/website/docs/contributing/setting-up-a-dev-environment.mdx b/website/docs/contributing/setting-up-a-dev-environment.mdx index b5cfd8eca4c..92cb9d73806 100644 --- a/website/docs/contributing/setting-up-a-dev-environment.mdx +++ b/website/docs/contributing/setting-up-a-dev-environment.mdx @@ -31,4 +31,3 @@ On 'nix: To revert back to a stable version, run: `go install github.com/wailsapp/wails/v2/cmd/wails@latest` - diff --git a/website/docs/contributing/ways-of-contributing.mdx b/website/docs/contributing/ways-of-contributing.mdx index cfe50b654fb..a06bf83014f 100644 --- a/website/docs/contributing/ways-of-contributing.mdx +++ b/website/docs/contributing/ways-of-contributing.mdx @@ -19,4 +19,4 @@ There are many ways to contribute to the project: Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) -discussion. \ No newline at end of file +discussion. diff --git a/website/docs/gettingstarted/building.mdx b/website/docs/gettingstarted/building.mdx index f40605490b4..062c2e1e899 100644 --- a/website/docs/gettingstarted/building.mdx +++ b/website/docs/gettingstarted/building.mdx @@ -10,10 +10,12 @@ This will compile your project and save the production-ready binary in the `buil If you run the binary, you should see the default application:
- +
-
- +
For more details on compilation options, please refer to the [CLI Reference](../reference/cli.mdx#build). - diff --git a/website/docs/gettingstarted/development.mdx b/website/docs/gettingstarted/development.mdx index 323e90ba973..54dda5faa3c 100644 --- a/website/docs/gettingstarted/development.mdx +++ b/website/docs/gettingstarted/development.mdx @@ -6,11 +6,11 @@ sidebar_position: 5 You can run your application in development mode by running `wails dev` from your project directory. This will do the following things: - - Build your application and run it - - Bind your Go code to the frontend so it can be called from Javascript - - Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change - - Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console +- Build your application and run it +- Bind your Go code to the frontend so it can be called from Javascript +- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change +- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev). -Coming soon: Tutorial \ No newline at end of file +Coming soon: Tutorial diff --git a/website/docs/gettingstarted/firstproject.mdx b/website/docs/gettingstarted/firstproject.mdx index f68643a2fba..883b3dde6f5 100644 --- a/website/docs/gettingstarted/firstproject.mdx +++ b/website/docs/gettingstarted/firstproject.mdx @@ -11,6 +11,7 @@ Now that the CLI is installed, you can generate a new project by using the `wail Pick your favourite framework: + import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; @@ -29,17 +30,21 @@ import TabItem from "@theme/TabItem"; Generate a Svelte project using Javascript with:

wails init -n myproject -t svelte + If you would rather use Typescript:
wails init -n myproject -t svelte-ts + Generate a React project using Javascript with:

wails init -n myproject -t react + If you would rather use Typescript:
wails init -n myproject -t react-ts +
Generate a Vue project using Javascript with:

@@ -49,6 +54,7 @@ If you would rather use Typescript:
If you would rather use Typescript:
wails init -n myproject -t vue-ts +
Generate a Preact project using Javascript with:

@@ -58,6 +64,7 @@ If you would rather use Typescript:
If you would rather use Typescript:
wails init -n myproject -t preact-ts +
Generate a Lit project using Javascript with:

@@ -67,6 +74,7 @@ If you would rather use Typescript:
If you would rather use Typescript:
wails init -n myproject -t lit-ts +
Generate a Vanilla project using Javascript with:

@@ -76,12 +84,13 @@ If you would rather use Typescript:
If you would rather use Typescript:
wails init -n myproject -t vanilla-ts +
-
+
There are also [community templates](../community/templates.mdx) available that offer different capabilities and frameworks. diff --git a/website/docs/gettingstarted/installation.mdx b/website/docs/gettingstarted/installation.mdx index c4c7a19bd54..98d3032cd9e 100644 --- a/website/docs/gettingstarted/installation.mdx +++ b/website/docs/gettingstarted/installation.mdx @@ -43,34 +43,37 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; - - Wails requires that the xcode command line tools are installed. This can be done by running:
- xcode-select --install -
- - Wails requires that the WebView2{" "} - runtime is installed. Some Windows installations will already have this installed. You can check using - the{" "} - wails doctor command (see below). - - - Linux required the standard gcc build tools - plus libgtk3 and libwebkit. - Rather than list a ton of commands for different distros, Wails can try to determine - what the installation commands are for your specific distribution. Run wails doctor after - installation - to be shown how to install the dependencies. - If your distro/package manager is not supported, please consult the {" "} - Add Linux Distro guide. - + + Wails requires that the xcode command line tools are installed. This can be + done by running:
+ xcode-select --install +
+ + Wails requires that the{" "} + + WebView2 + {" "} + runtime is installed. Some Windows installations will already have this + installed. You can check using the wails doctor command (see + below). + + + Linux required the standard gcc build tools plus{" "} + libgtk3 and libwebkit. Rather than list a ton of + commands for different distros, Wails can try to determine what the + installation commands are for your specific distribution. Run{" "} + wails doctor after installation to be shown how to install the + dependencies. If your distro/package manager is not supported, please + consult the{" "} + Add Linux Distro guide. +
@@ -92,4 +95,4 @@ Running `wails doctor` will check if you have the correct dependencies installed If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment -made by the installer are reflected at the command prompt. \ No newline at end of file +made by the installer are reflected at the command prompt. diff --git a/website/docs/guides/application-development.mdx b/website/docs/guides/application-development.mdx index 13b1b738258..f8074d1503b 100644 --- a/website/docs/guides/application-development.mdx +++ b/website/docs/guides/application-development.mdx @@ -1,4 +1,3 @@ - # Application Development There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. @@ -145,8 +144,6 @@ func main() { } ``` - - More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). ## Application Menu diff --git a/website/docs/guides/bleeding-edge.mdx b/website/docs/guides/bleeding-edge.mdx index 292b9d5231c..a44a155de4c 100644 --- a/website/docs/guides/bleeding-edge.mdx +++ b/website/docs/guides/bleeding-edge.mdx @@ -1,4 +1,3 @@ - # Bleeding Edge ## Overview diff --git a/website/docs/guides/dynamic-assets.mdx b/website/docs/guides/dynamic-assets.mdx index fd6b9179898..836d2470315 100644 --- a/website/docs/guides/dynamic-assets.mdx +++ b/website/docs/guides/dynamic-assets.mdx @@ -79,6 +79,7 @@ DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler Requesting file: favicon.ico ``` + As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. @@ -88,36 +89,45 @@ this feature out by typing the following into the console: ``` let response = await fetch('does-not-exist.txt'); ``` + This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler:

- +

However, if we request `go.mod`, we will see the following output:

- +

This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: + ```html - + ``` + with: + ```html - + ``` + Then we would see the following:

- +

:::warning Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access to your filesystem. ::: - diff --git a/website/docs/guides/frameless.mdx b/website/docs/guides/frameless.mdx index 7c22b66d379..3192b16461f 100644 --- a/website/docs/guides/frameless.mdx +++ b/website/docs/guides/frameless.mdx @@ -1,19 +1,19 @@ - # Frameless Applications Wails supports applications with no frame. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - :::warning The `data-wails-drag` attribute is being deprecated in favour of the following CSS style: `style="--wails-draggable:drag"`. You can use `style="--wails-draggable:no-drag"` to disable the drag behaviour. For this release only, you can test this by setting the following application option: + ```go Experimental: &options.Experimental{ UseCSSDrag: true, }, ``` + ::: Wails offers a simple solution for dragging the window: Any HTML element that has the attribute "data-wails-drag" will @@ -43,5 +43,5 @@ The `
` is tagged as being not draggable. ``` :::info Fullscreen - If you allow your application to go fullscreen, this drag functionality will be disabled. +If you allow your application to go fullscreen, this drag functionality will be disabled. ::: diff --git a/website/docs/guides/frontend.mdx b/website/docs/guides/frontend.mdx index 6c9d0cf2721..1384087da95 100644 --- a/website/docs/guides/frontend.mdx +++ b/website/docs/guides/frontend.mdx @@ -1,4 +1,3 @@ - # Frontend ## Script Injection @@ -10,24 +9,23 @@ The code below shows where these are injected by default: ```html - - injection example - - - - - - - -
Please enter your name below πŸ‘‡
-
- - -
- - - - + + injection example + + + + + + + +
Please enter your name below πŸ‘‡
+
+ + +
+ + + ``` @@ -36,16 +34,16 @@ The code below shows where these are injected by default: To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: ```html - + ``` The options are as follows: -| Value | Description | -| -------------------- | ------------------------------------------------- | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | +| Value | Description | +| ------------------- | ------------------------------------------------ | +| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | +| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | +| noautoinject | Disable all autoinjection of scripts | Multiple options may be used provided they are comma seperated. @@ -53,25 +51,23 @@ This code is perfectly valid and operates the same as the autoinjection version: ```html - - - injection example - - - - - - -
Please enter your name below πŸ‘‡
-
- - -
- - - - - - + + injection example + + + + + + +
Please enter your name below πŸ‘‡
+
+ + +
+ + + + + -``` \ No newline at end of file +``` diff --git a/website/docs/guides/ides.mdx b/website/docs/guides/ides.mdx index 14adde0d0fc..0591cf1b675 100644 --- a/website/docs/guides/ides.mdx +++ b/website/docs/guides/ides.mdx @@ -8,7 +8,10 @@ Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but a ## Visual Studio Code

- +

When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. @@ -18,36 +21,44 @@ The 2 files generated are `tasks.json` and `launch.json`. Below are the files ge ```json title="tasks.json" { - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/myproject.exe"] - }, - ] + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}" + }, + "command": "go", + "args": [ + "build", + "-tags", + "dev", + "-gcflags", + "all=-N -l", + "-o", + "build/bin/myproject.exe" + ] + } + ] } ``` ```json title="launch.json" { - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - }, - ] + "version": "0.2.0", + "configurations": [ + { + "name": "Wails: Debug myproject", + "type": "go", + "request": "launch", + "mode": "exec", + "program": "${workspaceFolder}/build/bin/myproject.exe", + "preLaunchTask": "build", + "cwd": "${workspaceFolder}", + "env": {} + } + ] } ``` @@ -59,51 +70,55 @@ add the install and build steps: ```json title="tasks.json" { - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/vscode.exe"], - "dependsOn":[ - "npm install", - "npm run build" - ] - - }, - ] + "version": "2.0.0", + "tasks": [ + { + "label": "npm install", + "type": "npm", + "script": "install", + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "presentation": { + "clear": true, + "panel": "shared", + "showReuseMessage": false + }, + "problemMatcher": [] + }, + { + "label": "npm run build", + "type": "npm", + "script": "build", + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "presentation": { + "clear": true, + "panel": "shared", + "showReuseMessage": false + }, + "problemMatcher": [] + }, + { + "label": "build", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}" + }, + "command": "go", + "args": [ + "build", + "-tags", + "dev", + "-gcflags", + "all=-N -l", + "-o", + "build/bin/vscode.exe" + ], + "dependsOn": ["npm install", "npm run build"] + } + ] } ``` @@ -111,4 +126,4 @@ add the install and build steps: In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. -::: \ No newline at end of file +::: diff --git a/website/docs/guides/linux-distro-support.mdx b/website/docs/guides/linux-distro-support.mdx index db9dde55a94..5ec628f2e64 100644 --- a/website/docs/guides/linux-distro-support.mdx +++ b/website/docs/guides/linux-distro-support.mdx @@ -1,4 +1,3 @@ - # Linux Distro Support ## Overview @@ -95,6 +94,7 @@ type PackageManager interface { InstallCommand(*Package) string } ``` + - `Name()` should return the name of the package manager - `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies - `PackageInstalled()` should return `true` if the given package is installed @@ -105,4 +105,4 @@ Take a look at the other package managers code to get an idea how this works. :::info Remember If you add support for a new package manager, don't forget to also update this page! -::: \ No newline at end of file +::: diff --git a/website/docs/guides/linux.mdx b/website/docs/guides/linux.mdx index c23c0f348c9..fa74fe6cf86 100644 --- a/website/docs/guides/linux.mdx +++ b/website/docs/guides/linux.mdx @@ -1,20 +1,20 @@ - # Linux This page has miscellaneous guides related to developing Wails applications for Linux. ## Video tag doesn't fire "ended" event -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug +When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: ```js videoTag.addEventListener("timeupdate", (event) => { - if(event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}) + if (event.target.duration - event.target.currentTime < 0.2) { + let ended = new Event("ended"); + event.target.dispatchEvent(ended); + } +}); ``` -Source: [Lyimmi](https://github.com/Lyimmi) on the -[discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) \ No newline at end of file + +Source: [Lyimmi](https://github.com/Lyimmi) on the +[discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/docs/guides/manual-builds.mdx b/website/docs/guides/manual-builds.mdx index e3be40d0bab..41cbfd1dc49 100644 --- a/website/docs/guides/manual-builds.mdx +++ b/website/docs/guides/manual-builds.mdx @@ -1,4 +1,3 @@ - # Manual Builds The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. diff --git a/website/docs/guides/migrating.mdx b/website/docs/guides/migrating.mdx index 1474131f834..b0085993574 100644 --- a/website/docs/guides/migrating.mdx +++ b/website/docs/guides/migrating.mdx @@ -1,4 +1,3 @@ - # Migrating from v1 ## Overview @@ -184,23 +183,22 @@ The format of the file is slightly different. Here is a comparison:

-| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | +| v1 | v2 | Notes | +| ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | name | | +| description | | Removed | +| author / name | author / name | | +| author / email | author / email | | +| version | version | | +| binaryname | outputfilename | Changed | +| frontend / dir | | Removed | +| frontend / install | frontend:install | Changed | +| frontend / build | frontend:build | Changed | +| frontend / bridge | | Removed | +| frontend / serve | | Removed | +| tags | | Removed | +| | wailsjsdir | The directory to generate wailsjs modules | +| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | | | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. |

- diff --git a/website/docs/guides/mouse-buttons.mdx b/website/docs/guides/mouse-buttons.mdx index 0a3a4574004..5244ce0153d 100644 --- a/website/docs/guides/mouse-buttons.mdx +++ b/website/docs/guides/mouse-buttons.mdx @@ -1,12 +1,11 @@ # Mouse Buttons The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. -It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. +It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: ```javascript - -window.addEventListener('mousedown', handleMouseButtonDown); +window.addEventListener("mousedown", handleMouseButtonDown); function handleMouseButtonDown(event) { if (event.button === 0) { @@ -23,6 +22,6 @@ function handleMouseButtonDown(event) { // other mouse button } } - ``` + Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/docs/guides/overscroll.mdx b/website/docs/guides/overscroll.mdx index bbe593bc7b3..1383b2b584b 100644 --- a/website/docs/guides/overscroll.mdx +++ b/website/docs/guides/overscroll.mdx @@ -1,4 +1,3 @@ - # Overscroll [Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes @@ -6,6 +5,6 @@ get when you scroll beyond a page's content boundaries. This is common in mobile ```css body { - overscroll-behavior: none; + overscroll-behavior: none; } -``` \ No newline at end of file +``` diff --git a/website/docs/guides/routing.mdx b/website/docs/guides/routing.mdx index bdcd49b246c..c35cc1c8a4d 100644 --- a/website/docs/guides/routing.mdx +++ b/website/docs/guides/routing.mdx @@ -1,4 +1,3 @@ - # Routing Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. @@ -8,14 +7,14 @@ Routing is a popular way to switch views in an application. This page offers som The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): ```js -import { createRouter, createWebHashHistory } from 'vue-router' +import { createRouter, createWebHashHistory } from "vue-router"; const router = createRouter({ history: createWebHashHistory(), routes: [ //... ], -}) +}); ``` ## Angular @@ -23,7 +22,7 @@ const router = createRouter({ The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): ```ts -RouterModule.forRoot(routes, {useHash: true}) +RouterModule.forRoot(routes, { useHash: true }); ``` ## React @@ -34,14 +33,15 @@ The recommended approach for routing in React is [HashRouter](https://reactroute import { HashRouter } from "react-router-dom"; ReactDOM.render( - + {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - + + } exact /> + } /> + } /> + {/* more... */} + , - root); + root +); ``` diff --git a/website/docs/guides/signing.mdx b/website/docs/guides/signing.mdx index 3da981dfa8b..349ae123a94 100644 --- a/website/docs/guides/signing.mdx +++ b/website/docs/guides/signing.mdx @@ -4,17 +4,18 @@ This is a guide on how you can sign your binaries generated with Wails on MacOS The guide will target CI environments, more specifically GitHub Actions. ## Windows + First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. -It may be a good idea to check with your certificate provider -how to sign your binaries on your local machine before targeting automated build systems, just so you know if there -are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. +It may be a good idea to check with your certificate provider +how to sign your binaries on your local machine before targeting automated build systems, just so you know if there +are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to -troubleshoot any potential issues in a CI environment. +troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. @@ -22,6 +23,7 @@ Therefore this guide will focus on signing our app manually with PowerShell comm Action if you prefer. First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: + ```yaml name: "example" on: @@ -32,7 +34,7 @@ jobs: package: strategy: matrix: - platform: [ windows-latest, macos-latest ] + platform: [windows-latest, macos-latest] go-version: [1.18] runs-on: ${{ matrix.platform }} steps: @@ -66,23 +68,27 @@ jobs: ``` Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate -into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': +into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': + ```PowerShell certutil -encode .\my-cert.p12 my-cert-base64.txt ``` -You should now have your .txt file with the base64 encoded certificate. It should start with *-----BEGIN CERTIFICATE-----* and -end with *-----END CERTIFICATE-----*. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the +You should now have your .txt file with the base64 encoded certificate. It should start with _-----BEGIN CERTIFICATE-----_ and +end with _-----END CERTIFICATE-----_. Now you need to make two action secrets on GitHub. Navigate to _Settings -> Secrets -> Actions_ and create the two following secrets: -* **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -* **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. + +- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. +- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. Now we're ready to implement the signing in our workflow using one of the two methods: ### Method 1: signing with commands + This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. After the `"Build Wails app"` step, we can add the following step to our workflow: + ```yaml - name: Sign Windows binaries if: matrix.platform == 'windows-latest' @@ -95,13 +101,16 @@ After the `"Build Wails app"` step, we can add the following step to our workflo & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' ``` + This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: -* **signing algorithm**: usually sha256. -* **timestamping server**: URL to the timestamping server to use with your certificate. -* **path to binary**: path to the binary you want to sign. + +- **signing algorithm**: usually sha256. +- **timestamping server**: URL to the timestamping server to use with your certificate. +- **path to binary**: path to the binary you want to sign. Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: + ```yaml name: "example" on: @@ -112,7 +121,7 @@ jobs: package: strategy: matrix: - platform: [ windows-latest, macos-latest ] + platform: [windows-latest, macos-latest] go-version: [1.18] runs-on: ${{ matrix.platform }} steps: @@ -156,6 +165,7 @@ jobs: ``` ### Method 2: automatically signing with Action + It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). @@ -166,14 +176,16 @@ but note it requires a SHA1 hash for the certificate and a certificate name. Vie First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: + ```bash -base64 Certificates.p12 | pbcopy +base64 Certificates.p12 | pbcopy ``` Now you're ready to create some GitHub project secrets, just as with Windows: -* **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -* **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -* **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). + +- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. +- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. +- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: @@ -187,7 +199,7 @@ jobs: package: strategy: matrix: - platform: [ windows-latest, macos-latest ] + platform: [windows-latest, macos-latest] go-version: [1.18] runs-on: ${{ matrix.platform }} steps: @@ -220,61 +232,69 @@ jobs: path: build/bin/* ``` -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and -will be used in this guide. +For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and +will be used in this guide. After the `Build Wails app` step, add the following to the workflow: + ```yaml - name: MacOS download gon for code signing and app notarization if: matrix.platform == 'macos-latest' run: | brew install mitchellh/gon/gon -``` +``` Now we need to configure some gon config files in our `build/darwin` directory: 1. gon-sign.json: - ```json - { - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } + +```json +{ + "source": ["./build/bin/app.app"], + "bundle_id": "app.myapp", + "apple_id": { + "username": "my-appleid@email.com", + "password": "@env:APPLE_PASSWORD" + }, + "sign": { + "application_identity": "Developer ID Application: My Name" } - ``` - Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password - which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - ```bash - security find-identity -v -p codesigning - ``` +} +``` + +Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password +which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: + +```bash +security find-identity -v -p codesigning +``` + 2. entitlements.plist: - ```plist - + +```plist + - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - + com.apple.security.app-sandbox + + com.apple.security.network.client + + com.apple.security.network.server + + com.apple.security.files.user-selected.read-write + + com.apple.security.files.downloads.read-write + - ``` - In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). +``` -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. +In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). + +Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: + ```plist @@ -294,6 +314,7 @@ Here's an example `Info.plist` file: ``` Now we're ready to add the signing step in our workflow after building the Wails app: + ```yaml - name: Import Code-Signing Certificates for macOS if: matrix.platform == 'macos-latest' @@ -309,10 +330,13 @@ Now we're ready to add the signing step in our workflow after building the Wails echo "Signing Package" gon -log-level=info ./build/darwin/gon-sign.json ``` + Please note that signing binaries with Apple could take anywhere from minutes to hours. ## Combined workflow file: + Here is our GitHub workflow file with Windows + macOS combined: + ```yaml name: "example combined" on: @@ -323,7 +347,7 @@ jobs: package: strategy: matrix: - platform: [ windows-latest, macos-latest ] + platform: [windows-latest, macos-latest] go-version: [1.18] runs-on: ${{ matrix.platform }} steps: @@ -383,4 +407,5 @@ jobs: ``` # End notes -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). \ No newline at end of file + +This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/docs/guides/templates.mdx b/website/docs/guides/templates.mdx index 090cf8a9e89..923b10d6bfe 100644 --- a/website/docs/guides/templates.mdx +++ b/website/docs/guides/templates.mdx @@ -1,4 +1,3 @@ - # Templates Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were @@ -81,7 +80,10 @@ Renaming package-lock.json -> package-lock.tmpl.json... - You should have a fully functioning Vue3 application:
- +
## Publishing Templates diff --git a/website/docs/guides/troubleshooting.mdx b/website/docs/guides/troubleshooting.mdx index 90c7d78dcb8..4d4fb743997 100644 --- a/website/docs/guides/troubleshooting.mdx +++ b/website/docs/guides/troubleshooting.mdx @@ -18,6 +18,7 @@ something similar to the following code: //go:embed frontend/dist var assets embed.FS ``` + Check that `frontend/dist` contains your application assets. ### Mac @@ -39,7 +40,11 @@ Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 If your built application looks like this in finder:

- +

it''s likely that your application''s `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` @@ -49,45 +54,60 @@ the `build/darwin` directory. ## Cannot call backend method from frontend with variadic arguments If you have a backend method defined with variadic parameters, eg: + ```go func (a *App) TestFunc(msg string, args ...interface{}) error { // Code } ``` + calling this method from the frontend like this will fail: + ```js -var msg = "Hello: " -var args = ["Go", "JS"] -window.go.main.App.TestFunc(msg, ...args).then((result) => { +var msg = "Hello: "; +var args = ["Go", "JS"]; +window.go.main.App.TestFunc(msg, ...args) + .then((result) => { //do things here -}).catch((error) => { + }) + .catch((error) => { //handle error -}); + }); ``` + Workaround: + ```js -var msg = "Hello " -var args = ["Go", "JS"] -window.go.main.App.TestFunc(msg, args).then((result) => { //without the 3 dots +var msg = "Hello "; +var args = ["Go", "JS"]; +window.go.main.App.TestFunc(msg, args) + .then((result) => { + //without the 3 dots //do things here -}).catch((error) => { + }) + .catch((error) => { //handle error -}); + }); ``` + Credit: https://github.com/wailsapp/wails/issues/1186 ## I''m having getting proxy errors when trying to install Wails If you are getting errors like this: + ``` "https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ``` + it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: + ``` go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct ``` + Source: https://github.com/wailsapp/wails/issues/1233 ## The generated Typescript doesn''t have the correct types @@ -103,9 +123,9 @@ the following imports to the `` section of any new page you navigate to: ```html - - + + ``` -Source: https://github.com/wailsapp/wails/discussions/1512 \ No newline at end of file +Source: https://github.com/wailsapp/wails/discussions/1512 diff --git a/website/docs/guides/windows-installer.mdx b/website/docs/guides/windows-installer.mdx index f6a5b2f39f6..06cbaf04c26 100644 --- a/website/docs/guides/windows-installer.mdx +++ b/website/docs/guides/windows-installer.mdx @@ -1,7 +1,11 @@ # NSIS installer -

-
+

+ +

Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). @@ -13,10 +17,12 @@ Wails supports generating Windows installers using the [NSIS installer](https:// The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. If you use the chocolatey package manager, run the following script: + ``` choco install nsis ``` -If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. + +If you install NSIS manually, you need to add the _Bin_ folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. ### Linux @@ -44,6 +50,7 @@ data is read from `installer/info.json` and that is configured to use the projec ``` To generate an installer for your application, use the `-nsis` flag with `wails build`: + ``` wails build -nsis ``` diff --git a/website/docs/guides/windows.mdx b/website/docs/guides/windows.mdx index 73162d8a4eb..7d7167ecd59 100644 --- a/website/docs/guides/windows.mdx +++ b/website/docs/guides/windows.mdx @@ -1,4 +1,3 @@ - # Windows This page has miscellaneous guides related to developing Wails applications for Windows. @@ -67,5 +66,6 @@ cmd.SysProcAttr = &syscall.SysProcAttr{ } cmd.Start() ``` + Solution provided by [sithembiso](https://github.com/sithembiso) on the -[discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). \ No newline at end of file +[discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/docs/howdoesitwork.mdx b/website/docs/howdoesitwork.mdx index 9a2bed0c2c3..7a2103d259a 100644 --- a/website/docs/howdoesitwork.mdx +++ b/website/docs/howdoesitwork.mdx @@ -11,7 +11,7 @@ version of the runtime library. Finally, it is possible to bind Go methods to th Javascript methods that can be called, just as if they were local Javascript methods.
- +
## The Main Application @@ -130,7 +130,7 @@ by the frontend code. :::info Note - Wails requires that you pass in an *instance* of the struct for it to bind it correctly +Wails requires that you pass in an _instance_ of the struct for it to bind it correctly ::: @@ -197,9 +197,10 @@ You may bind as many structs as you like. Just make sure you create an instance ``` When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: - - Javascript bindings for all bound methods - - Typescript declarations for all bound methods - - Typescript definitions for all Go structs used as inputs or outputs by the bound methods + +- Javascript bindings for all bound methods +- Typescript declarations for all bound methods +- Typescript definitions for all Go structs used as inputs or outputs by the bound methods This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. @@ -232,24 +233,26 @@ wailsjs β”œβ”€App.d.ts └─App.js ``` + Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: ```javascript - // ... - import {Greet} from '../wailsjs/go/main/App' +// ... +import { Greet } from "../wailsjs/go/main/App"; - function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }) - } +function doGreeting(name) { + Greet(name).then((result) => { + // Do something with result + }); +} ``` + The Typescript declaration file gives you the correct types for the bound methods: ```ts -export function Greet(arg1:string):Promise; +export function Greet(arg1: string): Promise; ``` The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed @@ -299,16 +302,16 @@ The `wailsjs/go/main/App.js` file will still have the following code: ```js title="App.js" export function Greet(arg1) { - return window['go']['main']['App']['Greet'](arg1); + return window["go"]["main"]["App"]["Greet"](arg1); } ``` But the `wailsjs/go/main/App.d.ts` file will be updated with the following code: ```ts title="App.d.ts" -import {main} from '../models'; +import { main } from "../models"; -export function Greet(arg1:main.Person):Promise; +export function Greet(arg1: main.Person): Promise; ``` As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions @@ -317,55 +320,54 @@ are defined: ```ts title="models.ts" export namespace main { + export class Address { + street: string; + postcode: string; - export class Address { - street: string; - postcode: string; + static createFrom(source: any = {}) { + return new Address(source); + } - static createFrom(source: any = {}) { - return new Address(source); - } + constructor(source: any = {}) { + if ("string" === typeof source) source = JSON.parse(source); + this.street = source["street"]; + this.postcode = source["postcode"]; + } + } + export class Person { + name: string; + age: number; + address?: Address; - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map(elem => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } + static createFrom(source: any = {}) { + return new Person(source); + } + + constructor(source: any = {}) { + if ("string" === typeof source) source = JSON.parse(source); + this.name = source["name"]; + this.age = source["age"]; + this.address = this.convertValues(source["address"], Address); + } + + convertValues(a: any, classs: any, asMap: boolean = false): any { + if (!a) { + return a; + } + if (a.slice) { + return (a as any[]).map((elem) => this.convertValues(elem, classs)); + } else if ("object" === typeof a) { + if (asMap) { + for (const key of Object.keys(a)) { + a[key] = new classs(a[key]); + } + return a; + } + return new classs(a); + } + return a; + } + } } ``` @@ -373,17 +375,17 @@ So long as you have TypeScript as part of your frontend build configuration, you the following way: ```js title="mycode.js" - import {Greet} from '../wailsjs/go/main/App' - import {main} from '../wailsjs/go/models' - - function generate() { - let person = new main.Person() - person.name = "Peter" - person.age = 27 - Greet(person).then((result) => { - console.log(result) - }) - } +import { Greet } from "../wailsjs/go/main/App"; +import { main } from "../wailsjs/go/models"; + +function generate() { + let person = new main.Person(); + person.name = "Peter"; + person.age = 27; + Greet(person).then((result) => { + console.log(result); + }); +} ``` The combination of generated bindings and TypeScript models makes for a powerful development environment. diff --git a/website/docs/introduction.mdx b/website/docs/introduction.mdx index b8e0877f285..e4d540c8ede 100644 --- a/website/docs/introduction.mdx +++ b/website/docs/introduction.mdx @@ -16,9 +16,9 @@ MacOS & Windows written using Wails. Not only does it look great, it uses native you'd expect from a modern native app.

- - - + + +

## Quick Start Templates diff --git a/website/docs/reference/cli.mdx b/website/docs/reference/cli.mdx index ee584c4392e..b2b620681fd 100644 --- a/website/docs/reference/cli.mdx +++ b/website/docs/reference/cli.mdx @@ -12,19 +12,19 @@ The Wails CLI has a number of commands that are used for managing your projects. `wails init` is used for generating projects. -| Flag | Description | Default | -| :------------------- | :------------------------------------- | :-------------------------: | -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | +| Flag | Description | Default | +| :----------------- | :---------------------------------------------------------------------------------------------------------------------- | :-----------------: | +| -n "project name" | Name of the project. **Mandatory**. | | +| -d "project dir" | Project directory to create | Name of the project | +| -g | Initialise git repository | | +| -l | List available project templates | | +| -q | Suppress output to console | | +| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | +| -ide | Generate IDE project files | | +| -f | Force build application | false | Example: - `wails init -n test -d mytestproject -g -ide vscode -q` +`wails init -n test -d mytestproject -g -ide vscode -q` This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. @@ -36,15 +36,15 @@ More information on using IDEs with Wails can be found [here](../guides/ides.mdx Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. Example: - `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` +`wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` A list of community maintained templates can be found [here](../community/templates.mdx) :::warning Attention - **The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** +**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. +If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. ::: @@ -52,26 +52,26 @@ A list of community maintained templates can be found [here](../community/templa `wails build` is used for compiling your project to a production-ready binary. -| Flag | Description | Default | -| :------------------- | :-------------------------------------- | :------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler"| Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | false | +| Flag | Description | Default | +| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | +| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | +| -clean | Cleans the `build/bin` directory | | +| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | +| -ldflags "flags" | Additional ldflags to pass to the compiler | | +| -nopackage | Do not package application | | +| -o filename | Output filename | | +| -s | Skip building the frontend | false | +| -f | Force build application | false | +| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | +| -upx | Compress final binary using "upx" | | +| -upxflags | Flags to pass to upx | | +| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | +| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | +| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | +| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | +| -trimpath | Remove all file system paths from the resulting executable. | false | +| -race | Build with Go's race detector | false | +| -windowsconsole | Keep the console window for Windows builds | false | For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. @@ -84,13 +84,13 @@ Example: :::info UPX on Apple Silicon - There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. +There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. ::: :::info UPX on Windows - Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). +Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). ::: @@ -99,7 +99,7 @@ Example: Supported platforms are: | Platform | Description | -|:---------------- |:--------------------------------------------- | +| :--------------- | :-------------------------------------------- | | darwin | MacOS + architecture of build machine | | darwin/amd64 | MacOS 10.13+ AMD64 | | darwin/arm64 | MacOS 11.0+ ARM64 | @@ -111,12 +111,12 @@ Supported platforms are: | linux/amd64 | Linux AMD64 | | linux/arm64 | Linux ARM64 | - ## doctor `wails doctor` will run diagnostics to ensure that your system is ready for development. Example: + ``` Wails CLI v2.0.0-beta @@ -149,37 +149,37 @@ Your system is ready for Wails development! `wails dev` is used to run your application in a "live development" mode. This means: - - The application's `go.mod` will be updated to use the same version of Wails as the CLI - - The application is compiled and run automatically - - A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files - - A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions - - All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload - - A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods - - A second JS module is generated that provides a wrapper + TS declaration for the runtime - -| Flag | Description | Default | -| :------------------- | :-------------------------------------- | :------------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler"| Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel"| Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | -| -noreload | Disable automatic reload when assets change | | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | +- The application's `go.mod` will be updated to use the same version of Wails as the CLI +- The application is compiled and run automatically +- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files +- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions +- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload +- A JS module is generated that provides the following: + - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting + - TypeScript versions of your Go structs, that can be constructed and passed to your go methods +- A second JS module is generated that provides a wrapper + TS declaration for the runtime + +| Flag | Description | Default | +| :--------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- | +| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | +| -browser | Opens a browser to `http://localhost:34115` on startup | | +| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | +| -e | Extensions to trigger rebuilds (comma separated) | go | +| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | +| -ldflags "flags" | Additional ldflags to pass to the compiler | | +| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | +| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | +| -noreload | Disable automatic reload when assets change | | +| -nogen | Disable generate module | | +| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | +| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | +| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | +| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | +| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | +| -appargs "args" | Arguments passed to the application in shell style | | +| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | +| -race | Build with Go's race detector | false | +| -s | Skip building the frontend | false | Example: @@ -187,10 +187,10 @@ Example: This command will do the following: - - Build the application and run it (more details [here](../guides/manual-builds.mdx) - - Generate the Wails JS modules in `./frontend/src` - - Watch for updates to files in `./frontend/dist` and reload on any change - - Open a browser and connect to the application +- Build the application and run it (more details [here](../guides/manual-builds.mdx) +- Generate the Wails JS modules in `./frontend/src` +- Watch for updates to files in `./frontend/dist` and reload on any change +- Open a browser and connect to the application There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). @@ -201,10 +201,10 @@ There is more information on using this feature with existing framework scripts Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. -| Flag | Description | -| :------------------- | :------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | +| Flag | Description | +| :--------------- | :------------------------------------------ | +| -name | The template name (Mandatory) | +| -frontend "path" | Path to frontend project to use in template | For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). @@ -216,11 +216,10 @@ The `wails generate module` command allows you to manually generate the `wailsjs `wails update` will update the version of the Wails CLI. -| Flag | Description | -| :------------------- | :-------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - +| Flag | Description | +| :----------------- | :------------------------------------ | +| -pre | Update to latest pre-release version | +| -version "version" | Install a specific version of the CLI | ## version diff --git a/website/docs/reference/menus.mdx b/website/docs/reference/menus.mdx index ac083ef51ea..608b392bbcd 100644 --- a/website/docs/reference/menus.mdx +++ b/website/docs/reference/menus.mdx @@ -18,7 +18,7 @@ An example of how to create a menu: FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { runtime.Quit() }) - + if runtime.GOOS == "darwin" { AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut } @@ -33,7 +33,7 @@ An example of how to create a menu: }, ) // ... -```` +``` It is also possible to dynamically update the menu, by updating the menu struct and calling [MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu). @@ -80,17 +80,17 @@ type MenuItem struct { } ``` -| Field | Type | Notes | -| ---------------- | ---------------------------------- | ----------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | +| Field | Type | Notes | +| ----------- | ---------------------------------- | ------------------------------------------------------------- | +| Label | string | The menu text | +| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | +| Type | [Type](#type) | Type of MenuItem | +| Disabled | bool | Disables the menu item | +| Hidden | bool | Hides this menu item | +| Checked | bool | Adds check to item (Checkbox & Radio types) | +| SubMenu | [\*Menu](#menu) | Sets the submenu | +| Click | [Callback](#callback) | Callback function when menu clicked | +| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | ### Accelerator @@ -185,6 +185,7 @@ const ( ControlKey Modifier = "ctrl" ) ``` + A number of helper methods are available to create Accelerators using modifiers: ```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" @@ -224,6 +225,7 @@ func Radio(label string, selected bool, accelerator *keys.Accelerator, click Cal func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem func SubMenu(label string, menu *Menu) *Menu ``` + You can also create menu items directly on a menu by using the "Add" helpers: ```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" @@ -234,7 +236,6 @@ func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Acceler func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI ``` - A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. @@ -258,14 +259,13 @@ using radio groups that may share a callback. :::info Roles - Roles are currently supported on Mac only. +Roles are currently supported on Mac only. ::: A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: -| Role | Description | -| ---- | ----------- | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | - +| Role | Description | +| ------------ | ------------------------------------------------------------------------ | +| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | +| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/docs/reference/options.mdx b/website/docs/reference/options.mdx index 2446fe9eb8b..99ced1c2dbf 100644 --- a/website/docs/reference/options.mdx +++ b/website/docs/reference/options.mdx @@ -91,8 +91,6 @@ func main() { ``` - - ### Title Name: Title @@ -202,7 +200,7 @@ hide the window instead. Name: BackgroundColour -Type: *options.RGBA +Type: \*options.RGBA Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency This value is the default background colour of the window. @@ -226,30 +224,29 @@ The frontend assets to be used by the application. Requires an `index.html` file ### AssetsHandler - + Name: AssetsHandler Type: http.Handler - The assets handler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the `assets` because the file is not found. -| Value | Win | Mac | Lin | -| ----------------------------- | --- | --- | --- | -| GET | βœ… | βœ… | βœ… | -| POST | βœ… | βœ… | ❌ | -| PUT | βœ… | βœ… | ❌ | -| PATCH | βœ… | βœ… | ❌ | -| DELETE | βœ… | βœ… | ❌ | -| Request Headers | βœ… | βœ… | ❌ | -| Request Body | βœ… | βœ… | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | βœ… | βœ… | ❌ | -| Response Headers | βœ… | βœ… | ❌ | -| Response Body | βœ… | βœ… | βœ… | -| Response Body Streaming | ❌ | ❌ | βœ… | +| Value | Win | Mac | Lin | +| ----------------------- | --- | --- | --- | +| GET | βœ… | βœ… | βœ… | +| POST | βœ… | βœ… | ❌ | +| PUT | βœ… | βœ… | ❌ | +| PATCH | βœ… | βœ… | ❌ | +| DELETE | βœ… | βœ… | ❌ | +| Request Headers | βœ… | βœ… | ❌ | +| Request Body | βœ… | βœ… | ❌ | +| Request Body Streaming | ❌ | ❌ | ❌ | +| Response StatusCodes | βœ… | βœ… | ❌ | +| Response Headers | βœ… | βœ… | ❌ | +| Response Body | βœ… | βœ… | βœ… | +| Response Body Streaming | ❌ | ❌ | βœ… | NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. @@ -335,6 +332,7 @@ button or calling `runtime.Quit`. Returning true will cause the application to c as normal. This is good for confirming with the user that they wish to exit the program. Example: + ```go title=windowsapp.go func (b *App) beforeClose(ctx context.Context) (prevent bool) { dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ @@ -358,11 +356,11 @@ Type: options.WindowStartState Defines how the window should present itself at startup. -| Value | Win | Mac | Lin | -| --------------- | --- | --- | --- | -| Fullscreen | βœ… | βœ… | βœ… | -| Maximised | βœ… | βœ… | βœ… | -| Minimised | βœ… | ❌ | βœ… | +| Value | Win | Mac | Lin | +| ---------- | --- | --- | --- | +| Fullscreen | βœ… | βœ… | βœ… | +| Maximised | βœ… | βœ… | βœ… | +| Minimised | βœ… | ❌ | βœ… | ### Bind @@ -452,6 +450,7 @@ Type: string This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. Important information about distribution of fixed version runtime: + - [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) - [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) - [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) @@ -466,12 +465,11 @@ Minimum Windows Version: Windows 10 2004/20H1 This defines the theme that the application should use: -| Value | Description | -| --------------- | ----------- | -| SystemDefault | *Default*. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - +| Value | Description | +| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| SystemDefault | _Default_. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | +| Dark | The application will use a dark theme exclusively | +| Light | The application will use a light theme exclusively | ### CustomTheme @@ -509,6 +507,7 @@ type ThemeSettings struct { ``` Example: + ```go CustomTheme: &windows.ThemeSettings{ // Theme to use when window is active @@ -562,15 +561,13 @@ Type: func() If set, this function will be called when windows resumes from low power mode (suspend/hibernate) - - ## Mac Specific Options ### TitleBar Name: TitleBar -Type: [*mac.TitleBar](#titlebar-struct) +Type: [\*mac.TitleBar](#titlebar-struct) The TitleBar struct provides the ability to configure the look and feel of the title bar. @@ -624,24 +621,25 @@ type TitleBar struct { } ``` -| Name | Description | -| ---- | ----------- | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview)| -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | +| Name | Description | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | +| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | +| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | +| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | +| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | +| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | Preconfigured titlebar settings are available: -| Setting | Example | -| ------- | ------- | -|`mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.png) | -|`mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.png) | -|`mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.png) | +| Setting | Example | +| --------------------------- | --------------------------------------------- | +| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.png) | +| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.png) | +| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.png) | Example: + ```go Mac: &mac.Options{ TitleBar: mac.TitleBarHiddenInset(), @@ -654,18 +652,19 @@ Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). -| Value | Description | -| --------------- | ------------------ | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | +| Value | Description | +| ----------------------------------------------------- | --------------------------------------------------------------- | +| DefaultAppearance | DefaultAppearance uses the default system value | +| NSAppearanceNameAqua | The standard light system appearance | +| NSAppearanceNameDarkAqua | The standard dark system appearance | +| NSAppearanceNameVibrantLight | The light vibrant appearance | +| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | +| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | +| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | +| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | Example: + ```go Mac: &mac.Options{ Appearance: mac.NSAppearanceNameDarkAqua, @@ -681,8 +680,10 @@ type AboutInfo struct { Icon []byte } ``` + If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: + ```go //go:embed build/appicon.png var icon []byte @@ -699,19 +700,27 @@ func main() { }, }) ``` + The "About" menu item will appear in the app menu:
- +
-
+
When clicked, that will open an about message box:
- +
-
+
## Linux Specific Options diff --git a/website/docs/reference/project-config.mdx b/website/docs/reference/project-config.mdx index 936e3fd5f8b..83ec3e54fe1 100644 --- a/website/docs/reference/project-config.mdx +++ b/website/docs/reference/project-config.mdx @@ -49,4 +49,4 @@ The project config resides in the `wails.json` file in the project directory. Th This file is read by the Wails CLI when running `wails build` or `wails dev`. The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config -and thus become defaults for subsequent runs. \ No newline at end of file +and thus become defaults for subsequent runs. diff --git a/website/docs/reference/runtime/browser.mdx b/website/docs/reference/runtime/browser.mdx index 1cb407d4929..22f05d83853 100644 --- a/website/docs/reference/runtime/browser.mdx +++ b/website/docs/reference/runtime/browser.mdx @@ -9,12 +9,9 @@ sidebar_position: 7 These methods are related to the system browser. ### BrowserOpenURL + Go Signature: `BrowserOpenURL(ctx context.Context, url string)` JS Signature: `BrowserOpenURL(url string)` Opens the given URL in the system browser. - - - - diff --git a/website/docs/reference/runtime/dialog.mdx b/website/docs/reference/runtime/dialog.mdx index 2778010ff04..2d2cb6a0ff9 100644 --- a/website/docs/reference/runtime/dialog.mdx +++ b/website/docs/reference/runtime/dialog.mdx @@ -9,7 +9,7 @@ sidebar_position: 5 This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. :::info Javascript - Dialog is currently unsupported in the JS runtime. +Dialog is currently unsupported in the JS runtime. ::: ### OpenDirectoryDialog @@ -20,7 +20,6 @@ Go Signature: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialog Returns: Selected directory (blank if the user cancelled) or an error - ### OpenFileDialog Opens a dialog that prompts the user to select a file. Can be customised using [OpenDialogOptions](#opendialogoptions). @@ -29,8 +28,6 @@ Go Signature: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptio Returns: Selected file (blank if the user cancelled) or an error - - ### OpenMultipleFilesDialog Opens a dialog that prompts the user to select multiple files. Can be customised using [OpenDialogOptions](#opendialogoptions). @@ -39,8 +36,6 @@ Go Signature: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDi Returns: Selected files (nil if the user cancelled) or an error - - ### SaveFileDialog Opens a dialog that prompts the user to select a filename for the purposes of saving. Can be customised using [SaveDialogOptions](#savedialogoptions). @@ -49,8 +44,6 @@ Go Signature: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptio Returns: The selected file (blank if the user cancelled) or an error - - ### MessageDialog Displays a message using a message dialog. Can be customised using [MessageDialogOptions](#messagedialogoptions). @@ -75,17 +68,17 @@ type OpenDialogOptions struct { TreatPackagesAsDirectories bool } ``` + | Field | Description | Win | Mac | Lin | | -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | βœ… | βœ… | βœ… | -| DefaultFilename | The default filename | βœ… | βœ… | βœ… | -| Title | Title for the dialog | βœ… | βœ… | βœ… | -| [Filters](#filefilter) | A list of file filters | βœ… | βœ… | βœ… | +| DefaultDirectory | The directory the dialog will show when opened | βœ… | βœ… | βœ… | +| DefaultFilename | The default filename | βœ… | βœ… | βœ… | +| Title | Title for the dialog | βœ… | βœ… | βœ… | +| [Filters](#filefilter) | A list of file filters | βœ… | βœ… | βœ… | | ShowHiddenFiles | Show files hidden by the system | | βœ… | βœ… | -| CanCreateDirectories | Allow user to create directories | | βœ… | | -| ResolvesAliases | If true, returns the file not the alias | | βœ… | | -| TreatPackagesAsDirectories | Allow navigating into packages | | βœ… | | - +| CanCreateDirectories | Allow user to create directories | | βœ… | | +| ResolvesAliases | If true, returns the file not the alias | | βœ… | | +| TreatPackagesAsDirectories | Allow navigating into packages | | βœ… | | ### SaveDialogOptions @@ -103,11 +96,11 @@ type SaveDialogOptions struct { | Field | Description | Win | Mac | Lin | | -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | βœ… | βœ… | βœ… | -| DefaultFilename | The default filename | βœ… | βœ… | βœ… | -| Title | Title for the dialog | βœ… | βœ… | βœ… | -| [Filters](#filefilter) | A list of file filters | βœ… | βœ… | βœ… | -| ShowHiddenFiles | Show files hidden by the system | | βœ… | βœ… | +| DefaultDirectory | The directory the dialog will show when opened | βœ… | βœ… | βœ… | +| DefaultFilename | The default filename | βœ… | βœ… | βœ… | +| Title | Title for the dialog | βœ… | βœ… | βœ… | +| [Filters](#filefilter) | A list of file filters | βœ… | βœ… | βœ… | +| ShowHiddenFiles | Show files hidden by the system | | βœ… | βœ… | | CanCreateDirectories | Allow user to create directories | | βœ… | | | TreatPackagesAsDirectories | Allow navigating into packages | | βœ… | | @@ -123,14 +116,15 @@ type MessageDialogOptions struct { CancelButton string } ``` + | Field | Description | Win | Mac | Lin | | ------------- | ------------------------------------------------------------------------- | --- | --- | --- | -| Type | The type of message dialog, eg question, info... | βœ… | βœ… | βœ… | -| Title | Title for the dialog | βœ… | βœ… | βœ… | -| Message | The message to show the user | βœ… | βœ… | βœ… | -| Buttons | A list of button titles | | βœ… | | -| DefaultButton | The button with this text should be treated as default. Bound to `return` | | βœ… | | -| CancelButton | The button with this text should be treated as cancel. Bound to `escape` | | βœ… | | +| Type | The type of message dialog, eg question, info... | βœ… | βœ… | βœ… | +| Title | Title for the dialog | βœ… | βœ… | βœ… | +| Message | The message to show the user | βœ… | βœ… | βœ… | +| Buttons | A list of button titles | | βœ… | | +| DefaultButton | The button with this text should be treated as default. Bound to `return` | | βœ… | | +| CancelButton | The button with this text should be treated as cancel. Bound to `escape` | | βœ… | | #### Windows @@ -148,6 +142,7 @@ A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `C is considered default and is bound to the `return` key. For the following code: + ```go selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Title: "It's your turn!", @@ -155,13 +150,20 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Buttons: []string{"one", "two", "three", "four"}, }) ``` + the first button is shown as default: +
- +
-
+
And if we specify `DefaultButton` to be "two": + ```go selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Title: "It's your turn!", @@ -170,13 +172,20 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ DefaultButton: "two", }) ``` + the second button is shown as default. When `return` is pressed, the value "two" is returned. +
- +
-
+
If we now specify `CancelButton` to be "three": + ```go selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Title: "It's your turn!", @@ -186,14 +195,19 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ CancelButton: "three", }) ``` + the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: +
- +
-
-
-
- +
+
+
#### DialogType @@ -221,11 +235,15 @@ Windows allows you to use multiple file filters in dialog boxes. Each FileFilter dialog:
- +
-
-
-
+
+
+
#### Linux @@ -233,12 +251,15 @@ Linux allows you to use multiple file filters in dialog boxes. Each FileFilter w dialog:
- +
-
-
-
- +
+
+
#### Mac @@ -246,6 +267,7 @@ Mac dialogs only have the concept of a single set of patterns to filter files. I Wails will use all the Patterns defined. Example: + ```go selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ Title: "Select File", @@ -260,4 +282,5 @@ Example: }, }) ``` -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. \ No newline at end of file + +This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/docs/reference/runtime/intro.mdx b/website/docs/reference/runtime/intro.mdx index 0a33acdf9d5..740929b7f4e 100644 --- a/website/docs/reference/runtime/intro.mdx +++ b/website/docs/reference/runtime/intro.mdx @@ -66,5 +66,3 @@ type EnvironmentInfo struct { BuildType string // Either "production", "debug" or "dev" } ``` - - diff --git a/website/docs/reference/runtime/log.mdx b/website/docs/reference/runtime/log.mdx index 71383800830..e1e69768688 100644 --- a/website/docs/reference/runtime/log.mdx +++ b/website/docs/reference/runtime/log.mdx @@ -9,12 +9,12 @@ sidebar_position: 3 The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: - - Trace - - Debug - - Info - - Warning - - Error - - Fatal +- Trace +- Debug +- Info +- Warning +- Error +- Fatal The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. @@ -150,4 +150,3 @@ type Logger interface { Fatal(message string) } ``` - diff --git a/website/docs/reference/runtime/menu.mdx b/website/docs/reference/runtime/menu.mdx index 7d2d0178345..ec6ae451d6b 100644 --- a/website/docs/reference/runtime/menu.mdx +++ b/website/docs/reference/runtime/menu.mdx @@ -9,17 +9,17 @@ sidebar_position: 6 These methods are related to the application menu. :::info Javascript - Menu is currently unsupported in the JS runtime. +Menu is currently unsupported in the JS runtime. ::: ### MenuSetApplicationMenu + Go Signature: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` Sets the application menu to the given [menu](../menus.mdx) . ### MenuUpdateApplicationMenu + Go Signature: `MenuUpdateApplicationMenu(ctx context.Context)` Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`. - - diff --git a/website/docs/reference/runtime/window.mdx b/website/docs/reference/runtime/window.mdx index baf6222e50e..9ff48cf03c9 100644 --- a/website/docs/reference/runtime/window.mdx +++ b/website/docs/reference/runtime/window.mdx @@ -9,6 +9,7 @@ sidebar_position: 4 These methods give control of the application window. ### WindowSetTitle + Go Signature: `WindowSetTitle(ctx context.Context, title string)` JS Signature: `WindowSetTitle(title: string)` @@ -16,6 +17,7 @@ JS Signature: `WindowSetTitle(title: string)` Sets the text in the window title bar. ### WindowFullscreen + Go Signature: `WindowFullscreen(ctx context.Context)` JS Signature: `WindowFullscreen()` @@ -23,6 +25,7 @@ JS Signature: `WindowFullscreen()` Makes the window full screen. ### WindowUnfullscreen + Go Signature: `WindowUnfullscreen(ctx context.Context)` JS Signature: `WindowUnfullscreen()` @@ -30,6 +33,7 @@ JS Signature: `WindowUnfullscreen()` Restores the previous window dimensions and position prior to full screen. ### WindowCenter + Go Signature: `WindowCenter(ctx context.Context)` JS Signature: `WindowCenter()` @@ -37,6 +41,7 @@ JS Signature: `WindowCenter()` Centers the window on the monitor the window is currently on. ### WindowReload + Go Signature: `WindowReload(ctx context.Context)` JS Signature: `WindowReload()` @@ -44,6 +49,7 @@ JS Signature: `WindowReload()` Performs a "reload" (Reloads current page). ### WindowReloadApp + Go Signature: `WindowReloadApp(ctx context.Context)` JS Signature: `WindowReloadApp()` @@ -53,6 +59,7 @@ Reloads the application frontend. ### WindowSetSy ### WindowSetSystemDefaultTheme + Go Signature: `WindowSetSystemDefaultTheme(ctx context.Context)` JS Signature: `WindowSetSystemDefaultTheme()` @@ -62,6 +69,7 @@ Windows only. Sets window theme to system default (dark/light). ### WindowSetLightTheme + Go Signature: `WindowSetLightTheme(ctx context.Context)` JS Signature: `WindowSetLightTheme()` @@ -71,6 +79,7 @@ Windows only. Sets window theme to light. ### WindowSetDarkTheme + Go Signature: `WindowSetDarkTheme(ctx context.Context)` JS Signature: `WindowSetDarkTheme()` @@ -80,6 +89,7 @@ Windows only. Sets window theme to dark. ### WindowShow + Go Signature: `WindowShow(ctx context.Context)` JS Signature: `WindowShow()` @@ -87,6 +97,7 @@ JS Signature: `WindowShow()` Shows the window, if it is currently hidden. ### WindowHide + Go Signature: `WindowHide(ctx context.Context)` JS Signature: `WindowHide()` @@ -94,6 +105,7 @@ JS Signature: `WindowHide()` Hides the window, if it is currently visible. ### WindowSetSize + Go Signature: `WindowSetSize(ctx context.Context, width int, height int)` JS Signature: `WindowSetSize(size: Size)` @@ -101,6 +113,7 @@ JS Signature: `WindowSetSize(size: Size)` Sets the width and height of the window. ### WindowGetSize + Go Signature: `WindowGetSize(ctx context.Context) (width int, height int)` JS Signature: `WindowGetSize() : Size` @@ -108,6 +121,7 @@ JS Signature: `WindowGetSize() : Size` Gets the width and height of the window. ### WindowSetMinSize + Go Signature: `WindowSetMinSize(ctx context.Context, width int, height int)` JS Signature: `WindowSetMinSize(size: Size)` @@ -118,6 +132,7 @@ Will resize the window if the window is currently smaller than the given dimensi Setting a size of `0,0` will disable this constraint. ### WindowSetMaxSize + Go Signature: `WindowSetMaxSize(ctx context.Context, width int, height int)` JS Signature: `WindowSetMaxSize(size: Size)` @@ -128,14 +143,15 @@ Will resize the window if the window is currently larger than the given dimensio Setting a size of `0,0` will disable this constraint. ### WindowSetAlwaysOnTop + Go Signature: `WindowSetAlwaysOnTop(ctx context.Context, b bool)` JS Signature: `WindowSetAlwaysOnTop(b: Boolen)` Sets the window AlwaysOnTop or not on top. - ### WindowSetPosition + Go Signature: `WindowSetPosition(ctx context.Context, x int, y int)` JS Signature: `WindowSetPosition(position: Position)` @@ -143,6 +159,7 @@ JS Signature: `WindowSetPosition(position: Position)` Sets the window position relative to the monitor the window is currently on. ### WindowGetPosition + Go Signature: `WindowGetPosition(ctx context.Context) (x int, y int)` JS Signature: `WindowGetPosition() : Position` @@ -150,6 +167,7 @@ JS Signature: `WindowGetPosition() : Position` Gets the window position relative to the monitor the window is currently on. ### WindowMaximise + Go Signature: `WindowMaximise(ctx context.Context)` JS Signature: `WindowMaximise()` @@ -157,6 +175,7 @@ JS Signature: `WindowMaximise()` Maximises the window to fill the screen. ### WindowUnmaximise + Go Signature: `WindowUnmaximise(ctx context.Context)` JS Signature: `WindowUnmaximise()` @@ -164,6 +183,7 @@ JS Signature: `WindowUnmaximise()` Restores the window to the dimensions and position prior to maximising. ### WindowToggleMaximise + Go Signature: `WindowToggleMaximise(ctx context.Context)` JS Signature: `WindowToggleMaximise()` @@ -171,6 +191,7 @@ JS Signature: `WindowToggleMaximise()` Toggles between Maximised and UnMaximised. ### WindowMinimise + Go Signature: `WindowMinimise(ctx context.Context)` JS Signature: `WindowMinimise()` @@ -178,6 +199,7 @@ JS Signature: `WindowMinimise()` Minimises the window. ### WindowUnminimise + Go Signature: `WindowUnminimise(ctx context.Context)` JS Signature: `WindowUnminimise()` @@ -185,6 +207,7 @@ JS Signature: `WindowUnminimise()` Restores the window to the dimensions and position prior to minimising. ### WindowSetBackgroundColour + Go Signature: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)` JS Signature: `WindowSetBackgroundColour(R, G, B, A)` @@ -207,8 +230,8 @@ Any value that is not 0 will be considered 255. ```ts interface Position { - x: number; - y: number; + x: number; + y: number; } ``` @@ -216,9 +239,7 @@ interface Position { ```ts interface Size { - w: number; - h: number; + w: number; + h: number; } ``` - - diff --git a/website/docs/tutorials/helloworld.mdx b/website/docs/tutorials/helloworld.mdx index 24aa0285b0f..dea32688658 100644 --- a/website/docs/tutorials/helloworld.mdx +++ b/website/docs/tutorials/helloworld.mdx @@ -7,9 +7,9 @@ sidebar_position: 10 The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: - - Create a new Wails application - - Build the application - - Run the application +- Create a new Wails application +- Build the application +- Run the application :::note This tutorial uses Windows as the target platform. Output will vary slightly @@ -95,9 +95,12 @@ This has compiled the application and saved it in the `build/bin` directory. If we view the `build/bin` directory in Windows Explorer, we should see our project binary:
- +
-
+
We can run it by simply double-clicking the `helloworld.exe` file. @@ -108,6 +111,10 @@ On Linux, you can run the application using `./helloworld` from the `build/bin` You should see the application working as expected:
- +
-
+
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 138ae0e7323..2cb3405a2ae 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -35,19 +35,20 @@ const config = { direction: "ltr", htmlLang: "ru-RU", }, - "ja": { + ja: { label: "ζ—₯本θͺž", direction: "ltr", htmlLang: "ja-JP", - } + }, }, }, plugins: [ - ["docusaurus-plugin-plausible", + [ + "docusaurus-plugin-plausible", { domain: "wails.io", }, - ] + ], ], presets: [ @@ -109,33 +110,42 @@ const config = { position: "right", }, { - type: 'dropdown', - label: 'About', - position: 'right', + type: "dropdown", + label: "About", + position: "right", items: [ { to: "/faq", label: "FAQ", }, { - to: '/changelog', + to: "/changelog", label: "Changelog", }, { - to: '/community-guide', + to: "/community-guide", label: "Community Guide", }, { - to: '/credits', + to: "/credits", label: "Credits", }, { - to: '/stats', + to: "/stats", label: "Stats", }, ], }, - { type: "localeDropdown", position: "right" }, + { + type: "localeDropdown", + position: "right", + dropdownItemsAfter: [ + { + to: "/docs/contributing/documenting", + label: "Help Us Translate ❀", + }, + ], + }, { href: "https://github.com/wailsapp/wails", label: "GitHub", diff --git a/website/src/pages/changelog.md b/website/src/pages/changelog.mdx similarity index 55% rename from website/src/pages/changelog.md rename to website/src/pages/changelog.mdx index 4946be0c3a9..c4130ac1446 100644 --- a/website/src/pages/changelog.md +++ b/website/src/pages/changelog.mdx @@ -5,179 +5,185 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v2.0.0-beta.44 2022-08-20] +## [Unreleased] -### Deprecation Notice +## [v2.0.0-beta.44] - 2022-08-20 + +### Deprecated The `data-wails-drag` attribute is being deprecated in favour of the following CSS style: `style="--wails-draggable:drag"`. You can use `style="--wails-draggable:no-drag"` to disable the drag behaviour. For this release only, you can test this by setting the following application option: ```go - Experimental: &options.Experimental{ -UseCSSDrag: true, +Experimental: &options.Experimental{ + UseCSSDrag: true, }, ``` ### Added -* Set file permissions for generated files by @leaanthony in https://github.com/wailsapp/wails/pull/1763 -* Experimental support for CSS Drag detection by @leaanthony in https://github.com/wailsapp/wails/pull/1750 + +- Set file permissions for generated files by @leaanthony in https://github.com/wailsapp/wails/pull/1763 +- Experimental support for CSS Drag detection by @leaanthony in https://github.com/wailsapp/wails/pull/1750 ### Fixed -* Bug fix collecting of output binaries for platforms by @stffabi in https://github.com/wailsapp/wails/pull/1715 -* Fix registration of exposed fields by @ValentinTrinque in https://github.com/wailsapp/wails/pull/1727 -* Fix column widths for doctor command's dependencies table by @ianmjones in https://github.com/wailsapp/wails/pull/1717 -* Do not generate bindings for `OnBeforeClose` method - -### What's Changed -* Misc code refactors and removal by @leaanthony in https://github.com/wailsapp/wails/pull/1713 -* Add react-router to routing.mdx by @Maicarons2022 in https://github.com/wailsapp/wails/pull/1755 -* Add Japanese to doc by @RyoTagami in https://github.com/wailsapp/wails/pull/1716 -* Added EmailIt and Modal File Manager by @raguay in https://github.com/wailsapp/wails/pull/1728 -* Adding my ScriptBar program by @raguay in https://github.com/wailsapp/wails/pull/1761 -* Link to general webview2 runtime download page and not to a specific language by @stffabi in https://github.com/wailsapp/wails/pull/1764 -* Updated translations in https://github.com/wailsapp/wails/pull/1719 and https://github.com/wailsapp/wails/pull/1720 -* Remove text outside style's brackets by @DragoSpiro98 in https://github.com/wailsapp/wails/pull/1765 + +- Bug fix collecting of output binaries for platforms by @stffabi in https://github.com/wailsapp/wails/pull/1715 +- Fix registration of exposed fields by @ValentinTrinque in https://github.com/wailsapp/wails/pull/1727 +- Fix column widths for doctor command's dependencies table by @ianmjones in https://github.com/wailsapp/wails/pull/1717 +- Do not generate bindings for `OnBeforeClose` method + +### Changed + +- Misc code refactors and removal by @leaanthony in https://github.com/wailsapp/wails/pull/1713 +- Add react-router to routing.mdx by @Maicarons2022 in https://github.com/wailsapp/wails/pull/1755 +- Add Japanese to doc by @RyoTagami in https://github.com/wailsapp/wails/pull/1716 +- Added EmailIt and Modal File Manager by @raguay in https://github.com/wailsapp/wails/pull/1728 +- Adding my ScriptBar program by @raguay in https://github.com/wailsapp/wails/pull/1761 +- Link to general webview2 runtime download page and not to a specific language by @stffabi in https://github.com/wailsapp/wails/pull/1764 +- Updated translations in https://github.com/wailsapp/wails/pull/1719 and https://github.com/wailsapp/wails/pull/1720 +- Remove text outside style's brackets by @DragoSpiro98 in https://github.com/wailsapp/wails/pull/1765 ### New Contributors -* @RyoTagami made their first contribution in https://github.com/wailsapp/wails/pull/1716 -* @raguay made their first contribution in https://github.com/wailsapp/wails/pull/1728 -* @Maicarons2022 made their first contribution in https://github.com/wailsapp/wails/pull/1755 -* @DragoSpiro98 made their first contribution in https://github.com/wailsapp/wails/pull/1765 + +- @RyoTagami made their first contribution in https://github.com/wailsapp/wails/pull/1716 +- @raguay made their first contribution in https://github.com/wailsapp/wails/pull/1728 +- @Maicarons2022 made their first contribution in https://github.com/wailsapp/wails/pull/1755 +- @DragoSpiro98 made their first contribution in https://github.com/wailsapp/wails/pull/1765 ## [v2.0.0-beta.43] - 2022-08-08 ### Added -* Add support for retrieving the release notes from Github by @leaanthony in https://github.com/wailsapp/wails/pull/1679 -* Add `frontend:dev:install` configuration by @LGiki in https://github.com/wailsapp/wails/pull/1666 +- Add support for retrieving the release notes from Github by @leaanthony in https://github.com/wailsapp/wails/pull/1679 +- Add `frontend:dev:install` configuration by @LGiki in https://github.com/wailsapp/wails/pull/1666 ### Fixed -* Fix formatting of some error messages by @stffabi in https://github.com/wailsapp/wails/pull/1665 -* Windows dialogs now work when window is not visible yet by @leaanthony in https://github.com/wailsapp/wails/pull/1662 -* Multiple fixes for MacOS asset requests by @stffabi in https://github.com/wailsapp/wails/pull/1668 +- Fix formatting of some error messages by @stffabi in https://github.com/wailsapp/wails/pull/1665 +- Windows dialogs now work when window is not visible yet by @leaanthony in https://github.com/wailsapp/wails/pull/1662 +- Multiple fixes for MacOS asset requests by @stffabi in https://github.com/wailsapp/wails/pull/1668 and https://github.com/wailsapp/wails/pull/1681 -* Fix for Go 1.19 by @stffabi in https://github.com/wailsapp/wails/pull/1689 -* Removed Linux warnings by @leaanthony in https://github.com/wailsapp/wails/pull/1656 -* Better support for doubleclick events in drag regions by @leaanthony in https://github.com/wailsapp/wails/pull/1704 -* Allow MacOS frameless window to be miniturisable by @leaanthony in https://github.com/wailsapp/wails/pull/1705 - -### What's Changed - -* add wails-sveltekit-template by @h8gi in https://github.com/wailsapp/wails/pull/1671 -* wails doctor now reports correct MacOS os id by @stffabi in https://github.com/wailsapp/wails/pull/1673 -* Update application-development.mdx by @SamHennessy in https://github.com/wailsapp/wails/pull/1682 -* Move SetMin/Max calls to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1684 -* Change `frontend:dev` to `frontend:dev:build` by @LGiki in https://github.com/wailsapp/wails/pull/1691 -* Build frontend only before starting the dev watcher command by @stffabi in https://github.com/wailsapp/wails/pull/1694 -* Improve error message for auto dev server discovery without a dev watcher by @stffabi +- Fix for Go 1.19 by @stffabi in https://github.com/wailsapp/wails/pull/1689 +- Removed Linux warnings by @leaanthony in https://github.com/wailsapp/wails/pull/1656 +- Better support for doubleclick events in drag regions by @leaanthony in https://github.com/wailsapp/wails/pull/1704 +- Allow MacOS frameless window to be miniturisable by @leaanthony in https://github.com/wailsapp/wails/pull/1705 + +### Changed + +- add wails-sveltekit-template by @h8gi in https://github.com/wailsapp/wails/pull/1671 +- wails doctor now reports correct MacOS os id by @stffabi in https://github.com/wailsapp/wails/pull/1673 +- Update application-development.mdx by @SamHennessy in https://github.com/wailsapp/wails/pull/1682 +- Move SetMin/Max calls to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1684 +- Change `frontend:dev` to `frontend:dev:build` by @LGiki in https://github.com/wailsapp/wails/pull/1691 +- Build frontend only before starting the dev watcher command by @stffabi in https://github.com/wailsapp/wails/pull/1694 +- Improve error message for auto dev server discovery without a dev watcher by @stffabi in https://github.com/wailsapp/wails/pull/1711 ### New Contributors -* @h8gi made their first contribution in https://github.com/wailsapp/wails/pull/1671 -* @SamHennessy made their first contribution in https://github.com/wailsapp/wails/pull/1682 +- @h8gi made their first contribution in https://github.com/wailsapp/wails/pull/1671 +- @SamHennessy made their first contribution in https://github.com/wailsapp/wails/pull/1682 ## [v2.0.0-beta.42] - 2022-07-25 ### Added -* Added `options.NewRGBA` and `options.NewRGB` functions to create `*options.RGBA` by @leaanthony +- Added `options.NewRGBA` and `options.NewRGB` functions to create `*options.RGBA` by @leaanthony ### Fixed -* Fixed initial build of frontend when using `wails dev` on new projects by @leaanthony +- Fixed initial build of frontend when using `wails dev` on new projects by @leaanthony in https://github.com/wailsapp/wails/pull/1650 -* Ignore empty install command when running `wails dev` by @stffabi in https://github.com/wailsapp/wails/pull/1651 -* Fixed error reporting in templates -* BackgroundColour documentation fix -* Generalize manual compile steps [Documentation] by @acheong08 in https://github.com/wailsapp/wails/pull/1644 +- Ignore empty install command when running `wails dev` by @stffabi in https://github.com/wailsapp/wails/pull/1651 +- Fixed error reporting in templates +- BackgroundColour documentation fix +- Generalize manual compile steps [Documentation] by @acheong08 in https://github.com/wailsapp/wails/pull/1644 ## [v2.0.0-beta.40] - 2022-07-24 ### Added -* Add Show() and Hide() to runtime to show/hide application by @leaanthony +- Add Show() and Hide() to runtime to show/hide application by @leaanthony in https://github.com/wailsapp/wails/pull/1599 -* Override target platform/arch using GOOS and GOARCH environment variables by @leaanthony +- Override target platform/arch using GOOS and GOARCH environment variables by @leaanthony in https://github.com/wailsapp/wails/pull/1618 -* Add option to skip frontend rebuild in dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1632 +- Add option to skip frontend rebuild in dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1632 ### Fixed -* Update svelte templates to use vite 3 by @leaanthony in https://github.com/wailsapp/wails/pull/1643 -* Fix plain template by @stffabi in https://github.com/wailsapp/wails/pull/1609 -* Fix Website layout by @leaanthony in https://github.com/wailsapp/wails/pull/1616 -* Fixed typo in documentation page docs/howdoesitwork by @MyNameIsAres in https://github.com/wailsapp/wails/pull/1636 -* Use scaling when setting min/max window by @leaanthony in https://github.com/wailsapp/wails/pull/1557 +- Update svelte templates to use vite 3 by @leaanthony in https://github.com/wailsapp/wails/pull/1643 +- Fix plain template by @stffabi in https://github.com/wailsapp/wails/pull/1609 +- Fix Website layout by @leaanthony in https://github.com/wailsapp/wails/pull/1616 +- Fixed typo in documentation page docs/howdoesitwork by @MyNameIsAres in https://github.com/wailsapp/wails/pull/1636 +- Use scaling when setting min/max window by @leaanthony in https://github.com/wailsapp/wails/pull/1557 ### Changed -* Install dev dependencies before starting dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1615 -* Translate and fix website text by @misitebao in https://github.com/wailsapp/wails/pull/1525 -* docs: add MyNameIsAres as a contributor for doc by @allcontributors in https://github.com/wailsapp/wails/pull/1638 -* Deprecate Fullscreen appoption by @acheong08 in https://github.com/wailsapp/wails/pull/1640 +- Install dev dependencies before starting dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1615 +- Translate and fix website text by @misitebao in https://github.com/wailsapp/wails/pull/1525 +- docs: add MyNameIsAres as a contributor for doc by @allcontributors in https://github.com/wailsapp/wails/pull/1638 +- Deprecate Fullscreen appoption by @acheong08 in https://github.com/wailsapp/wails/pull/1640 ### Deprecated -* The `Fullscreen` application option is deprecated. Please +- The `Fullscreen` application option is deprecated. Please use [`WindowStartState`](https://wails.io/docs/reference/options#windowstartstate) instead. ### New Contributors -* @MyNameIsAres made their first contribution in https://github.com/wailsapp/wails/pull/1636 +- @MyNameIsAres made their first contribution in https://github.com/wailsapp/wails/pull/1636 ## [v2.0.0-beta.39.2] - 2022-07-20 ### Added -* Update example for macOS Menu by @acheong08 in https://github.com/wailsapp/wails/pull/1600 +- Update example for macOS Menu by @acheong08 in https://github.com/wailsapp/wails/pull/1600 ### Fixed -* Reinstate Go 1.17 compatibility by @leaanthony in https://github.com/wailsapp/wails/pull/1605 +- Reinstate Go 1.17 compatibility by @leaanthony in https://github.com/wailsapp/wails/pull/1605 ## [v2.0.0-beta.39] - 2022-07-19 ### Added -* New screen dimensions runtime API by @skamensky in https://github.com/wailsapp/wails/pull/1519 -* Auto discover vite devserver port by @leaanthony in https://github.com/wailsapp/wails/pull/1547 -* Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551 -* New pre-build hooks feature by @leaanthony in https://github.com/wailsapp/wails/pull/1578 -* New production log level option by @leaanthony in https://github.com/wailsapp/wails/pull/1555 +- New screen dimensions runtime API by @skamensky in https://github.com/wailsapp/wails/pull/1519 +- Auto discover vite devserver port by @leaanthony in https://github.com/wailsapp/wails/pull/1547 +- Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551 +- New pre-build hooks feature by @leaanthony in https://github.com/wailsapp/wails/pull/1578 +- New production log level option by @leaanthony in https://github.com/wailsapp/wails/pull/1555 ### Fixed -* Fix stack corruption in Windows when using ICoreWebView2HttpHeadersCollectionIterator by @stffabi +- Fix stack corruption in Windows when using ICoreWebView2HttpHeadersCollectionIterator by @stffabi in https://github.com/wailsapp/wails/pull/1589 -* Move WindowGet* to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1464 -* Allow -appargs flag to pass flags to binary. by @ianmjones in https://github.com/wailsapp/wails/pull/1534 -* Fix checking for installed apt package in none English session. by @ianmjones +- Move WindowGet\* to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1464 +- Allow -appargs flag to pass flags to binary. by @ianmjones in https://github.com/wailsapp/wails/pull/1534 +- Fix checking for installed apt package in none English session. by @ianmjones in https://github.com/wailsapp/wails/pull/1548 -* Fix OnBeforeClose code for Mac by @leaanthony in https://github.com/wailsapp/wails/pull/1558 -* Support Maps in TS conversion by @leaanthony in https://github.com/wailsapp/wails/pull/1435 -* Check for line length when scanning for local devserver url by @leaanthony +- Fix OnBeforeClose code for Mac by @leaanthony in https://github.com/wailsapp/wails/pull/1558 +- Support Maps in TS conversion by @leaanthony in https://github.com/wailsapp/wails/pull/1435 +- Check for line length when scanning for local devserver url by @leaanthony in https://github.com/wailsapp/wails/pull/1566 -* Remove usage of unsafe.Pointer in winc by @stffabi and @leaanthony in https://github.com/wailsapp/wails/pull/1556 +- Remove usage of unsafe.Pointer in winc by @stffabi and @leaanthony in https://github.com/wailsapp/wails/pull/1556 ### Changed -* Rename WindowSetRGBA -> WindowSetBackgroundColour by @leaanthony in https://github.com/wailsapp/wails/pull/1506 -* Improvements to the dev command by @stffabi in https://github.com/wailsapp/wails/pull/1510 -* Update vscode template by @leaanthony in https://github.com/wailsapp/wails/pull/1398 -* Bump svelte from 3.42.2 to 3.49.0 in /v2/internal/frontend/runtime/dev by @dependabot +- Rename WindowSetRGBA -> WindowSetBackgroundColour by @leaanthony in https://github.com/wailsapp/wails/pull/1506 +- Improvements to the dev command by @stffabi in https://github.com/wailsapp/wails/pull/1510 +- Update vscode template by @leaanthony in https://github.com/wailsapp/wails/pull/1398 +- Bump svelte from 3.42.2 to 3.49.0 in /v2/internal/frontend/runtime/dev by @dependabot in https://github.com/wailsapp/wails/pull/1572 -* Bump svelte from 3.42.5 to 3.49.0 in /v2/internal/frontend/runtime by @dependabot +- Bump svelte from 3.42.5 to 3.49.0 in /v2/internal/frontend/runtime by @dependabot in https://github.com/wailsapp/wails/pull/1573 -* Add troubleshooting for `Not Found` error by @acheong08 in https://github.com/wailsapp/wails/pull/1586 -* Docs/better homepage by @leaanthony in https://github.com/wailsapp/wails/pull/1591 +- Add troubleshooting for `Not Found` error by @acheong08 in https://github.com/wailsapp/wails/pull/1586 +- Docs/better homepage by @leaanthony in https://github.com/wailsapp/wails/pull/1591 ### New Contributors -* @skamensky made their first contribution in https://github.com/wailsapp/wails/pull/1519 -* @acheong08 made their first contribution in https://github.com/wailsapp/wails/pull/1586 +- @skamensky made their first contribution in https://github.com/wailsapp/wails/pull/1519 +- @acheong08 made their first contribution in https://github.com/wailsapp/wails/pull/1586 **Full Changelog**: https://github.com/wailsapp/wails/compare/v2.0.0-beta.38...v2.0.0-beta.39 @@ -185,107 +191,110 @@ UseCSSDrag: true, ### Added -* Add race detector to build & dev by @Lyimmi in https://github.com/wailsapp/wails/pull/1426 -* [linux] Support `linux/arm` architecture by @Lyimmi in https://github.com/wailsapp/wails/pull/1427 -* Create gitignore when using `-g` option by @jaesung9507 in https://github.com/wailsapp/wails/pull/1430 -* [windows] Add Suspend/Resume callback support by @leaanthony in https://github.com/wailsapp/wails/pull/1474 -* Add runtime function `WindowSetAlwaysOnTop` by @chenxiao1990 in https://github.com/wailsapp/wails/pull/1442 -* [windows] Allow setting browser path by @NanoNik in https://github.com/wailsapp/wails/pull/1448 +- Add race detector to build & dev by @Lyimmi in https://github.com/wailsapp/wails/pull/1426 +- [linux] Support `linux/arm` architecture by @Lyimmi in https://github.com/wailsapp/wails/pull/1427 +- Create gitignore when using `-g` option by @jaesung9507 in https://github.com/wailsapp/wails/pull/1430 +- [windows] Add Suspend/Resume callback support by @leaanthony in https://github.com/wailsapp/wails/pull/1474 +- Add runtime function `WindowSetAlwaysOnTop` by @chenxiao1990 in https://github.com/wailsapp/wails/pull/1442 +- [windows] Allow setting browser path by @NanoNik in https://github.com/wailsapp/wails/pull/1448 ### Fixed -* [linux] Improve switching to main thread for callbacks by @stffabi in https://github.com/wailsapp/wails/pull/1392 -* [windows] Fix WebView2 minimum runtime version check by @stffabi in https://github.com/wailsapp/wails/pull/1456 -* [linux] Fix apt command syntax (#1458) by @abtin in https://github.com/wailsapp/wails/pull/1461 -* [windows] Set Window Background colour if provided + debounce redraw option by @leaanthony +- [linux] Improve switching to main thread for callbacks by @stffabi in https://github.com/wailsapp/wails/pull/1392 +- [windows] Fix WebView2 minimum runtime version check by @stffabi in https://github.com/wailsapp/wails/pull/1456 +- [linux] Fix apt command syntax (#1458) by @abtin in https://github.com/wailsapp/wails/pull/1461 +- [windows] Set Window Background colour if provided + debounce redraw option by @leaanthony in https://github.com/wailsapp/wails/pull/1466 -* Fix small typo in docs by @LukenSkyne in https://github.com/wailsapp/wails/pull/1449 -* Fix the url to surge by @andywenk in https://github.com/wailsapp/wails/pull/1460 -* Fixed theme change at runtime by @leaanthony in https://github.com/wailsapp/wails/pull/1473 -* Fix: Don't stop if unable to remove temporary bindings build by @leaanthony +- Fix small typo in docs by @LukenSkyne in https://github.com/wailsapp/wails/pull/1449 +- Fix the url to surge by @andywenk in https://github.com/wailsapp/wails/pull/1460 +- Fixed theme change at runtime by @leaanthony in https://github.com/wailsapp/wails/pull/1473 +- Fix: Don't stop if unable to remove temporary bindings build by @leaanthony in https://github.com/wailsapp/wails/pull/1465 -* [windows] Pass the correct installationStatus to the webview installation strategy by @stffabi +- [windows] Pass the correct installationStatus to the webview installation strategy by @stffabi in https://github.com/wailsapp/wails/pull/1483 -* [windows] Make `SetBackgroundColour` compatible for `windows/386` by @stffabi +- [windows] Make `SetBackgroundColour` compatible for `windows/386` by @stffabi in https://github.com/wailsapp/wails/pull/1493 -* Fix lit-ts template by @Orijhins in https://github.com/wailsapp/wails/pull/1494 +- Fix lit-ts template by @Orijhins in https://github.com/wailsapp/wails/pull/1494 ### Changed -* [windows] Load WebView2 loader from embedded only by @stffabi in https://github.com/wailsapp/wails/pull/1432 -* Add showcase entry for October + update homepage carousel entry for October by @marcus-crane +- [windows] Load WebView2 loader from embedded only by @stffabi in https://github.com/wailsapp/wails/pull/1432 +- Add showcase entry for October + update homepage carousel entry for October by @marcus-crane in https://github.com/wailsapp/wails/pull/1436 -* Always use return in wrapped method by @leaanthony in https://github.com/wailsapp/wails/pull/1410 -* [windows] Unlock OSThread after native calls have been finished by @stffabi +- Always use return in wrapped method by @leaanthony in https://github.com/wailsapp/wails/pull/1410 +- [windows] Unlock OSThread after native calls have been finished by @stffabi in https://github.com/wailsapp/wails/pull/1441 -* Add `BackgroundColour` and deprecate `RGBA` by @leaanthony in https://github.com/wailsapp/wails/pull/1475 -* AssetsHandler remove retry logic in dev mode by @stffabi in https://github.com/wailsapp/wails/pull/1479 -* Add Solid JS template to docs by @sidwebworks in https://github.com/wailsapp/wails/pull/1492 -* Better signal handling by @leaanthony in https://github.com/wailsapp/wails/pull/1488 -* Chore/react 18 create root by @tomanagle in https://github.com/wailsapp/wails/pull/1489 +- Add `BackgroundColour` and deprecate `RGBA` by @leaanthony in https://github.com/wailsapp/wails/pull/1475 +- AssetsHandler remove retry logic in dev mode by @stffabi in https://github.com/wailsapp/wails/pull/1479 +- Add Solid JS template to docs by @sidwebworks in https://github.com/wailsapp/wails/pull/1492 +- Better signal handling by @leaanthony in https://github.com/wailsapp/wails/pull/1488 +- Chore/react 18 create root by @tomanagle in https://github.com/wailsapp/wails/pull/1489 ### New Contributors -* @jaesung9507 made their first contribution in https://github.com/wailsapp/wails/pull/1430 -* @LukenSkyne made their first contribution in https://github.com/wailsapp/wails/pull/1449 -* @andywenk made their first contribution in https://github.com/wailsapp/wails/pull/1460 -* @abtin made their first contribution in https://github.com/wailsapp/wails/pull/1461 -* @chenxiao1990 made their first contribution in https://github.com/wailsapp/wails/pull/1442 -* @NanoNik made their first contribution in https://github.com/wailsapp/wails/pull/1448 -* @sidwebworks made their first contribution in https://github.com/wailsapp/wails/pull/1492 -* @tomanagle made their first contribution in https://github.com/wailsapp/wails/pull/1489 +- @jaesung9507 made their first contribution in https://github.com/wailsapp/wails/pull/1430 +- @LukenSkyne made their first contribution in https://github.com/wailsapp/wails/pull/1449 +- @andywenk made their first contribution in https://github.com/wailsapp/wails/pull/1460 +- @abtin made their first contribution in https://github.com/wailsapp/wails/pull/1461 +- @chenxiao1990 made their first contribution in https://github.com/wailsapp/wails/pull/1442 +- @NanoNik made their first contribution in https://github.com/wailsapp/wails/pull/1448 +- @sidwebworks made their first contribution in https://github.com/wailsapp/wails/pull/1492 +- @tomanagle made their first contribution in https://github.com/wailsapp/wails/pull/1489 ## [v2.0.0-beta.37] - 2022-05-26 ### Added -* Add `nogen` flag in wails dev command by @mondy in https://github.com/wailsapp/wails/pull/1413 -* Initial support for new native translucency in Windows Preview by @leaanthony +- Add `nogen` flag in wails dev command by @mondy in https://github.com/wailsapp/wails/pull/1413 +- Initial support for new native translucency in Windows Preview by @leaanthony in https://github.com/wailsapp/wails/pull/1400 ### Fixed -* Bugfix/incorrect bindings by @leaanthony in https://github.com/wailsapp/wails/pull/1383 -* Fix runtime.js events by @polikow in https://github.com/wailsapp/wails/pull/1369 -* Fix docs formatting by @antimatter96 in https://github.com/wailsapp/wails/pull/1372 -* Events | fixes #1388 by @lambdajack in https://github.com/wailsapp/wails/pull/1390 -* bugfix: correct typo by @tmclane in https://github.com/wailsapp/wails/pull/1391 -* Fix typo in docs by @LGiki in https://github.com/wailsapp/wails/pull/1393 -* Fix typo bindings.js to ipc.js by @rayshoo in https://github.com/wailsapp/wails/pull/1406 -* Make sure to execute the menu callbacks on a new goroutine by @stffabi in https://github.com/wailsapp/wails/pull/1403 -* Update runtime.d.ts & templates by @Yz4230 in https://github.com/wailsapp/wails/pull/1421 -* Add missing className to input in React and Preact templates by @edwardbrowncross in https://github.com/wailsapp/wails/pull/1419 +- Bugfix/incorrect bindings by @leaanthony in https://github.com/wailsapp/wails/pull/1383 +- Fix runtime.js events by @polikow in https://github.com/wailsapp/wails/pull/1369 +- Fix docs formatting by @antimatter96 in https://github.com/wailsapp/wails/pull/1372 +- Events | fixes #1388 by @lambdajack in https://github.com/wailsapp/wails/pull/1390 +- bugfix: correct typo by @tmclane in https://github.com/wailsapp/wails/pull/1391 +- Fix typo in docs by @LGiki in https://github.com/wailsapp/wails/pull/1393 +- Fix typo bindings.js to ipc.js by @rayshoo in https://github.com/wailsapp/wails/pull/1406 +- Make sure to execute the menu callbacks on a new goroutine by @stffabi in https://github.com/wailsapp/wails/pull/1403 +- Update runtime.d.ts & templates by @Yz4230 in https://github.com/wailsapp/wails/pull/1421 +- Add missing className to input in React and Preact templates by @edwardbrowncross in https://github.com/wailsapp/wails/pull/1419 ### Changed -* Improve multi-platform builds by @stffabi in https://github.com/wailsapp/wails/pull/1373 -* During wails dev only use reload logic if no AssetsHandler are in use by @stffabi in https://github.com/wailsapp/wails/pull/1385 -* Update events.mdx by @Junkher in https://github.com/wailsapp/wails/pull/1387 -* Add Next.js template by @LGiki in https://github.com/wailsapp/wails/pull/1394 -* Add docs on wails generate module by @TechplexEngineer in https://github.com/wailsapp/wails/pull/1414 -* Add macos custom menu EditMenu tips by @daodao97 in https://github.com/wailsapp/wails/pull/1423 + +- Improve multi-platform builds by @stffabi in https://github.com/wailsapp/wails/pull/1373 +- During wails dev only use reload logic if no AssetsHandler are in use by @stffabi in https://github.com/wailsapp/wails/pull/1385 +- Update events.mdx by @Junkher in https://github.com/wailsapp/wails/pull/1387 +- Add Next.js template by @LGiki in https://github.com/wailsapp/wails/pull/1394 +- Add docs on wails generate module by @TechplexEngineer in https://github.com/wailsapp/wails/pull/1414 +- Add macos custom menu EditMenu tips by @daodao97 in https://github.com/wailsapp/wails/pull/1423 ### New Contributors -* @polikow made their first contribution in https://github.com/wailsapp/wails/pull/1369 -* @antimatter96 made their first contribution in https://github.com/wailsapp/wails/pull/1372 -* @Junkher made their first contribution in https://github.com/wailsapp/wails/pull/1387 -* @lambdajack made their first contribution in https://github.com/wailsapp/wails/pull/1390 -* @LGiki made their first contribution in https://github.com/wailsapp/wails/pull/1393 -* @rayshoo made their first contribution in https://github.com/wailsapp/wails/pull/1406 -* @TechplexEngineer made their first contribution in https://github.com/wailsapp/wails/pull/1414 -* @mondy made their first contribution in https://github.com/wailsapp/wails/pull/1413 -* @Yz4230 made their first contribution in https://github.com/wailsapp/wails/pull/1421 -* @daodao97 made their first contribution in https://github.com/wailsapp/wails/pull/1423 -* @edwardbrowncross made their first contribution in https://github.com/wailsapp/wails/pull/1419 +- @polikow made their first contribution in https://github.com/wailsapp/wails/pull/1369 +- @antimatter96 made their first contribution in https://github.com/wailsapp/wails/pull/1372 +- @Junkher made their first contribution in https://github.com/wailsapp/wails/pull/1387 +- @lambdajack made their first contribution in https://github.com/wailsapp/wails/pull/1390 +- @LGiki made their first contribution in https://github.com/wailsapp/wails/pull/1393 +- @rayshoo made their first contribution in https://github.com/wailsapp/wails/pull/1406 +- @TechplexEngineer made their first contribution in https://github.com/wailsapp/wails/pull/1414 +- @mondy made their first contribution in https://github.com/wailsapp/wails/pull/1413 +- @Yz4230 made their first contribution in https://github.com/wailsapp/wails/pull/1421 +- @daodao97 made their first contribution in https://github.com/wailsapp/wails/pull/1423 +- @edwardbrowncross made their first contribution in https://github.com/wailsapp/wails/pull/1419 ## [v2.0.0-beta.36] - 2022-04-27 ### Fixed + - [v2] Validate devServer property to be of the correct form by [@stffabi](https://github.com/stffabi) in https://github.com/wailsapp/wails/pull/1359 - [v2, darwin] Initialize native variables on stack to prevent segfault by [@stffabi](https://github.com/stffabi) in https://github.com/wailsapp/wails/pull/1362 - Vue-TS template fix ### Changed + - Added `OnStartup` method back to default templates ## [v2.0.0-beta.35] - 2022-04-27 @@ -345,36 +354,39 @@ UseCSSDrag: true, ### Added - Add support for 'DomReady' callback on linux by [@napalu](https://github.com/napalu) in #1249 -- MacOS - Show extension by default by [@leaanthony](https://github.com/leaanthony) in #1228 +- MacOS - Show extension by default by [@leaanthony](https://github.com/leaanthony) in #1228 ### Fixed - [v2, nsis] Seems like / as path separator works only for some directives in a cross platform way by [@stffabi](https://github.com/stffabi) in #1227 -- import models on binding definition by [@adalessa](https://github.com/adalessa) in #1231 -- Use local search on website by [@leaanthony](https://github.com/leaanthony) in #1234 +- import models on binding definition by [@adalessa](https://github.com/adalessa) in #123 + + 1 + +- Use local search on website by [@leaanthony](https://github.com/leaanthony) in #1234 - Ensure binary resources can be served by [@napalu](https://github.com/napalu) in #1240 -- Only retry loading assets when loading from disk by [@leaanthony](https://github.com/leaanthony) in #1241 +- Only retry loading assets when loading from disk by [@leaanthony](https://github.com/leaanthony) in #1241 - [v2, windows] Fix maximised start state by [@stffabi](https://github.com/stffabi) in #1243 - Ensure Linux IsFullScreen uses GDK_WINDOW_STATE_FULLSCREEN bitmask appropriately. by [@ianmjones](https://github.com/ianmjones) in #1245 -- Fix memory leak in ExecJS for Mac by [@leaanthony](https://github.com/leaanthony) in #1230 +- Fix memory leak in ExecJS for Mac by [@leaanthony](https://github.com/leaanthony) in #1230 - Fix, or at least a workaround, for (#1232) by [@BillBuilt](https://github.com/BillBuilt) in #1247 - [v2] Use os.Args[0] for self starting wails by [@stffabi](https://github.com/stffabi) in #1258 - [v2, windows] Windows switch scheme: https -> http by @stefpap in #1255 -- Ensure Focus is regained by Webview2 when tabbing by [@leaanthony](https://github.com/leaanthony) in #1257 -- Try to focus window when Show() is called. by [@leaanthony](https://github.com/leaanthony) in #1212 -- Check system for user installed Linux dependencies by [@leaanthony](https://github.com/leaanthony) in #1180 +- Ensure Focus is regained by Webview2 when tabbing by [@leaanthony](https://github.com/leaanthony) in #1257 +- Try to focus window when Show() is called. by [@leaanthony](https://github.com/leaanthony) in #1212 +- Check system for user installed Linux dependencies by [@leaanthony](https://github.com/leaanthony) in #1180 ### Changed - feat(website): sync documents and add content by [@misitebao](https://github.com/misitebao) in #1215 - refactor(cli): optimize default templates by [@misitebao](https://github.com/misitebao) in #1214 -- Run watcher after initial build by [@leaanthony](https://github.com/leaanthony) in #1216 -- Feature/docs update by [@leaanthony](https://github.com/leaanthony) in #1218 +- Run watcher after initial build by [@leaanthony](https://github.com/leaanthony) in #1216 +- Feature/docs update by [@leaanthony](https://github.com/leaanthony) in #1218 - feat(website): optimize website and sync documents by [@misitebao](https://github.com/misitebao) in #1219 - docs: sync documents by [@misitebao](https://github.com/misitebao) in #1224 -- Default index page by [@leaanthony](https://github.com/leaanthony) in #1229 +- Default index page by [@leaanthony](https://github.com/leaanthony) in #1229 - Build added win32 compatibility by [@fengweiqiang](https://github.com/fengweiqiang) in #1238 - docs: sync documents by [@misitebao](https://github.com/misitebao) in #1260 @@ -401,5 +413,16 @@ UseCSSDrag: true, - The docs have been improved and updated - Added troubleshooting guide -[unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...HEAD +[unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.44...HEAD +[v2.0.0-beta.44]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.43...v2.0.0-beta.44 +[v2.0.0-beta.43]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.42...v2.0.0-beta.43 +[v2.0.0-beta.42]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.40...v2.0.0-beta.42 +[v2.0.0-beta.40]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.39.2...v2.0.0-beta.40 +[v2.0.0-beta.39.2]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.39...v2.0.0-beta.39.2 +[v2.0.0-beta.39]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.38...v2.0.0-beta.39 +[v2.0.0-beta.38]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.37...v2.0.0-beta.38 +[v2.0.0-beta.37]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.36...v2.0.0-beta.37 +[v2.0.0-beta.36]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.35...v2.0.0-beta.36 +[v2.0.0-beta.35]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.34...v2.0.0-beta.35 +[v2.0.0-beta.34]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...v2.0.0-beta.34 [v2.0.0-beta.33]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.32...v2.0.0-beta.33 diff --git a/website/src/pages/community-guide.md b/website/src/pages/community-guide.mdx similarity index 58% rename from website/src/pages/community-guide.md rename to website/src/pages/community-guide.mdx index 686c1039320..1525bed0397 100644 --- a/website/src/pages/community-guide.md +++ b/website/src/pages/community-guide.mdx @@ -1,3 +1,5 @@ # Community Guide The number of Wails users is growing at an incredible rate, and if you're reading this, chances are you're ready to join. So... welcome! + +To become a contributor please see the [ways of contributing](/docs/next/contributing/ways-of-contributing). diff --git a/website/src/pages/credits.mdx b/website/src/pages/credits.mdx index b0b3ff40319..3100149864d 100644 --- a/website/src/pages/credits.mdx +++ b/website/src/pages/credits.mdx @@ -24,98 +24,96 @@ - + - + -
-
+
+
- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + directory - + - + - + - + - + - + - + - + -`, - }} -/> +`, }} /> ## Contributors @@ -296,7 +294,7 @@ directory ## Special Mentions - [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and -[go-winloader](https://github.com/jchv/go-winloader) have made the Windows version possible. + [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version possible. - [Tad Vizbaras](https://github.com/tadvi) - His winc project was the first step down the path to a pure Go Wails. - [Mat Ryer](https://github.com/matryer) - For advice, support and bants. - [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been invaluable. diff --git a/website/src/pages/faq.md b/website/src/pages/faq.md deleted file mode 100644 index 32cce9075d6..00000000000 --- a/website/src/pages/faq.md +++ /dev/null @@ -1 +0,0 @@ -# FAQ \ No newline at end of file diff --git a/website/src/pages/faq.mdx b/website/src/pages/faq.mdx new file mode 100644 index 00000000000..77b3acd4e1c --- /dev/null +++ b/website/src/pages/faq.mdx @@ -0,0 +1,9 @@ +# FAQ + +## What's with the name? + +When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the English name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it stuck. + +## Is this an alternative to Electron? + +Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop applications or add a frontend to their existing applications. Wails v2 does offer native elements such as menus and dialogs, so it is becoming a lightweight electron alternative. diff --git a/website/static/img/architecture.png b/website/static/img/architecture.png new file mode 100644 index 00000000000..e3d56081d2f Binary files /dev/null and b/website/static/img/architecture.png differ diff --git a/website/versions.json b/website/versions.json index 313b863ea53..f6c9bdab351 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1 +1 @@ -["v2.0.0-beta.44","v2.0.0-beta.43"] \ No newline at end of file +["v2.0.0-beta.44", "v2.0.0-beta.43"]