mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
feat(website): optimize and sync websites and documents (#1110)
* feat(website): update dependencies and optimize some terms * docs: optimize english documents * docs: sync documents * chore(website): the website project adds the recommended configuration of the vscode plugin * ensure data doesn't get garbage collected too soon (#1113) * ensure data doesn't get garbage collected too soon * Update v2/internal/frontend/desktop/linux/frontend.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: stffabi <stffabi@users.noreply.github.com> * revert: undo lock-file changes * Feature/v2 linux menus (#1114) * Render menubar + text menu items * Support disabled menuitems + callbacks * Support checkboxes * Support reusing checkboxes * Support submenus * Support Radio menuitems * Support Menu Accelerators * Support MenuUpdateApplicationMenu * Fixes #1108 (#1115) * chore(action): add auto sync script (#1109) * Support RGBA, fix compilation error * Fix fullscreen drag * Ignore setenv error * ensure data doesn't get garbage collected too soon (#1113) * ensure data doesn't get garbage collected too soon * Update v2/internal/frontend/desktop/linux/frontend.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Feature/v2 linux menus (#1114) * Render menubar + text menu items * Support disabled menuitems + callbacks * Support checkboxes * Support reusing checkboxes * Support submenus * Support Radio menuitems * Support Menu Accelerators * Support MenuUpdateApplicationMenu * Fixes #1108 (#1115) * chore(action): add auto sync script (#1109) * Support RGBA, fix compilation error * Fix fullscreen drag * Ignore setenv error * feat(website): update dependencies and optimize some terms * docs: optimize english documents * docs: sync documents * chore(website): the website project adds the recommended configuration of the vscode plugin * revert: undo lock-file changes * [linux] better error handling * [linux] Better Go 1.16 support * [linux] Remove Go based dispatcher * feat(website): update dependencies and optimize some terms Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: stffabi <stffabi@users.noreply.github.com>
This commit is contained in:
co-authored by
Travis McLane
Lea Anthony
stffabi
parent
db9e0fd0d3
commit
cd13a05270
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
}
|
||||
@@ -16,7 +16,9 @@ written using Wails. It has menus, supports light and dark desktop themes, and t
|
||||
gives it that 'frosty' effect of a native app.
|
||||
|
||||
<p class="text--center">
|
||||
<a href="https://xbarapp.com"><img src="/img/xbar-app-preview-2.png" width="75%"/></a>
|
||||
<a href="https://xbarapp.com">
|
||||
<img src="/img/xbar-app-preview-2.png" width="75%" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Native Elements
|
||||
@@ -13,15 +13,15 @@ Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wail
|
||||
|
||||
:::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.
|
||||
|
||||
:::
|
||||
|
||||
## Vue
|
||||
|
||||
- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using vue and vue-router
|
||||
- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript)
|
||||
- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features)
|
||||
- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ sidebar_position: 1
|
||||
Wails has a number of common dependencies that are required before installation:
|
||||
|
||||
- Go 1.17+
|
||||
- npm (Node 14+)
|
||||
- NPM (Node 14+)
|
||||
|
||||
### Go
|
||||
|
||||
@@ -27,7 +27,7 @@ Ensure that you follow the official [Go installation instructions](https://golan
|
||||
- Check Go is installed correctly: `go version`
|
||||
- Check "~/go/bin" is in your PATH variable: `echo $PATH | grep go/bin`
|
||||
|
||||
### npm
|
||||
### NPM
|
||||
|
||||
Download NPM from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against.
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ func (b *App) Greet(name string) string {
|
||||
}
|
||||
```
|
||||
|
||||
You may bind as many structs as you like. Just make sure you create an instance of it and pass it in bind:
|
||||
You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`:
|
||||
|
||||
```go {10-12}
|
||||
...
|
||||
@@ -208,9 +208,9 @@ You may bind as many structs as you like. Just make sure you create an instance
|
||||
The bound methods are located in the frontend at `window.go.<packagename>.<struct>.<method>`.
|
||||
In the example above, we bind `app`, which has one public method `Greet`.
|
||||
This can be called in Javascript by calling `window.go.main.App.Greet`.
|
||||
These methods return a promise. A successful call will result in the first return value from the Go call to be passed
|
||||
to the resolve handler. An unsuccessful call is when a Go method that has an error type as it's second return value,
|
||||
passes an error instance back to the caller. This is passed back via the reject handler.
|
||||
These methods return a Promise. A successful call will result in the first return value from the Go call to be passed
|
||||
to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value,
|
||||
passes an error instance back to the caller. This is passed back via the `reject` handler.
|
||||
In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data
|
||||
is passed to it.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ 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 | |
|
||||
|
||||
@@ -222,6 +222,7 @@ NOTE: On Mac, if no menu is specified, a default menu will be created.
|
||||
Name: Logger
|
||||
|
||||
Type: logger.Logger
|
||||
|
||||
Default: Logger to Stdout
|
||||
|
||||
The logger to be used by the application. More details about logging in the [Log Reference](/docs/reference/runtime/log).
|
||||
@@ -231,6 +232,7 @@ The logger to be used by the application. More details about logging in the [Log
|
||||
Name: LogLevel
|
||||
|
||||
Type: logger.LogLevel
|
||||
|
||||
Default: `Info` in dev mode, `Error` in production mode
|
||||
|
||||
The default log level. More details about logging in the [Log Reference](/docs/reference/runtime/log).
|
||||
|
||||
@@ -22,5 +22,13 @@
|
||||
"sidebar.tutorialSidebar.category.Guides": {
|
||||
"message": "Guides",
|
||||
"description": "The label for category Guides in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Community": {
|
||||
"message": "Community",
|
||||
"description": "The label for category Community in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Showcase": {
|
||||
"message": "Showcase",
|
||||
"description": "The label for category Showcase in sidebar tutorialSidebar"
|
||||
}
|
||||
}
|
||||
@@ -23,4 +23,4 @@
|
||||
"message": "Sponsor ❤",
|
||||
"description": "Navbar item with label Sponsor"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@
|
||||
"message": "使用 Go + HTML + CSS + JS 构建桌面应用"
|
||||
},
|
||||
"homepage.ButtonText": {
|
||||
"message": "开始使用"
|
||||
"message": "快速入门"
|
||||
},
|
||||
"homepage.Features.Title1": {
|
||||
"message": "功能丰富"
|
||||
@@ -195,12 +195,12 @@
|
||||
"message": "方便快捷"
|
||||
},
|
||||
"homepage.Features.Description1": {
|
||||
"message": "使用原生UI元素(如菜单、对话框等)构建全面的跨平台应用程序。"
|
||||
"message": "使用菜单、对话框等原生 UI 元素构建全面的跨平台应用程序。"
|
||||
},
|
||||
"homepage.Features.Description2": {
|
||||
"message": "使用您已经知道的技术来构建出色的应用程序。"
|
||||
},
|
||||
"homepage.Features.Description3": {
|
||||
"message": "使用Wails CLI快速生成,构建和打包项目。"
|
||||
"message": "使用Wails CLI快速生成、构建和打包项目。"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"description": "The description for the blog used in SEO"
|
||||
},
|
||||
"sidebar.title": {
|
||||
"message": "最近文章",
|
||||
"message": "最新发布",
|
||||
"description": "The label for the left sidebar"
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "The label for version current"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Getting Started": {
|
||||
"message": "开始使用",
|
||||
"message": "快速入门",
|
||||
"description": "The label for category Getting Started in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Reference": {
|
||||
@@ -24,7 +24,7 @@
|
||||
"description": "The label for category Guides in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Community": {
|
||||
"message": "社区交流",
|
||||
"message": "社区",
|
||||
"description": "The label for category Community in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Showcase": {
|
||||
|
||||
+5
-4
@@ -15,7 +15,9 @@ Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。
|
||||
Wails 一点也不弱!这是 [xbar](https://xbarapp.com) - 一个使用 Wails 编写的 MacOS 桌面应用。它使用 Mac 的系统原生菜单,支持浅色和深色桌面主题,主窗口使用半透明,使其具有原生应用的“冰霜” 效果。
|
||||
|
||||
<div class="text--center">
|
||||
<a href="https://xbarapp.com"><img src="/img/xbar-app-preview-2.png"/></a>
|
||||
<a href="https://xbarapp.com">
|
||||
<img src="/img/xbar-app-preview-2.png" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## 原生元素
|
||||
@@ -36,7 +38,7 @@ Wails 为 Go 和 Javascript 提供了一个运行时库,可以处理现代应
|
||||
|
||||
### 自动重新构建
|
||||
|
||||
当您在“dev“模式下运行您的应用程序时,Wails 会将您的应用程序构建为原生桌面应用程序,但会从磁盘读取您的资源。它将检测您的 Go 代码的任何更改,并自动重新构建和重新启动您的应用程序。
|
||||
当您在“开发”模式下运行您的应用程序时,Wails 会将您的应用程序构建为原生桌面应用程序,但会从磁盘读取您的资源。它将检测您的 Go 代码的任何更改并自动重新构建和重新启动您的应用程序。
|
||||
|
||||
### 自动重新加载
|
||||
|
||||
@@ -48,8 +50,7 @@ Wails 为 Go 和 Javascript 提供了一个运行时库,可以处理现代应
|
||||
|
||||
## 可用于生产的原生二进制文件
|
||||
|
||||
当您准备好完成应用程序的最终构建时,CLI 会将其编译为单个可执行文件,并将所有资源打包到其中。在 Windows 和 MacOS
|
||||
上,可以创建用于分发的原生包。使用打包工具后生成的资源(图标、info.plist、清单文件等)是您项目的一部分,可以自定义,让您完全控制应用程序的构建方式。
|
||||
当您准备好完成应用程序的最终构建时,CLI 会将其编译为单个可执行文件,并将所有资源打包到其中。在 Windows 和 MacOS 上,可以创建用于分发的原生包。使用打包工具后生成的资源(图标、info.plist、清单文件等)是您项目的一部分,可以自定义,让您完全控制应用程序的构建方式。
|
||||
|
||||
## 工具
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
|
||||
# RiftShare
|
||||
|
||||
<p style={{"text-align": "center"}}>
|
||||
<img src="/img/showcase/riftshare-main.webp"></img><br/>
|
||||
</p>
|
||||
|
||||
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!
|
||||
@@ -14,13 +14,13 @@ sidebar_position: 1
|
||||
|
||||
**Wails 项目不维护也不对第 3 方模板负责**
|
||||
|
||||
如果您不确定某个模板,请检查 `package.json` 中运行的脚本和安装的模块。
|
||||
如果您不确定某个模板,请检查 `package.json`和`wails.json` 中安装的模块和运行的脚本。
|
||||
|
||||
:::
|
||||
|
||||
## Vue
|
||||
|
||||
- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - 基于 Vue 和 Vue-Router 的 Wails 模板
|
||||
- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - 基于 Vite、Vue 和 Vue-Router 的 Wails 模板(同时支持 JavaScript 和 TypeScript)
|
||||
- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - 使用 Vite 的 Vue 3 TypeScript(以及添加功能的说明)
|
||||
- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - 使用 Vite, Vuex, Vue Router, Sass, 和 ESLint + Prettier 的 Vue 3 TypeScript
|
||||
|
||||
@@ -36,4 +36,5 @@ sidebar_position: 1
|
||||
## Svelte
|
||||
|
||||
- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - 基于 Svelte 的模板
|
||||
|
||||
- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - 使用 Svelte 和 Vite 的模板
|
||||
- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - 使用 Svelte 和 Vite 和 TailwindCSS v3 的模板
|
||||
|
||||
@@ -34,6 +34,9 @@ sidebar_position: 99
|
||||
<a href="https://github.com/CrackDavid" style="width:100px">
|
||||
<img src="https://github.com/CrackDavid.png?size=100" width="100"/>
|
||||
</a>
|
||||
<a href="https://www.easywebadv.it/" style="width:100px">
|
||||
<img src="/img/easyweb.png" width="100"/>
|
||||
</a>
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/matryer" style="width:100px">
|
||||
@@ -84,21 +87,27 @@ sidebar_position: 99
|
||||
<a href="https://github.com/ilgityildirim" style="width:50px">
|
||||
<img src="https://github.com/ilgityildirim.png?size=50" width="50"/>
|
||||
</a>
|
||||
<a href="https://github.com/ondoki" style="width:65px">
|
||||
<img src="https://github.com/ondoki.png?size=65" width="65"/>
|
||||
</a>
|
||||
<a href="https://github.com/questrail" style="width:50px">
|
||||
<img src="https://github.com/questrail.png?size=50" width="50"/>
|
||||
</a>
|
||||
<a href="https://github.com/DonTomato" style="width:45px">
|
||||
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
|
||||
</a>
|
||||
<a href="https://github.com/taigrr" style="width:45px">
|
||||
<img src="https://github.com/taigrr.png?size=45" width="45"/>
|
||||
<a href="https://github.com/taigrr" style="width:55px">
|
||||
<img src="https://github.com/taigrr.png?size=55" width="55"/>
|
||||
</a>
|
||||
<a href="https://github.com/charlie-dee" style="width:55px">
|
||||
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
|
||||
</a>
|
||||
<a href="https://github.com/EdenNetworkItalia" style="width:65px">
|
||||
<img src="https://github.com/EdenNetworkItalia.png?size=65" width="65"/>
|
||||
</a>
|
||||
<a href="https://github.com/michaelolson1996" style="width:55px">
|
||||
<img src="https://github.com/michaelolson1996.png?size=55" width="55"/>
|
||||
</a>
|
||||
<a href="https://github.com/GargantuaX" style="width:45px">
|
||||
<img src="https://github.com/GargantuaX.png?size=45" width="45"/>
|
||||
</a>
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
|
||||
+4
-1
@@ -13,7 +13,10 @@ sidebar_position: 6
|
||||
<img
|
||||
src="/img/defaultproject.png"
|
||||
width="50%"
|
||||
style={{ "box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px" }}
|
||||
style={{
|
||||
"box-shadow":
|
||||
"rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
+2
-2
@@ -41,8 +41,8 @@ Wails 项目具有以下布局:
|
||||
- `/build/darwin/` - Mac 特定的项目文件
|
||||
- `/build/windows/` - Windows 特定的项目文件
|
||||
- `/wails.json` - 项目配置
|
||||
- `/go.mod` - Go 模块文件
|
||||
- `/go.sum` - Go 模块校验文件
|
||||
- `/go.mod` - Go mod 文件
|
||||
- `/go.sum` - Go mod 校验文件
|
||||
|
||||
`frontend`目录没有特定于 Wails 的内容,可以是您选择的任何前端项目。
|
||||
|
||||
|
||||
+8
-8
@@ -6,17 +6,17 @@ sidebar_position: 1
|
||||
|
||||
## 支持的平台
|
||||
|
||||
- Windows 10
|
||||
- MacOS 10.13+ (amd64)
|
||||
- MacOS 11.0+ (arm64)
|
||||
- Linux (截至时间 12 月 22 日)
|
||||
- Windows 10 AMD64/ARM64
|
||||
- MacOS 10.13+ AMD64
|
||||
- MacOS 11.0+ ARM64
|
||||
- Linux (暂定时间 1 月 22 日)
|
||||
|
||||
## 依赖
|
||||
|
||||
Wails 有许多安装前需要的常见依赖项:
|
||||
|
||||
- Go 1.17+
|
||||
- npm (Node 14+)
|
||||
- NPM (Node 14+)
|
||||
|
||||
### Go
|
||||
|
||||
@@ -27,9 +27,9 @@ Wails 有许多安装前需要的常见依赖项:
|
||||
- 检查 Go 是否安装正确: `go version`
|
||||
- 检查 "~/go/bin" 是否在您的 PATH 变量中: `echo $PATH | grep go/bin`
|
||||
|
||||
### npm
|
||||
### NPM
|
||||
|
||||
从[Node 下载页面](https://nodejs.org/en/download/)下载 Npm。最好使用最新版本,因为这是我们通常会测试的版本。
|
||||
从[Node 下载页面](https://nodejs.org/en/download/)下载 NPM。最好使用最新版本,因为这是我们通常会测试的版本。
|
||||
|
||||
运行 `npm --version` 进行验证。
|
||||
|
||||
@@ -75,4 +75,4 @@ import TabItem from "@theme/TabItem";
|
||||
|
||||
## 系统检查
|
||||
|
||||
运行 `wails doctor` 将检查您是否安装了正确的依赖项。如果没有,它会就缺少的内容提供建议并帮助纠正任何问题。
|
||||
运行 `wails doctor` 将检查您是否安装了正确的依赖项。如果没有,它会就缺少的内容提供建议以帮助纠正问题。
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user