5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 14:42:03 +08:00

docs: sync documents (#1936)

This commit is contained in:
Misite Bao 2022-10-04 16:22:35 +08:00 committed by GitHub
parent f3cbd383a3
commit 130f4cc36a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 110 additions and 76 deletions

View File

@ -21,3 +21,6 @@ The [definitive list](https://github.com/wailsapp/awesome-wails) of links relate
- [Twitter](https://twitter.com/wailsapp) - [Twitter](https://twitter.com/wailsapp)
- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 - [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054
## Other Tutorials and Articles
- [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board)

View File

@ -9,7 +9,7 @@
Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) 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 - 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/) - Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/)

View File

@ -37,6 +37,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs - [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs
- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development - [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development
- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript - [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript
- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS
## Svelte ## Svelte
@ -49,6 +50,6 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: - [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket:
## Pure JavaScript (Vanilla) ## ピュアJavaScript (バニラ)
- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS - [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - 基本的なJavaScript、HTML、CSSのみを含むテンプレート

View File

@ -106,13 +106,13 @@ 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: 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 ```html
<img id="logo" class="logo"> <img id="logo" class="logo" />
``` ```
with: with:
```html ```html
<img src="build/appicon.png" style="width: 300px"> <img src="build/appicon.png" style="width: 300px" />
``` ```
Then we would see the following: Then we would see the following:

View File

@ -21,36 +21,44 @@ The 2 files generated are `tasks.json` and `launch.json`. Below are the files ge
```json title="tasks.json" ```json title="tasks.json"
{ {
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "build", "label": "build",
"type": "shell", "type": "shell",
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
}, },
"command": "go", "command": "go",
"args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/myproject.exe"] "args": [
}, "build",
] "-tags",
"dev",
"-gcflags",
"all=-N -l",
"-o",
"build/bin/myproject.exe"
]
}
]
} }
``` ```
```json title="launch.json" ```json title="launch.json"
{ {
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Wails: Debug myproject", "name": "Wails: Debug myproject",
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "exec", "mode": "exec",
"program": "${workspaceFolder}/build/bin/myproject.exe", "program": "${workspaceFolder}/build/bin/myproject.exe",
"preLaunchTask": "build", "preLaunchTask": "build",
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"env": {} "env": {}
}, }
] ]
} }
``` ```
@ -60,51 +68,55 @@ The `tasks.json` file is simple for the default project as there is no `npm inst
```json title="tasks.json" ```json title="tasks.json"
{ {
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "npm install", "label": "npm install",
"type": "npm", "type": "npm",
"script": "install", "script": "install",
"options": { "options": {
"cwd": "${workspaceFolder}/frontend" "cwd": "${workspaceFolder}/frontend"
}, },
"presentation": { "presentation": {
"clear": true, "clear": true,
"panel": "shared", "panel": "shared",
"showReuseMessage": false "showReuseMessage": false
}, },
"problemMatcher": [] "problemMatcher": []
}, },
{ {
"label": "npm run build", "label": "npm run build",
"type": "npm", "type": "npm",
"script": "build", "script": "build",
"options": { "options": {
"cwd": "${workspaceFolder}/frontend" "cwd": "${workspaceFolder}/frontend"
}, },
"presentation": { "presentation": {
"clear": true, "clear": true,
"panel": "shared", "panel": "shared",
"showReuseMessage": false "showReuseMessage": false
}, },
"problemMatcher": [] "problemMatcher": []
}, },
{ {
"label": "build", "label": "build",
"type": "shell", "type": "shell",
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
}, },
"command": "go", "command": "go",
"args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/vscode.exe"], "args": [
"dependsOn":[ "build",
"npm install", "-tags",
"npm run build" "dev",
] "-gcflags",
"all=-N -l",
}, "-o",
] "build/bin/vscode.exe"
],
"dependsOn": ["npm install", "npm run build"]
}
]
} }
``` ```

View File

@ -223,7 +223,7 @@ 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: A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles:
| Role | Description | | ロール | Description |
| ------------ | ------------------------------------------------------------------------ | | ------------ | ------------------------------------------------------------------------ |
| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | | AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` |
| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | | EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` |

View File

@ -88,6 +88,7 @@ func main() {
}, },
Linux: &linux.Options{ Linux: &linux.Options{
Icon: icon, Icon: icon,
WindowIsTranslucent: false,
}, },
}) })
if err != nil { if err != nil {
@ -664,3 +665,9 @@ Some window managers or desktop environments may also place it in the window fra
NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work.
The icon should be provided in whatever size it was naturally drawn; that is, dont scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. The icon should be provided in whatever size it was naturally drawn; that is, dont scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.
#### WindowIsTranslucent
Setting this to `true` will make the window background translucent. Some window managers may ignore it, or result in a black window.
名前: WindowIsTranslucent<br/> データ型: `bool`

View File

@ -21,3 +21,6 @@ Wails 相关的 [优秀列表](https://github.com/wailsapp/awesome-wails)。
- [Twitter](https://twitter.com/wailsapp) - [Twitter](https://twitter.com/wailsapp)
- [Wails 中文社区 QQ 群](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - 群号1067173054 - [Wails 中文社区 QQ 群](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - 群号1067173054
## 其他教程和文章
- [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board)

View File

@ -37,6 +37,7 @@ sidebar_position: 1
- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - 基于 reactjs 的模板 - [wails-react-template](https://github.com/AlienRecall/wails-react-template) - 基于 reactjs 的模板
- [wails-react-template](https://github.com/flin7/wails-react-template) - 基于 React 并支持实时开发模式的轻量级模板 - [wails-react-template](https://github.com/flin7/wails-react-template) - 基于 React 并支持实时开发模式的轻量级模板
- [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - 基于 Vite + React + TypeScript 的模板 - [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - 基于 Vite + React + TypeScript 的模板
- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - 一个 React + TypeScript + Vite + TailwindCSS 模板
## Svelte ## Svelte

View File

@ -88,6 +88,7 @@ func main() {
}, },
Linux: &linux.Options{ Linux: &linux.Options{
Icon: icon, Icon: icon,
WindowIsTranslucent: false,
}, },
}) })
if err != nil { if err != nil {
@ -680,3 +681,9 @@ func main() {
注意Wayland 上的 Gnome 至少不显示此图标。 要在那里有一个应用程序图标,必须使用一个`.desktop`文件。 在 KDE 上它应该可以工作。 注意Wayland 上的 Gnome 至少不显示此图标。 要在那里有一个应用程序图标,必须使用一个`.desktop`文件。 在 KDE 上它应该可以工作。
图标应该以自然绘制的任何尺寸提供;也就是说,在传递图像之前不要缩放图像。 缩放将延迟到当所需的最终尺寸已知的最后一刻,以获得最佳质量。 图标应该以自然绘制的任何尺寸提供;也就是说,在传递图像之前不要缩放图像。 缩放将延迟到当所需的最终尺寸已知的最后一刻,以获得最佳质量。
#### 窗口半透明
将此设置为 `true` 将使窗口半透明。 某些窗口管理员可能忽略它,或导致黑窗口。
名称WindowIsTranslucent<br/> 类型:`bool`