Compare commits

..

86 Commits

Author SHA1 Message Date
Lea Anthony daa71ce426 v2.8.2 2024-05-08 20:43:24 +10:00
Lea Anthony c1c4220978 V2 features/proxy to external server (#3463)
* Add NewProxyServer function

* Pass through all methods for mac

* Content length fix

* Update changelog.mdx

* Update deps
2024-05-08 20:39:49 +10:00
Christian S f8e1ab3ee9 Add "wails-lit-shoelace-esbuild-template" to community templates page (#3459) 2024-05-06 21:35:12 +10:00
Lea Anthony acc89e522e Fix link to project config 2024-05-05 17:36:08 +10:00
eric-tech01 afceac13fa Update window.mdx (#3452)
title wrong in zh :  WindowHide not WindowShow
2024-05-05 14:08:02 +10:00
github-actions[bot] 74509e247c chore: update sponsors.svg (#3453)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-05-05 14:05:51 +10:00
Lea Anthony d44b5e9c46 Rename -noPackage flag to -nopackage (#3422)
* Rename `-noPackage` flag to `-nopackage`

* Update PR link
2024-05-02 09:13:55 -05:00
Leo b7713da70e Fixed an issue where go:embed directives would generate illegal directories (#3445)
* Update staticanalysis.go and associated tests

* Update changelog

* Changed format of octal literal

* Update changelog
2024-05-02 21:40:38 +10:00
Andrey Pshenkin b8dae7a6e2 Fix icon issues with windows when project name contains spaces (#3400)
* fix icon issues with windows when project name contains spaces

* add comment

* add to change log

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-04-29 16:59:04 -05:00
github-actions[bot] 9a039b1dc9 chore: update sponsors.svg (#3441)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-28 10:18:02 +10:00
Leo c10dfbce78 Fixed issue where createFrom would misidentify strings as arrays (#3435)
* Update check for Array-like variables

* Updated binding tests to reflect changes

* Update documentation to reflect changes

* Fixed PR number in changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-04-27 16:30:04 +10:00
Cody Bentley 66562bfebc removed outdated codydbentley templates (#3438)
* removed outdated codydbentley templates

* Updated cody bentley's info in contributor src
2024-04-27 16:25:44 +10:00
Diego Pahua Silvan facec0c2ac docs: add guides ide change goland option and reference cli add options vscode or goland (#3419)
* docs: add guides ide change goland option and reference cli add options vscode or goland

* docs: update changelog for ide options

* docs: fix typo golang to goland
2024-04-23 08:07:22 +10:00
Diego Pahua Silvan a7c10a1a83 Update cli.mdx (#3415)
add possible options in terms of choosing the "ide" either "visual studio code" or "goland"
2024-04-22 12:35:32 +10:00
github-actions[bot] 2fe20071fb chore: update sponsors.svg (#3411)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-20 10:50:53 +10:00
Diego Pahua Silvan 45002a0d82 docs: Add new template wails-astro-ts (#3401)
Add a community template to allow using Astro and TypeScript in Wails
2024-04-18 07:49:53 +10:00
hidewrong 9a069653e2 chore: fix some comments (#3399)
Signed-off-by: hidewrong <hidewrong@outlook.com>
2024-04-17 18:42:53 +10:00
github-actions[bot] 2481ff6a88 chore: update sponsors.svg (#3398)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-17 18:41:27 +10:00
github-actions[bot] 6d57fc6428 chore: update sponsors.svg (#3392)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-14 13:37:18 +10:00
Lea Anthony 2dd964b469 Update website 2024-04-11 21:19:59 +10:00
Lea Anthony 372173664b v2.8.1 2024-04-11 21:15:04 +10:00
guangwu faf36e8634 fix: close copy dst file (#3384)
* fix: close copy dst file

Signed-off-by: guoguangwu <guoguangwug@gmail.com>

* Update website/src/pages/changelog.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Co-authored-by: Travis McLane <tmclane@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-04-09 17:34:43 -05:00
lvyaoting aad811391b chore: fix function names in comment (#3383)
Signed-off-by: lvyaoting <lvyaoting@outlook.com>
2024-04-09 17:19:06 -05:00
github-actions[bot] bde4e5b699 chore: update sponsors.svg (#3377)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-07 11:20:39 +10:00
github-actions[bot] 40119e9a17 chore: update sponsors.svg (#3372)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-05 17:17:29 +11:00
Vladimir Sokolovskiy 374e15650d Update templates.mdx (#3367)
Add a new template: wails-next-tailwind-shadcnui-ts
2024-04-04 07:03:25 +11:00
dependabot[bot] 32bbeb653e Bump the npm_and_yarn group across 1 directory with 1 update (#3369)
Bumps the npm_and_yarn group with 1 update in the /v2/internal/frontend/runtime directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 3.2.8 to 3.2.10
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.10/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.10/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 07:00:34 +11:00
github-actions[bot] 2c4b38e39d chore: update sponsors.svg (#3361)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-04-01 11:47:18 +11:00
reallylowest e7756e9274 chore: fix some typos in comments (#3357)
Signed-off-by: reallylowest <sunjinping@outlook.com>
2024-03-31 16:23:18 +11:00
dependabot[bot] 1f74b337ff Bump the npm_and_yarn group across 1 directory with 1 update (#3352)
Bumps the npm_and_yarn group with 1 update in the /website directory: [express](https://github.com/expressjs/express).


Updates `express` from 4.18.2 to 4.19.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 20:08:46 +11:00
Lea Anthony 98c4b967a7 Remove link to expired varly.app domain 2024-03-24 17:27:24 +11:00
dora 37aa2c4eff fix docs routing (#3206)
* fix docs routing

* changelog

* changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 17:16:21 +11:00
Casey Mulcahy 311aee30b2 Fix docs for JS return types in Window API (#3247)
* Fix docs for JS return types in Window API

These functions return promises, not raw values.

* Update changelog.mdx for Window API docs fix

* Fix non-versioned docs for JS Window API return types

* Fix docs typo

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 17:14:32 +11:00
Sean 9cafd85cda fix: fallback to hardcoded Edge/Chrome/Firefox Windows browser paths if user's default browser no longer exists (#3262)
To reproduce:

- Use Windows
- Set your default browser to Firefox (Settings -> Apps -> Default Apps -> Web Browser)
- Rename your firefox.exe to something.else

The BrowserOpenURL before this commit silently fails.

The BrowserOpenURL after this commit tries to use a hardcoded fallback browser.
If successful, a warning message is logged.
If unsuccessful (default browser and fallback browsers fail), an error message is logged.

Co-authored-by: Sean <sean@malonetuning.com>
2024-03-24 17:09:27 +11:00
我看谁不卷 08a71de536 update go minimum version (#3285)
* update go minimum version

V2.7.1 Go 1.20 is now the minimum supported Go version.

* Update go build min version

* update go build min version

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 17:00:11 +11:00
Twacqwq bc69b39ccd feat(cmd/init): change default module name to project name (#3303)
* feat(cmd/init): change default module name to project name

* chore: write go.mod using chmod 644

* refactor: using go mod edit change module name

* docs: update changelog.mdx and cli.mdx

* Revert "feat(cmd/init): change default module name to project name"

This reverts commit 504d9517591f876e4a3a75fd16e22ed312f991c5.

* feat(cmd/init): change default module name to project name

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 16:58:46 +11:00
dependabot[bot] 769a882e58 Bump the npm_and_yarn group across 2 directories with 4 updates (#3337)
Bumps the npm_and_yarn group with 2 updates in the /scripts/sponsors directory: [tough-cookie](https://github.com/salesforce/tough-cookie) and [sponsorkit](https://github.com/antfu/sponsorkit).
Bumps the npm_and_yarn group with 1 update in the /website directory: [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware).


Removes `tough-cookie`

Updates `sponsorkit` from 0.8.9 to 0.9.3
- [Release notes](https://github.com/antfu/sponsorkit/releases)
- [Commits](https://github.com/antfu/sponsorkit/compare/v0.8.9...v0.9.3)

Updates `yargs-parser` from 7.0.0 to 21.1.1
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs-parser/compare/v7.0.0...yargs-parser-v21.1.1)

Updates `webpack-dev-middleware` from 5.3.3 to 5.3.4
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
- dependency-name: sponsorkit
  dependency-type: direct:production
  dependency-group: npm_and_yarn-security-group
- dependency-name: yargs-parser
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-24 12:34:12 +11:00
i hate microsoft d3332f0b2c fix wss /wails/ipc (#2469)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 12:33:15 +11:00
Lea Anthony bf2d6d3241 Remove xattr via obj-c (#3328)
* Remove xattr via obj-c

* Revert "Remove xattr via obj-c"

This reverts commit 880a4e0b409fa552d16e7d6b1cef6fd9e9e86c0a.

* Fixed path xattr call
2024-03-24 12:32:14 +11:00
github-actions[bot] 3694dd2a55 chore: update sponsors.svg (#3327)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-03-20 18:45:33 +11:00
Lea Anthony c451adc424 Update node version in pipelines 2024-03-19 21:35:11 +11:00
github-actions[bot] 4093c9ec64 chore: update sponsors.svg (#3324)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-03-19 21:28:12 +11:00
dependabot[bot] 839e42edde Bump the npm_and_yarn group across 2 directories with 2 updates (#3319)
Bumps the npm_and_yarn group with 1 update in the /v2/internal/frontend/runtime directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /website directory: [follow-redirects](https://github.com/follow-redirects/follow-redirects).


Updates `vite` from 3.1.8 to 3.2.8
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.8/packages/vite)

Updates `follow-redirects` from 1.15.4 to 1.15.6
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
- dependency-name: follow-redirects
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 11:37:14 +11:00
github-actions[bot] f2c4ada1e2 chore: update sponsors.svg (#3318)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-03-16 19:36:21 +11:00
github-actions[bot] 126f17a266 chore: update sponsors.svg (#3316)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-03-14 19:25:49 +11:00
github-actions[bot] e4fd7df68b chore: update sponsors.svg (#3302)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-03-11 20:12:17 +11:00
oskar c5381dce70 docs: added mchat to showcases (#3294) 2024-03-05 19:56:54 +11:00
Lea Anthony 964abcc6bd Escape bindings, even though we generate them internally. 2024-03-02 16:42:20 +11:00
Cristian Bilu 5d22da4126 Add disable zoom on mac (#3289)
* Add disable zoom on mac

* Add changelog line

* Add zommable in main.m

I see this file is ignore, but i think it's better to keep it up-to-date so if we ever unignore it will work correctly.
2024-03-02 15:47:59 +11:00
github-actions[bot] e714dd92a8 chore: update sponsors.svg (#3291)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-03-02 15:34:49 +11:00
madflow 3bf4ea5113 fix: json5 code highlighting (#3278) 2024-02-29 08:46:33 +11:00
te5se 65cef2f206 - add -m(skip go mod tidy) build flag to dev command (#3275)
* - add -m(skip go mod tidy) build flag to dev command

* - add changelog entry for PR #3275
2024-02-26 21:10:01 +11:00
github-actions[bot] bff2258aea chore: update sponsors.svg (#3258)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-02-23 21:12:26 +11:00
Benoit Botton 8145b0e0c5 add warning about dynamic assets and vite v5.0.0+ (#3254)
* add warning about dynamic assets and vite v5.0.0+
2024-02-22 08:03:45 +01:00
atterpac 57e6834bd2 NixOS font bug docs (#3268)
add changelog

Appeasing the rabbit

remove v3

Co-authored-by: atterpac <michael@atterpac.dev>
2024-02-20 06:49:17 +11:00
dependabot[bot] 9c3f91bb48 Bump the npm_and_yarn group across 3 directories with 1 update (#3257)
Bumps the npm_and_yarn group with 1 update in the /scripts/sponsors directory: [semver](https://github.com/npm/node-semver).
Bumps the npm_and_yarn group with 1 update in the /v2/internal/frontend/runtime directory: [semver](https://github.com/npm/node-semver).


Updates `semver` from 7.5.4 to 7.6.0
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0)

Updates `semver` from 5.7.1 to 5.7.2
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
- dependency-name: semver
  dependency-type: indirect
  dependency-group: npm_and_yarn-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-14 18:21:54 +11:00
Lea Anthony d899621351 Update SECURITY.md 2024-02-14 18:15:24 +11:00
Lea Anthony 1957e2e86c Create SECURITY.md 2024-02-14 18:09:12 +11:00
github-actions[bot] 1c8e2ee8fe chore: update sponsors.svg (#3241)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-02-09 21:04:35 +11:00
Lea Anthony 741558532b Revert "Added possibility to specify platform for dev command (#3117)"
This reverts commit 4b4fcdd47c.
2024-02-08 21:38:24 +11:00
Lea Anthony 772f870eb3 v2.8.0 2024-02-08 21:28:28 +11:00
stffabi e29b375de5 [cli] Bump x/tools to 0.17.0 to fix compatiblity with go 1.22 (#3244) 2024-02-08 22:40:04 +11:00
github-actions[bot] 72e12ef398 chore: update sponsors.svg (#3235)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-02-05 22:41:20 +11:00
atterpac 9903ba70d5 Update vue-tsc (#3234)
changelog
2024-02-05 17:12:09 +11:00
github-actions[bot] 9b35616a20 chore: update sponsors.svg (#3223)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-29 21:33:29 +11:00
github-actions[bot] a988691931 chore: update sponsors.svg (#3218)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-27 08:43:22 +11:00
William Sjökvist ad7f7f76bc chore: add cfn-tracker to community docs (#3221)
* chore: add cfn tracker to community docs

* run format
2024-01-27 08:41:15 +11:00
github-actions[bot] 55a7d317bd chore: update sponsors.svg (#3217)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-25 21:04:20 +11:00
github-actions[bot] cec6551c5e chore: update sponsors.svg (#3215)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-21 17:45:38 +11:00
github-actions[bot] 3a230b563f chore: update sponsors.svg (#3210)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-19 19:49:09 +11:00
Dana Woodman f9aa4d3b60 Give explicity example of importing JS runtime (#3178)
* Give explicity example of importing JS runtime

No where in the docs, google, github issues or discussions could I find an example of importing the runtime JS but after some experimentation I figured it out.

I think it would help future users if a simple example was shown like this so they have a clear reference of how to import the runtime.

* make generic

* Update changelog.mdx

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-01-17 22:40:12 +11:00
Luke Watts b498cddcad Windows nsis install documentation improvements (#3179)
* Adding additional NSIS install methods (Scoop, Winget) to windows-installer.mdx

Adding Scoop and Winget package managers to the list of methods by which NSIS can be installed.

* Update windows-installer.mdx

Reordering so chocolatey is last, as Scoop or Winget are better/newer options
2024-01-17 22:37:58 +11:00
ALMAS 3e5df3c7f1 [v2/Windows]Set default extension for save file dialog (#3205)
* Set default extension for save file dialog

* add change log

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-01-17 22:35:15 +11:00
github-actions[bot] 9ccb17bfd0 chore: update sponsors.svg (#3204)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-17 08:27:49 +11:00
dependabot[bot] 12d6336421 Bump follow-redirects from 1.15.2 to 1.15.4 in /website (#3188)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 23:32:36 +11:00
dependabot[bot] cf2d16c1fd Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 in /v2 (#3185)
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.7)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 06:14:31 +11:00
ALMAS bf389e3914 [v2/Mac] Handle application terminate (#3157)
* [v2/Mac] Handle application terminate

* add change log

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-01-08 08:08:04 +11:00
Vladimir f7c19469a7 v2 [#3133] SingleInstanceData: Fill missing WD as is (#3154)
* [#3133] SingleInstanceData: Fill missing WD as is

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix: missing `import` for AI suggestions

* Add changelog entry

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-01-04 05:26:24 +11:00
github-actions[bot] f1265c527e chore: update sponsors.svg (#3150)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-01-03 19:43:00 +11:00
dependabot[bot] b083d1d41c Bump github.com/go-git/go-git/v5 from 5.3.0 to 5.11.0 in /v2 (#3161)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.3.0 to 5.11.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.3.0...v5.11.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 19:38:06 +11:00
dependabot[bot] 56fb047d89 Bump tj-actions/verify-changed-files in /.github/workflows (#3164)
Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 11.1 to 17.
- [Release notes](https://github.com/tj-actions/verify-changed-files/releases)
- [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/verify-changed-files/compare/v11.1...v17)

---
updated-dependencies:
- dependency-name: tj-actions/verify-changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 19:37:41 +11:00
dependabot[bot] ae4cb4e861 Bump tj-actions/changed-files from 35 to 41 in /.github/workflows (#3165)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 35 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v35...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 19:36:40 +11:00
Lykin 33172946ca doc: update screenshot of Tiny RDM to latest version (#3166)
Co-authored-by: Lykin <huangliu3060@qq.com>
2024-01-03 19:35:59 +11:00
dependabot[bot] 3c7a2187db Bump golang.org/x/crypto in /v2/internal/staticanalysis/test/standard (#3143)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-12-19 18:30:43 +11:00
dependabot[bot] 437ca0ffd5 Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /v2 (#3142)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-12-19 18:29:29 +11:00
dependabot[bot] 162720423f Bump golang.org/x/crypto in /v2/examples/customlayout (#3144)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 18:28:42 +11:00
2295 changed files with 91920 additions and 101093 deletions
+1 -1
View File
@@ -158,7 +158,7 @@
]
},
{
"login": "codydbentley",
"login": "sircodemane",
"name": "Cody Bentley",
"avatar_url": "https://avatars.githubusercontent.com/u/6968902?v=4",
"profile": "https://codybentley.dev/",
-140
View File
@@ -1,140 +0,0 @@
name: Build + Test v3 alpha
on:
push:
branches: [v3-alpha]
paths-ignore:
- 'mkdocs-website/**/*'
workflow_dispatch:
jobs:
test_go:
name: Run Go Tests
if: github.repository == 'wailsapp/wails'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
go-version: [1.22]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev javascriptcoregtk-4.1-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Examples
working-directory: ./v3
run: task test:examples
- name: Run tests (mac)
if: matrix.os == 'macos-latest'
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v3
run: go test -v ./...
- name: Run tests (!mac)
if: matrix.os != 'macos-latest'
working-directory: ./v3
run: go test -v ./...
test_js:
name: Run JS Tests
if: github.repository == 'wailsapp/wails'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
working-directory: v2/internal/frontend/runtime
- name: Run tests
run: npm test
working-directory: v2/internal/frontend/runtime
test_templates:
name: Test Templates
needs: test_go
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
template:
[
svelte,
svelte-ts,
vue,
vue-ts,
react,
react-ts,
preact,
preact-ts,
lit,
lit-ts,
vanilla,
vanilla-ts,
]
go-version: [1.22]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Setup Golang caches
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev javascriptcoregtk-4.1-dev build-essential pkg-config
- name: Build Wails3 CLI
run: |
cd ./v3/cmd/wails3
go install
wails3 -help
- name: Generate template '${{ matrix.template }}'
run: |
go install github.com/go-task/task/v3/cmd/task@latest
mkdir -p ./test-${{ matrix.template }}
cd ./test-${{ matrix.template }}
wails3 init -n ${{ matrix.template }} -t ${{ matrix.template }}
cd ${{ matrix.template }}
wails3 build
+2 -2
View File
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-11]
go-version: ['1.22']
go-version: ['1.20']
steps:
- name: Checkout code
@@ -90,7 +90,7 @@ jobs:
vanilla-ts,
plain,
]
go-version: ['1.22']
go-version: ['1.20']
steps:
- name: Checkout
uses: actions/checkout@v4
+7 -28
View File
@@ -6,15 +6,6 @@ on:
types: [submitted]
jobs:
debug_context:
name: Debug Context
runs-on: ubuntu-latest
steps:
- name: Print GitHub Context
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
check_docs:
name: Check Docs
if: ${{github.repository == 'wailsapp/wails' && contains(github.head_ref,'feature/')}}
@@ -23,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v11.1
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
with:
files: |
@@ -65,7 +56,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: ['1.22']
go-version: ['1.20']
steps:
- name: Checkout code
@@ -80,26 +71,14 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: Run tests (mac) | v2
if: ${{ matrix.os == 'macos-latest' && github.base_ref == 'master' }}
- name: Run tests (mac)
if: matrix.os == 'macos-latest'
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v2
run: go test -v ./...
- name: Run tests (!mac) | v2
if: ${{ matrix.os != 'macos-latest' && github.base_ref == 'master' }}
working-directory: ./v2
run: go test -v ./...
- name: Run tests (mac) | v3
if: ${{ matrix.os == 'macos-latest' && github.base_ref == 'v3-alpha' }}
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v3
run: go test -v ./...
- name: Run tests (!mac) | v3
if: ${{ matrix.os != 'macos-latest' && github.base_ref == 'v3-alpha' }}
working-directory: ./v3
- name: Run tests (!mac)
if: matrix.os != 'macos-latest'
working-directory: ./v2
run: go test -v ./...
@@ -15,7 +15,7 @@ jobs:
- name: Verify Changed files
id: changed-files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v41
with:
files: |
website/**/*.mdx
-35
View File
@@ -1,35 +0,0 @@
name: v3 docs
on:
push:
branches:
- v3-alpha
paths:
- 'mkdocs-website/**/*'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
defaults:
run:
working-directory: ./mkdocs-website
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: sudo apt-get install pngquant
- run: pip install pillow cairosvg mkdocs-table-reader-plugin mkdocs-static-i18n
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
- run: mkdocs build --config-file mkdocs.insiders.yml
- run: mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
-1
View File
@@ -1 +0,0 @@
v3alpha.wails.io
+38
View File
@@ -0,0 +1,38 @@
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 2.x.x | :white_check_mark: |
| 3.0.x-alpha | :x: |
## Reporting a Vulnerability
If you believe you have found a security vulnerability in our project, we encourage you to let us know right away.
We will investigate all legitimate reports and do our best to quickly fix the problem.
Before reporting though, please review our security policy below.
### How to Report
To report a security vulnerability, please use GitHub's [private vulnerability reporting](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) feature. If possible, please include as much information as possible.
This may include steps to reproduce, impact of the vulnerability, and anything else you believe would help us understand the problem.
**Please do not include any sensitive or personal information in your report**.
### What to Expect
When you report a vulnerability, here's what you can expect:
- **Acknowledgement**: We will acknowledge your email within 48 hours, and you'll receive a more detailed response to your email within 72 hours indicating the next steps in handling your report.
- **Updates**: After the initial reply to your report, our team will keep you informed of the progress being made towards a fix and full announcement. These updates will be sent at least once a week.
- **Confidentiality**: We will maintain strict confidentiality of your report until the security issue is resolved.
- **Issue Resolution**: If the issue is confirmed, we will release a patch as soon as possible depending on complexity of the fix.
- **Recognition**: We recognize and appreciate every individual who helps us identify and fix vulnerabilities in our project. While we do not currently have a bounty program, we would be happy to publicly acknowledge your responsible disclosure.
We strive to make Wails safe for everyone, and we greatly appreciate the assistance of security researchers and users in helping us identify and fix vulnerabilities. Thank you for your contribution to the security of this project.
-5
View File
@@ -16,11 +16,6 @@ includes:
dir: v3
optional: true
docs:
taskfile: mkdocs-website
dir: mkdocs-website
optional: true
tasks:
contributors:check:
cmds:
-1
View File
@@ -1 +0,0 @@
v3alpha.wails.io
-45
View File
@@ -1,45 +0,0 @@
# v3 Docs
This is the documentation for Wails v3. It is currently a work in progress.
If you do not wish to build it locally, it is available online at
[https://wailsapp.github.io/wails/](https://wailsapp.github.io/wails/).
## Recommended Setup Steps
Install the wails3 CLI if you haven't already:
```shell
go install github.com/wailsapp/wails/v3/cmd/wails3@latest
```
The documentation uses mkdocs, so you will need to install
[Python](https://www.python.org/). Once installed, you can setup the
documentation by running the following command:
```bash
wails3 task docs:setup
```
This will install the required dependencies for you.
If you have installed the wails3 CLI, you can run the following command to build
the documentation and serve it locally:
```bash
wails3 task docs:serve
```
### Manual Setup
To install manually, you will need to do the following:
- Install [Python](https://www.python.org/)
- Run `pip install -r requirements.txt` to install the required dependencies
- Run `mkdocs serve` to serve the documentation locally
- Run `mkdocs build` to build the documentation
## Contributing
If you would like to contribute to the documentation, please feel free to open a
PR!
-59
View File
@@ -1,59 +0,0 @@
# https://taskfile.dev
version: '3'
tasks:
setup:
summary: Setup the project
preconditions:
- sh: python{{exeExt}} --version
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
cmds:
- python -m pip install -r requirements.txt --user
setup:insiders:
summary: Setup the project (insiders)
preconditions:
- sh: python{{exeExt}} --version
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
cmds:
- python -m pip install -r requirements.insiders.txt --user
upgrade:insiders:
summary: Upgrade the project (insiders)
preconditions:
- sh: python{{exeExt}} --version
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
cmds:
- python -m pip install -r requirements.insiders.txt --upgrade --user
build:
summary: Builds the documentation
preconditions:
- sh: mkdocs --version
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
cmds:
- mkdocs build
serve:
summary: Builds the documentation and serves it locally
preconditions:
- sh: mkdocs --version
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
cmds:
- mkdocs serve
serve:insiders:
summary: Builds the documentation and serves it locally
preconditions:
- sh: mkdocs --version
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
cmds:
- mkdocs serve --config-file mkdocs.insiders.yml
update:api:
summary: Updates the API documentation
dir: generate
cmds:
- go run .
-1
View File
@@ -1 +0,0 @@
v3alpha.wails.io
-141
View File
@@ -1,141 +0,0 @@
# Cais
Mae'r API cais yn cynorthwyo i greu cais gan ddefnyddio fframwaith Wails.
### Newydd
API: `New(appOptions Options) *App`
`New(appOptions Options)` yn creu cais newydd gan ddefnyddio'r opsiynau cais a ddarperir. Mae'n cymhwyso gwerthoedd rhagosodedig ar gyfer opsiynau heb eu pennu, yn eu cyfuno â'r rhai a ddarparwyd, yn eu cychwyn a'n dychwelyd enghraifft o'r cais.
Os bydd gwall yn ystod y cychwyn, caiff y cais ei atal gyda'r neges gwall a ddarperir.
Dylid nodi, os oes enghraifft gyffredinol o gais yn bodoli eisoes, y bydd yr enghraifft honno'n cael ei dychwelyd yn hytrach na chreu un newydd.
```go title="main.go" hl_lines="6-9"
package main
import "github.com/wailsapp/wails/v3/pkg/application"
func main() {
app := application.New(application.Options{
Name: "Demo Ffenestr Gweddarlunydd",
// Opsiynau eraill
})
// Gweddill y cais
}
```
### Cael
`Get()` yn dychwelyd yr enghraifft gyffredinol o'r cais. Mae'n ddefnyddiol pan fydd angen mynediad i'r cais o wahanol rannau o'ch cod.
```go
// Cael enghraifft o'r cais
app := application.Get()
```
### Galluoedd
API: `Capabilities() capabilities.Capabilities`
`Capabilities()` yn adfer map o'r galluoedd sydd gan y cais ar hyn o bryd. Gall y galluoedd fod ynghylch y nodweddion gwahanol y system weithredu sy'n darparu, fel nodweddion gweddarlunydd.
```go
// Cael galluoedd y cais
capabilities := app.Capabilities()
if capabilities.HasNativeDrag {
// Gwneud rhywbeth
}
```
### GetPID
API: `GetPID() int`
`GetPID()` yn dychwelyd ID y Broses y cais.
```go
pid := app.GetPID()
```
### Rhedeg
API: `Run() error`
`Run()` yn dechrau gweithredu'r cais a'i gydrannau.
```go
app := application.New(application.Options{
//options
})
// Rhedeg y cais
err := application.Run()
if err != nil {
// Ymdrin â'r gwall
}
```
### Gadael
API: `Quit()`
`Quit()` yn gadael y cais trwy ddinistrio ffenestri a rhai cydrannau eraill o bosibl.
```go
// Gadael y cais
app.Quit()
```
### AydunDdyryslyd
API: `IsDarkMode() bool`
`IsDarkMode()` yn gwirio a yw'r cais yn rhedeg mewn modd tywyll. Mae'n dychwelyd gwerth boolean yn nodi a yw'r modd tywyll wedi'i alluogi.
```go
// Gwiriwch a yw'r modd tywyll wedi'i alluogi
if app.IsDarkMode() {
// Gwneud rhywbeth
}
```
### Cuddio
API: `Hide()`
`Hide()` yn cuddio ffenestr y cais.
```go
// Cuddio ffenestr y cais
app.Hide()
```
### Dangos
API: `Show()`
`Show()` yn dangos ffenestr y cais.
```go
// Dangos ffenestr y cais
app.Show()
```
--8<--
./docs/cy/API/application_window.md
./docs/cy/API/application_menu.md
./docs/cy/API/application_dialogs.md
./docs/cy/API/application_events.md
./docs/cy/API/application_screens.md
--8<--
## Opsiynau
```go title="pkg/application/application_options.go"
--8<--
../v3/pkg/application/application_options.go
--8<--
```
@@ -1,67 +0,0 @@
### Dangos Deialog Ynghylch
API: `ShowAboutDialog()`
Mae `ShowAboutDialog()` yn dangos blwch deialog "Ynghylch". Gall ddangos enw'r
cymhwysiad, disgrifiad ac eicon.
```go
// Dangos y deialog ynghylch
app.ShowAboutDialog()
```
### Gwybodaeth
API: `InfoDialog()`
Mae `InfoDialog()` yn creu ac yn dychwelyd esiampl newydd o `MessageDialog` gyda
`InfoDialogType`. Defnyddir y deialog hon fel arfer i ddangos negeseuon
gwybodaeth i'r defnyddiwr.
### Cwestiwn
API: `QuestionDialog()`
Mae `QuestionDialog()` yn creu ac yn dychwelyd esiampl newydd o `MessageDialog`
gyda `QuestionDialogType`. Defnyddir y deialog hon yn aml i ofyn cwestiwn i'r
defnyddiwr a disgwyl ymateb.
### Rhybudd
API: `WarningDialog()`
Mae `WarningDialog()` yn creu ac yn dychwelyd esiampl newydd o `MessageDialog`
gyda `WarningDialogType`. Fel y mae'r enw yn awgrymu, defnyddir y deialog hon yn
bennaf i ddangos negeseuon rhybudd i'r defnyddiwr.
### Gwall
API: `ErrorDialog()`
Mae `ErrorDialog()` yn creu ac yn dychwelyd esiampl newydd o `MessageDialog` gyda
`ErrorDialogType`. Cynlluniwyd y deialog hon i'w defnyddio pan fydd angen
dangos neges gwall i'r defnyddiwr.
### Agor Ffeil
API: `OpenFileDialog()`
Mae `OpenFileDialog()` yn creu ac yn dychwelyd esiampl newydd o
`OpenFileDialogStruct`. Mae'r deialog hon yn annog y defnyddiwr i ddewis un neu
ragor o ffeiliau o'u system ffeiliau.
### Cadw Ffeil
API: `SaveFileDialog()`
Mae `SaveFileDialog()` yn creu ac yn dychwelyd esiampl newydd o
`SaveFileDialogStruct`. Mae'r deialog hon yn annog y defnyddiwr i ddewis lleoliad
yn eu system ffeiliau lle y dylid cadw ffeil.
### Agor Cyfeiriadur
API: `OpenDirectoryDialog()`
Mae `OpenDirectoryDialog()` yn creu ac yn dychwelyd esiampl newydd o
`MessageDialog` gyda `OpenDirectoryDialogType`. Mae'r deialog hon yn galluogi'r
defnyddiwr i ddewis cyfeiriadur o'u system ffeiliau.
@@ -1,13 +0,0 @@
### Ar
API:
`Ar(eventType digwyddiadau.DdigwyddiadweithgangeningApplicationEventType, atebydd func(digwyddiad *Digwyddiad)) func()`
Mae `Ar()` yn cofrestru gwrandäwr digwyddiad ar gyfer digwyddiadau cymhwysiad penodol. Bydd y swyddogaeth atebydd a ddarperir yn cael ei sbarduno pan fydd y digwyddiad cysylltiedig yn digwydd. Mae'r swyddogaeth yn dychwelyd swyddogaeth y gellir ei galw i dynnu'r gwrandäwr.
### CofrestruArgraffwyr
API:
`CofrestruArgraffwyr(eventType digwyddiadau.DdigwyddiadweithgangeningApplicationEventType, atebydd func(digwyddiad *Digwyddiad)) func()`
Mae `CofrestruArgraffwyr()` yn cofrestru atebydd i'w redeg fel crocen yn ystod digwyddiadau penodol. Caiff y crocenau hyn eu rhedeg cyn gwrandawyr sy'n gysylltiedig ag `Ar()`. Mae'r swyddogaeth yn dychwelyd swyddogaeth y gellir ei galw i dynnu'r bâs.
@@ -1,27 +0,0 @@
### RegisterContextMenu
API: `RegisterContextMenu(name string, menu *Menu)`
Mae `RegisterContextMenu()` yn cofrestru dewislen cyd-destun gyda enw penodol. Gellir defnyddio'r dewislen hon yn ddiweddarach yn yr ap.
```go
// Creu dewislen newydd
ctxmenu := app.NewMenu()
// Cofrestru'r dewislen fel dewislen cyd-destun
app.RegisterContextMenu("MyContextMenu", ctxmenu)
```
### SetMenu
API: `SetMenu(menu *Menu)`
Mae `SetMenu()` yn gosod y ddewislen ar gyfer yr ap. Ar Mac, bydd hyn yn fod y ddewislen fyd-eang. Ar gyfer Windows a Linux, bydd hyn yn fod y ddewislen ddiofyn ar gyfer unrhyw ffenestr newydd a grëir.
```go
// Creu dewislen newydd
menu := app.NewMenu()
// Gosod y ddewislen ar gyfer yr ap
app.SetMenu(menu)
```
@@ -1,13 +0,0 @@
### GetPrimaryScreen
API: `GetPrimaryScreen() (*Sgrin, error)`
Mae `GetPrimaryScreen()` yn dychwelyd y sgrin brif y system.
### GetScreens
API: `GetScreens() ([]*Sgrin, error)`
Mae `GetScreens()` yn dychwelyd gwybodaeth am bob sgrin sydd wedi'i chysylltu â'r system.
Dyma grynodeb byr o'r dulliau allforio yn y `App` strwythur a ddarparwyd. Cofiwch, ar gyfer mwy o swyddogaethau neu ystyriaethau manwl, cyfeiriwch at y cod Go gwirioneddol neu ddogfennaeth fewnol bellach.
@@ -1,64 +0,0 @@
Dyma'r testun wedi'i gyfieithu i'r Gymraeg:
### NewWebviewWindow
API: `NewWebviewWindow() *WebviewWindow`
Mae `NewWebviewWindow()` yn creu ffenestr Webview newydd gyda'r opsiynau rhagosodedig, ac yn ei dychwelyd.
```go
// Creu ffenestr webview newydd
window := app.NewWebviewWindow()
```
### NewWebviewWindowWithOptions
API:
`NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow`
Mae `NewWebviewWindowWithOptions()` yn creu ffenestr webview newydd gydag opsiynau custom. Caiff y ffenestr newydd ei ychwanegu at fap o ffenestri a reolir gan y cymhwysiad.
```go
// Creu ffenestr webview newydd gydag opsiynau custom
window := app.NewWebviewWindowWithOptions(WebviewWindowOptions{
Name: "Main",
Title: "Fy Ffenestr",
Width: 800,
Height: 600,
})
```
### OnWindowCreation
API: `OnWindowCreation(callback func(window *WebviewWindow))`
Mae `OnWindowCreation()` yn cofrestru ffwythiant alw-nôl i'w alw pan grëir ffenestr.
```go
// Cofrestru ffwythiant alw-nôl i'w alw pan grëir ffenestr
app.OnWindowCreation(func(window *WebviewWindow) {
// Gwneud rhywbeth
})
```
### GetWindowByName
API: `GetWindowByName(name string) *WebviewWindow`
Mae `GetWindowByName()` yn nôl ac yn dychwelyd ffenestr gyda enw penodol.
```go
// Cael ffenestr drwy ei henw
window := app.GetWindowByName("Main")
```
### CurrentWindow
API: `CurrentWindow() *WebviewWindow`
Mae `CurrentWindow()` yn nôl ac yn dychwelyd cyfeiriad at y ffenestr weithredol yn y cymhwysiad. Os nad oes ffenestr, mae'n dychwelyd nil.
```go
// Cael y ffenestr gyfredol
window := app.CurrentWindow()
```
-50
View File
@@ -1,50 +0,0 @@
# Prif Swyddogaethau Trywydd
Mae'r dulliau hyn yn swyddogaethau cymorth i redeg cod ar y prif drywydd. Mae hyn yn
ofynnol pan fyddwch am redeg cod cyfaddas ar y llwyfan UI.
### InvokeSync
API: `InvokeSync(fn func())`
Mae'r swyddogaeth hon yn rhedeg y swyddogaeth a drosglwyddwyd (`fn`) yn ddilynebol. Mae'n defnyddio WaitGroup
(`wg`) i sicrhau bod y prif drywydd yn aros i `fn` swyddogaeth orffen
cyn iddo barhau. Os bydd panig yn digwydd o fewn `fn`, bydd yn cael ei drosglwyddo i'r
swyddogaeth trin panig `PanicHandler`, a ddiffinnir yn opsiynau'r cymhwysiad.
### InvokeSyncWithResult
API: `InvokeSyncWithResult[T any](fn func() T) (res T)`
Mae'r swyddogaeth hon yn gweithio'n debyg i `InvokeSync(fn func())`, fodd bynnag, mae'n rhoi
canlyniad. Defnyddiwch hyn ar gyfer galw unrhyw swyddogaeth gyda un canlyniad yn unig.
### InvokeSyncWithError
API: `InvokeSyncWithError(fn func() error) (err error)`
Mae'r swyddogaeth hon yn rhedeg `fn` yn ddilynebol ac yn dychwelyd unrhyw wall a gynhyrchir gan `fn`.
Sylwch y bydd y swyddogaeth hon yn adfer o banig os bydd un yn digwydd yn ystod
gweithrediad `fn`.
### InvokeSyncWithResultAndError
API:
`InvokeSyncWithResultAndError[T any](fn func() (T, error)) (res T, err error)`
Mae'r swyddogaeth hon yn rhedeg `fn` yn ddilynebol ac yn dychwelyd canlyniad o fath `T` a
gwall.
### InvokeAsync
API: `InvokeAsync(fn func())`
Mae'r swyddogaeth hon yn rhedeg `fn` yn asyng. Mae'n rhedeg y swyddogaeth a roddir ar y
prif drywydd. Os bydd panig yn digwydd o fewn `fn`, bydd yn cael ei drosglwyddo i'r
swyddogaeth trin panig `PanicHandler`, a ddiffinnir yn opsiynau'r cymhwysiad.
---
_Sylw_: Bydd y swyddogaethau hyn yn rhwystro gweithrediad nes bod `fn` wedi gorffen. Mae'n
hanfodol sicrhau nad yw `fn` yn rhwystro. Os bydd angen i chi redeg swyddogaeth sy'n
rhwystro, defnyddiwch `InvokeAsync` yn lle.

Some files were not shown because too many files have changed in this diff Show More