Compare commits

..

149 Commits

Author SHA1 Message Date
Travis McLane d14e4048aa [dialogs] remove default title
without this removal a user would have to call `SetTitle("")` in order to
erase the default if they desire a title-less dialog.
2023-05-10 10:57:25 -05:00
Lea Anthony 7fd627f169 [v3 windows] initial systray support 2023-05-10 19:35:40 +10:00
Lea Anthony b91468b6f2 [v3 mac] Update api. New template icon. 2023-05-09 21:55:17 +10:00
Lea Anthony 0b9cd4be5d [v3 windows] update status 2023-05-09 21:47:22 +10:00
Lea Anthony 4c587ee1b8 [v3 windows] New icons 2023-05-09 19:53:01 +10:00
Lea Anthony 19e1e8b8a6 [v3 windows] Move icons to own package, systray dark mode icon, window.Focus(), 2023-05-09 19:52:33 +10:00
Lea Anthony 67e9522c67 [v3 windows] Rename systray callback handlers 2023-05-08 20:16:25 +10:00
Lea Anthony a829b38a34 [v3 windows] Dialogs to use invokeSync 2023-05-08 20:11:51 +10:00
Lea Anthony c8dae94b5b [v3 windows] Systray callback handlers 2023-05-08 19:43:58 +10:00
stffabi 87267758ac [v3 windows] Fix wndproc default case with WMMessageToString 2023-05-07 22:17:43 +02:00
stffabi 5f72df81fb [v3 windows] Do not disable WndProc messaging for systray when updating icon 2023-05-07 21:40:40 +02:00
Lea Anthony 1ed270fe05 [v3 windows] Fix systray icon size 2023-05-07 20:19:37 +10:00
Lea Anthony 19a654a2b1 [v3 windows] Initial systray support 2023-05-07 19:13:07 +10:00
Lea Anthony f9bbc11711 [v3] Use invokeSync for systray methods 2023-05-07 10:34:08 +10:00
Lea Anthony 42b1807c36 [v3 windows] Support irregular shaped windows. Centered option. 2023-05-06 20:22:28 +10:00
Lea Anthony 647982de1a [v3 windows] Support irregular shaped windows 2023-05-06 15:05:00 +10:00
Lea Anthony f5557c612a Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha 2023-05-05 06:41:04 +10:00
stffabi f4749db8b3 [v3] Add some missing methods for darwin and windows 2023-05-02 21:56:40 +02:00
Travis McLane 86a1de6788 [w32] move windows specific code to impl file 2023-05-02 10:52:21 -05:00
Travis McLane 792c5e2d95 [w32] add missing build constraint 2023-05-02 10:52:09 -05:00
Lea Anthony 6758580be9 [v3 windows] Add frameless resize 2023-05-02 23:18:22 +10:00
stffabi 6f246eed4a [v3 windows] Add HiDPI awareness 2023-05-02 09:45:21 +02:00
stffabi fc3725d3f4 [v3 windows] Add frameless support 2023-05-02 09:29:47 +02:00
Lea Anthony 00c6f0dfdb [v3 windows] Implement getScreen 2023-05-01 21:11:40 +10:00
Lea Anthony cf7b4e2458 [v3] Ensure impl calls from WebvieWindow are on the main thread. Support size. 2023-05-01 20:28:46 +10:00
Lea Anthony f682e44367 [v3] Fix examples 2023-05-01 18:24:24 +10:00
Lea Anthony 9d1f86c410 [v3] Update examples to use correct options. 2023-05-01 18:21:22 +10:00
Lea Anthony dac281ac32 [v3] Change WebviewWindow options to be a value, not a pointer. Support Un/Fullscreen. Remove main thread switching. Use parent options instead of local variables. 2023-05-01 18:20:28 +10:00
Lea Anthony 29a58086a3 [v3 Windows] Support application hide/show. Add WebviewWindow.IsVisible(). 2023-05-01 11:34:06 +10:00
Lea Anthony cb8eb755a7 [v3 Windows] Support setMin/MaxSize, setPosition 2023-05-01 10:52:46 +10:00
Lea Anthony 1e8fc29ee4 [v3 Windows] Add Support for SetTitle, Center, Un/Minimise/Maximise, IsMin/Maximised, IsNormal, Show/Hide 2023-04-30 20:55:51 +10:00
Lea Anthony 9a05b49e3d [v3 Breaking Change] Add NativeWindowHandle method to WebviewWindow. 2023-04-30 10:17:03 +10:00
Lea Anthony 79f8d92084 [v3 windows] Moved w32 from internal to pkg so it may be used by applications 2023-04-30 10:02:00 +10:00
Lea Anthony 6e56542586 [v3 windows] Add WndProcInterceptor for custom message processing 2023-04-30 09:49:50 +10:00
Lea Anthony c53443b62b [v3 windows] Rename options_windows.go -> options_win.go 2023-04-30 09:10:00 +10:00
Lea Anthony 1128662c89 [v3 windows] Add APM Events 2023-04-29 20:33:33 +10:00
Lea Anthony 676787417f [v3] Update application.On and window.On to return functions that unregister the listener. WebviewWindow.onApplicationEvent is a helper which will manage the unregistering for you on window destroy. 2023-04-29 19:39:05 +10:00
Lea Anthony 57422dccf3 [windows] Split out wndProc. Generate windows events, support per-window themes 2023-04-29 12:14:12 +10:00
Lea Anthony 7f3f51e36b [windows] Support AlwaysOnTop, EnableResize at runtime. Added Solid/Transparent/Translucent options. 2023-04-28 21:11:49 +10:00
stffabi ef184ec8bf [v3, windows] Add MainThread dispatching and fixes the blocking window 2023-04-26 21:06:54 +02:00
Lea Anthony 9bfe3094dd [windows] WIP 2023-04-26 21:07:04 +10:00
stffabi 3547b4d010 [v2, darwin] Add some missing default shortcuts (#2586)
* [v2, darwin] Add "Hide, Hide Others, Show All“ to appmenu

This also includes shortcuts support for those commands.
Arrange the menu items in the well known MacOS order.

* [v2, darwin] Add Window menu with well known shortcuts Minimize, Full-Screen and Zoom.
2023-04-26 21:07:04 +10:00
stffabi 1222e3aa1b [v2, dev] Use custom schemes for in-app dev mode (#2610)
This fixes some long-standing inconsistencies between
dev mode builds and production builds but is a breaking
change. Dev mode uses custom scheme for Vite versions >= 3.0.0
and for older it still behaves in the old way.
2023-04-26 21:07:03 +10:00
stffabi cff3ee5079 [assetServer] Improve release/close handling of webview requests (#2612) 2023-04-26 21:07:03 +10:00
Travis McLane c91aa462aa [darwin] add getPrimaryScreen/getScreens to impl (#2618) 2023-04-24 09:34:44 +10:00
Lea Anthony 62b3775e2f Fix module path for non-modified repo 2023-04-19 08:22:58 +10:00
Lea Anthony 54bf8c1142 [windows] Initial commit 2023-04-18 21:27:09 +10:00
Lea Anthony c4f613e4c5 [windows] Fix paths for wails init 2023-04-18 20:41:59 +10:00
Lea Anthony a66d9ab0b1 Intial STATUS.md commit 2023-04-18 18:53:39 +10:00
github-actions[bot] c7e5608a60 docs: sync translations (#2581)
Co-authored-by: misitebao <misitebao@users.noreply.github.com>
2023-04-17 23:48:27 +10:00
Misite Bao d8d4997532 chore: optimize website building process (#2601)
* chore: remove pnpm from dependencies

* chore: upgrade devDependencies

* chore: set Nodejs version
2023-04-17 20:54:06 +10:00
github-actions[bot] a1cc41c926 chore: update sponsors.svg (#2603)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-04-17 20:51:33 +10:00
stffabi 767bfcff89 [v2, windows] Make sure to open the CommonFileDialogs on the main thread (#2606)
Otherwise it might have some strange side-effects like blocking
the completion of Deferrals in WebView2 when using custom
IStreams.
2023-04-17 20:50:27 +10:00
Lea Anthony 46bcce7566 [website] Upgrade pnpm-lock.yaml 2023-04-16 20:58:19 +10:00
Lea Anthony c4609efe01 [website] Upgrade pnpm 2023-04-16 20:26:43 +10:00
Lea Anthony cc6518f984 Remove label-sponsors workflow for now 2023-04-16 20:22:56 +10:00
Lea Anthony 69d3a3f639 Remove generate-contributors workflow for now 2023-04-16 20:21:45 +10:00
Joshua Hull 489689b477 Use json.Marshal instead of strconv.Quote to correctly support unicode (#2509)
* Use json.Marshal instead of strconv.Quote to correctly support unicode

* Add fix to changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-16 10:19:40 +10:00
George Wang eaca3d06f6 Update zypper.go (#2593)
Add package(webkit2gtk3-soup2-devel) for `libwebkit`.
Change environment variable before running command to query information
of the package.
2023-04-16 10:00:39 +10:00
Matthew Davis b302064f2f Feature/templates/angular15 (#2595)
* added new angular template

* removed 2-year old template

* renamed to wails-template-angular from wails-angular-template

* added previous template back
2023-04-16 09:58:36 +10:00
Lea Anthony 67063d419c Update generate-contributors.yml 2023-04-15 20:40:45 +10:00
github-actions[bot] 03cef1887f chore: update sponsors.svg (#2596)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-04-15 18:14:43 +10:00
Lea Anthony 929593c5b8 Update generate-contributors.yml 2023-04-14 20:16:01 +10:00
Lea Anthony 57e718af68 Update generate-contributors.yml 2023-04-14 20:10:29 +10:00
github-actions[bot] f96aab0d44 chore: update sponsors.svg (#2591)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-04-14 20:08:52 +10:00
Lea Anthony 140e3b5947 Update generate-contributors.yml 2023-04-14 20:05:45 +10:00
Lea Anthony a8339c9e93 Update generate-contributors.yml 2023-04-14 20:04:12 +10:00
stffabi 39a7ab5856 [assetserver, linux] Add support for WebKit2GTK 2.40+ features (#2592) 2023-04-14 11:16:27 +02:00
stffabi ec3da8b7ef [v2, darwin] Fix updating the menu on runtime (#2588) 2023-04-14 00:14:19 +10:00
stffabi b64b2a8da1 [v2, dev] Fix skipbindings flag in wails dev (#2584) 2023-04-13 07:45:49 +10:00
Misite Bao 1979bca0f5 chore: fix pnpm environment settings (#2580) 2023-04-12 22:21:25 +10:00
Misite Bao 0f791c71f4 fix: fix website build and add taskfile (#2577)
* chore: update dependencies

* docs: update source documents

* chore: use Taskfile instead of scripts
2023-04-12 21:36:01 +10:00
Travis McLane fbe7d4de6b Bugfix/remove miniaturize (#2579)
* remove duplicate 'minimize' from interface

already covered by 'minimise'

* [darwin] remove windowMiniaturize

duplicates the logic in windowMinimise

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-12 21:34:31 +10:00
stffabi c8d203d4d6 [v3, darwin] Fix leaking WebKit processes on Window close (#2574)
* [v3, darwin] Fix leaking WebKit processes on Window close

* [v3] Remove window from window map if closed
[v3] Implement `HideOnClose` and ensure it isn't removed when closed

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-12 21:33:00 +10:00
Lea Anthony f335cbd608 Update generate-contributors.yml 2023-04-12 08:44:17 +10:00
Lea Anthony b67d1e72a7 Update generate-contributors.yml 2023-04-12 08:41:28 +10:00
Misite Bao 5e3c736bee feat(cli): add Nodejs version in wails doctor (#2546)
* feat(cli): add Nodejs version in `wails doctor`

* Added check for output length

* docs: update changelog.mdx

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-12 07:11:37 +10:00
Lea Anthony abc8f71a8d Update generate-contributors.yml 2023-04-11 21:29:41 +10:00
Lea Anthony cf8bb49093 Update generate-contributors.yml 2023-04-11 21:25:36 +10:00
Lea Anthony 3f62fa0d86 Update credits.mdx 2023-04-11 20:46:45 +10:00
Lea Anthony 8b977bcab4 Update generate-contributors.yml 2023-04-11 20:46:28 +10:00
Lea Anthony 3a1aeaab94 Update generate-contributors.yml 2023-04-11 20:22:27 +10:00
Travis McLane a7bf359930 update wml events to be parseable (#2561)
* update wml events to be parseable

* [v3] Rename `CustomEvent` to `WailsEvent` to prevent clashing with the standard JS `CustomEvent` object

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-11 18:28:06 +10:00
github-actions[bot] 9574bfc054 chore: update sponsors.svg (#2566)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-04-11 18:26:28 +10:00
希嘉嘉 739ca98597 Update templates.mdx (#2571) 2023-04-10 22:00:04 +10:00
Lea Anthony 424e4fc2e8 [v3] Add ability to get window by name 2023-04-07 19:47:01 +10:00
Misite Bao 7f1093dc51 chore: update auto workflows (#2555)
* chore: update workflows

* chore: update Taskfile

* chore: add lable to auto-sync pr
2023-04-07 18:19:14 +10:00
Lea Anthony a998465034 [v3] Update start_at_login plugin to allow better compilation on Linux 2023-04-06 08:29:20 +10:00
Lea Anthony 755e869fe7 [v3] Add start_at_login plugin
[v3] Fix plugin startup/shutdown order
2023-04-05 21:22:02 +10:00
Lea Anthony 7ecbc846b4 [v3] Improved plugin shutdown 2023-04-04 18:01:49 +10:00
Lea Anthony 767b7d6026 Check out repo for contributors workflow 2023-04-03 08:43:57 +10:00
Lea Anthony 086953bbe9 Do not directly commit contributors sag 2023-04-03 08:39:42 +10:00
Lea Anthony c51df752a1 Create PR for contributors SVG 2023-04-03 08:37:46 +10:00
Lea Anthony ea3b7ed9dd Generate Contributors SVG 2023-04-03 08:33:55 +10:00
dependabot[bot] ef6366af61 Bump webpack from 5.75.0 to 5.76.2 in /website (#2503)
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.2)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 22:02:24 +11:00
dependabot[bot] 488666f407 Bump undici from 5.13.0 to 5.21.0 in /scripts/sponsors (#2502)
Bumps [undici](https://github.com/nodejs/undici) from 5.13.0 to 5.21.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.13.0...v5.21.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 22:00:55 +11:00
Simon Shutter 34fd76617e annotated menu example and updated runtime.Quit call (#2539) 2023-04-01 21:50:29 +11:00
憧憬Licoy 1e8b938d15 fix obfuscate build param name (#2542)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-01 21:48:03 +11:00
Lea Anthony 3404250ac8 [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
Misite Bao eddc949295 fix: fix console printing (#2483) 2023-04-01 18:22:27 +11:00
Misite Bao 49bd33e642 docs: update routing.mdx (#2547) 2023-04-01 16:05:09 +11:00
github-actions[bot] 78f638a9bc docs: sync documents (#2514)
Co-authored-by: misitebao <misitebao@users.noreply.github.com>
2023-04-01 16:04:43 +11:00
github-actions[bot] fef6e2a616 chore: update sponsors.svg (#2535)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-04-01 16:03:09 +11:00
Noah Gorstein 2a22933220 docs: fix broken link for react router HashRouter (#2544) 2023-04-01 08:43:15 +11:00
Lea Anthony eae4fe62cd Merge branch 'v3/api-package' 2023-03-31 20:39:41 +11:00
stffabi b3a9332a5b [assetserver] Add linux platform implementation (#2543) 2023-03-31 20:39:13 +11:00
Lea Anthony e91b7832ee Provide types to runtime api 2023-03-31 20:37:50 +11:00
stffabi db527c0fc2 [assetserver] Add linux platform implementation (#2543) 2023-03-31 10:08:31 +02:00
Lea Anthony 0d25edc0c4 Improved api package 2023-03-30 12:51:43 +11:00
Lea Anthony eb36258c73 Merge branch 'master' into v3/plugins 2023-03-27 20:58:00 +11:00
Misite Bao bdb138d42c chore: fix push.yml (#2530) 2023-03-27 07:37:38 +11:00
Arpit Jain abe6f520b4 Fix dates in changelog (#2527) 2023-03-26 16:19:12 +11:00
Adam Tenderholt 130fab6c01 Feature/v3 parser: expand TS model generation tests & some fixes (#2485)
* v3 parser: add tests for model generation

* v3 parser: use single quotes for got model.ts

* v3 parser: fixes for some failing tests

* v3 parser: misc simplification and cleanup

* v3 parser: fix model tests when no structs returned

* v3 parser: fix last failing test case

* Update contributors list

* v3 parser: update README

* Revert "Update contributors list"

This reverts commit f429d2ba890020d7ff0772e6207830508261b489.

* Changelog: add line about my contribution
2023-03-25 10:09:17 +11:00
Lea Anthony 365aaf6bb1 Add sqlite plugin 2023-03-25 09:39:59 +11:00
github-actions[bot] b5f1eab59b chore: update sponsors.svg (#2525)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-24 23:20:18 +11:00
Lea Anthony 5949e305ea Reorder startup sequence
Add plugin scripts to asset server
Add InjectJS support in plugins
2023-03-24 08:43:00 +11:00
github-actions[bot] 5988cdca9a chore: update sponsors.svg (#2517)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-23 19:33:04 +11:00
Lea Anthony bf86b0d9c1 Add Window creation hooks
Add InjectJS() to plugins interface
2023-03-23 06:51:24 +11:00
Misite Bao 93d7c6b5f3 docs: optimize code block display style (#2520) 2023-03-22 21:54:08 +11:00
Lea Anthony d5808fde59 Simple logging plugin 2023-03-22 20:56:45 +11:00
Lea Anthony 3ae604e474 Exported() -> CallableByJS() 2023-03-22 20:42:20 +11:00
Lea Anthony 42fb91bc73 Fix for variadic args in bound methods 2023-03-22 20:36:46 +11:00
github-actions[bot] 7d28ad1a3b docs: sync documents (#2510)
Co-authored-by: misitebao <misitebao@users.noreply.github.com>
2023-03-21 17:47:23 +11:00
Lea Anthony 4165caa02e Add Exported() []string to plugin API 2023-03-21 08:55:55 +11:00
Lea Anthony b656bd2194 Prevent beeps when pressing a key in Mac window 2023-03-20 20:48:22 +11:00
Lea Anthony a7278b4224 Update docs 2023-03-20 20:32:25 +11:00
Lea Anthony e2b7b68ec9 v2.4.1 2023-03-20 20:31:35 +11:00
Lea Anthony ba82f27534 Fix Bug with nil parameters.
Added browser and kvstore plugins.
2023-03-20 20:28:33 +11:00
stffabi 47af68a8cb [windows] Allow single-clicks on wails-draggable items (#2482)
* [runtime] Make it possible to restore old drag behaviour on windows with window.wails.flags.deferDragToMouseMove

* [runtime] Use deferDragToMouseMove as new default

This enhanced version should work well in all cases for Windows:
- No lag/delayed start of dragging
- Double-Clicks and Single-Click events still work in JavaScript on elements

* [docs] Add changelog
2023-03-20 08:45:21 +01:00
github-actions[bot] 77f053068c docs: sync documents (#2504)
Co-authored-by: misitebao <misitebao@users.noreply.github.com>
2023-03-19 20:37:06 +11:00
Lea Anthony 13f620ae54 Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00
github-actions[bot] e3edea1cb3 chore: update sponsors.svg (#2498)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-18 11:48:23 +11:00
Lea Anthony c774af48b7 Extend call subsystem to support plugins 2023-03-18 09:12:44 +11:00
Lea Anthony 4300521064 Initial implementation 2023-03-18 08:11:36 +11:00
Filip Borkiewicz a0b7eb4ab6 Fix incorrect rendering of FAQ section header (#2497) 2023-03-18 07:37:21 +11:00
Lea Anthony 86aaa3a956 Merge branch 'v3/central-assetserver' into v3/plugins 2023-03-17 17:03:21 +11:00
stffabi 6ed0eb217d [webview2] Fix error handling in CreateWebResourceResponse (#2496)
The old error handling fails on WebView2Runtimes > 110.0.1587.69 and
will show a "connection refused" page and reloads after a short time.
After the reload everything worked as expected again.
2023-03-16 10:49:59 +01:00
github-actions[bot] a2c1c507e1 chore: update sponsors.svg (#2492)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-16 19:27:23 +11:00
stffabi 74f349862e [v3] AssetServer options update comments 2023-03-16 06:49:46 +01:00
stffabi 0e614b0194 [v3] Centralize the AssetServer and move it to the application 2023-03-16 06:49:45 +01:00
github-actions[bot] 4bffc57cb5 chore: update sponsors.svg (#2488)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-14 17:32:25 +11:00
stffabi 5dba18c853 [dev] Fix panic in devserver when using the logger (#2481) 2023-03-13 08:12:09 +01:00
github-actions[bot] 4cd873fecb docs: sync documents (#2443)
Co-authored-by: misitebao <misitebao@users.noreply.github.com>
2023-03-11 17:57:56 +11:00
Misite Bao e339c40e85 feat: update sync translated document script (#2479) 2023-03-11 14:09:48 +11:00
github-actions[bot] 050ac9e613 chore: update sponsors.svg (#2478)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-11 12:54:20 +11:00
Lea Anthony 58986237b9 [v3] Minor fixes to templates + improved Taskfile 2023-03-11 12:48:10 +11:00
Lea Anthony 7cb4c7b505 [v3] Improve init command 2023-03-10 08:05:13 +11:00
dependabot[bot] e3816e714e Bump golang.org/x/net in /v3/examples/binding (#2472)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220722155237-a158d28d115b to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-09 20:07:11 +11:00
github-actions[bot] 1684894b52 chore: update sponsors.svg (#2474)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-03-09 20:06:35 +11:00
648 changed files with 28492 additions and 20650 deletions
-15
View File
@@ -1,15 +0,0 @@
name: Label sponsors
on:
pull_request:
types: [ opened ]
issues:
types: [ opened ]
jobs:
build:
name: is-sponsor-label
if: github.repository == 'wailsapp/wails'
runs-on: ubuntu-latest
steps:
- uses: JasonEtco/is-sponsor-label-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
name: Sync Translated Documents
name: Sync Translations
on:
workflow_dispatch:
@@ -10,22 +10,30 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set node
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: 18.x
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync Translated Documents
run: cd scripts && chmod 755 ./sync-translated-documents.sh && ./sync-translated-documents.sh
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
working-directory: ./website
run: task crowdin:pull
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "docs: sync documents"
title: "docs: sync documents"
commit-message: "docs: sync translations"
title: "docs: sync translations"
body: "- [x] Sync translated documents"
branch: feature/documents
branch: chore/sync-translations
labels: translation
delete-branch: true
draft: true
@@ -1,8 +1,9 @@
name: Push Checks
name: Upload Source Documents
on:
push:
branches: [master]
workflow_dispatch:
jobs:
push_files_to_crowdin:
@@ -13,25 +14,28 @@ jobs:
- uses: actions/checkout@v2
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v11.1
id: verify-changed-files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: |
website/**/*.mdx
website/**/*.md
website/**/*.json
- name: Set node
if: steps.verify-changed-files.outputs.files_changed != 'true'
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: 18.x
- name: Push files
- name: Setup Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload source documents
if: steps.changed-files.outputs.any_changed == 'true'
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
run: |
cd website
corepack enable
pnpm install
pnpm run crowdin push -b master
working-directory: ./website
run: task crowdin:push
+2
View File
@@ -34,3 +34,5 @@ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
/v3/.task
/v3/examples/build/bin/testapp
/websitev3/site/
/v3/examples/plugins/bin/testapp
+1
View File
@@ -97,6 +97,7 @@ This project is supported by these kind people / companies:
<p align="center">
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
</p>
## FAQ
- Is this an alternative to Electron?
+5 -5
View File
@@ -1,24 +1,24 @@
# https://taskfile.dev
version: '3'
version: "3"
vars:
GREETING: Hello, World!
tasks:
check-contributors:
contributors:check:
cmds:
- npx -y all-contributors-cli check
update-contributors:
contributors:update:
cmds:
- go run v3/tasks/contribs/main.go
build-contributors:
contributors:build:
cmds:
- npx -y all-contributors-cli generate
release:
dir: v2/tools/release
cmds:
- go run release.go
- go run release.go
+3 -3
View File
@@ -1775,9 +1775,9 @@
}
},
"node_modules/undici": {
"version": "5.13.0",
"resolved": "https://registry.npmmirror.com/undici/-/undici-5.13.0.tgz",
"integrity": "sha512-UDZKtwb2k7KRsK4SdXWG7ErXiL7yTGgLWvk2AXO1JMjgjh404nFo6tWSCM2xMpJwMPx3J8i/vfqEh1zOqvj82Q==",
"version": "5.21.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz",
"integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==",
"dependencies": {
"busboy": "^1.6.0"
},
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
cd ../website
npx @crowdin/cli@latest pull -b master
+5 -3
View File
@@ -2,14 +2,15 @@ package flags
import (
"fmt"
"github.com/samber/lo"
"github.com/wailsapp/wails/v2/internal/project"
"github.com/wailsapp/wails/v2/pkg/commands/build"
"net"
"net/url"
"os"
"path/filepath"
"runtime"
"github.com/samber/lo"
"github.com/wailsapp/wails/v2/internal/project"
"github.com/wailsapp/wails/v2/pkg/commands/build"
)
type Dev struct {
@@ -126,6 +127,7 @@ func (d *Dev) GenerateBuildOptions() *build.Options {
Compiler: d.Compiler,
ForceBuild: d.ForceBuild,
IgnoreFrontend: d.SkipFrontend,
SkipBindings: d.SkipBindings,
Verbosity: d.Verbosity,
WailsJSDir: d.WailsJSDir,
RaceDetector: d.RaceDetector,
+34 -35
View File
@@ -22,6 +22,7 @@ import (
"github.com/wailsapp/wails/v2/cmd/wails/flags"
"github.com/wailsapp/wails/v2/cmd/wails/internal/gomod"
"github.com/wailsapp/wails/v2/cmd/wails/internal/logutils"
"golang.org/x/mod/semver"
"github.com/wailsapp/wails/v2/pkg/commands/buildtags"
@@ -36,6 +37,10 @@ import (
"github.com/wailsapp/wails/v2/pkg/commands/build"
)
const (
viteMinVersion = "v3.0.0"
)
func sliceToMap(input []string) map[string]struct{} {
result := map[string]struct{}{}
for _, value := range input {
@@ -44,31 +49,6 @@ func sliceToMap(input []string) map[string]struct{} {
return result
}
type devFlags struct {
ldflags string
compilerCommand string
assetDir string
extensions string
reloadDirs string
openBrowser bool
noReload bool
skipBindings bool
wailsjsdir string
tags string
verbosity int
loglevel string
forceBuild bool
debounceMS int
devServer string
appargs string
saveConfig bool
raceDetector bool
frontendDevServerURL string
skipFrontend bool
noColour bool
}
// Application runs the application in dev mode
func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
@@ -113,10 +93,11 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
buildOptions.IgnoreApplication = false
}
legacyUseDevServerInsteadofCustomScheme := false
// frontend:dev:watcher command.
frontendDevAutoDiscovery := projectConfig.IsFrontendDevServerURLAutoDiscovery()
if command := projectConfig.DevWatcherCommand; command != "" {
closer, devServerURL, err := runFrontendDevWatcherCommand(projectConfig.GetFrontendDir(), command, frontendDevAutoDiscovery)
closer, devServerURL, devServerViteVersion, err := runFrontendDevWatcherCommand(projectConfig.GetFrontendDir(), command, frontendDevAutoDiscovery)
if err != nil {
return err
}
@@ -125,6 +106,12 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
f.FrontendDevServerURL = devServerURL
}
defer closer()
if devServerViteVersion != "" && semver.Compare(devServerViteVersion, viteMinVersion) < 0 {
logutils.LogRed("Please upgrade your Vite Server to at least '%s' future Wails versions will require at least Vite '%s'", viteMinVersion, viteMinVersion)
time.Sleep(3 * time.Second)
legacyUseDevServerInsteadofCustomScheme = true
}
} else if frontendDevAutoDiscovery {
return fmt.Errorf("unable to auto discover frontend:dev:serverUrl without a frontend:dev:watcher command, please either set frontend:dev:watcher or remove the auto discovery from frontend:dev:serverUrl")
}
@@ -132,7 +119,7 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
// Do initial build but only for the application.
logger.Println("Building application for development...")
buildOptions.IgnoreFrontend = true
debugBinaryProcess, appBinary, err := restartApp(buildOptions, nil, f, exitCodeChannel)
debugBinaryProcess, appBinary, err := restartApp(buildOptions, nil, f, exitCodeChannel, legacyUseDevServerInsteadofCustomScheme)
buildOptions.IgnoreFrontend = ignoreFrontend || f.FrontendDevServerURL != ""
if err != nil {
return err
@@ -178,7 +165,7 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
}()
// Watch for changes and trigger restartApp()
debugBinaryProcess = doWatcherLoop(buildOptions, debugBinaryProcess, f, watcher, exitCodeChannel, quitChannel, f.DevServerURL())
debugBinaryProcess = doWatcherLoop(buildOptions, debugBinaryProcess, f, watcher, exitCodeChannel, quitChannel, f.DevServerURL(), legacyUseDevServerInsteadofCustomScheme)
// Kill the current program if running and remove dev binary
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
@@ -227,7 +214,7 @@ func runCommand(dir string, exitOnError bool, command string, args ...string) er
}
// runFrontendDevWatcherCommand will run the `frontend:dev:watcher` command if it was given, ex- `npm run dev`
func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, discoverViteServerURL bool) (func(), string, error) {
func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, discoverViteServerURL bool) (func(), string, string, error) {
ctx, cancel := context.WithCancel(context.Background())
scanner := NewStdoutScanner()
cmdSlice := strings.Split(devCommand, " ")
@@ -239,7 +226,7 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
if err := cmd.Start(); err != nil {
cancel()
return nil, "", fmt.Errorf("unable to start frontend DevWatcher: %w", err)
return nil, "", "", fmt.Errorf("unable to start frontend DevWatcher: %w", err)
}
var viteServerURL string
@@ -249,10 +236,19 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
viteServerURL = serverURL
case <-time.After(time.Second * 10):
cancel()
return nil, "", errors.New("failed to find Vite server URL")
return nil, "", "", errors.New("failed to find Vite server URL")
}
}
viteVersion := ""
select {
case version := <-scanner.ViteServerVersionC:
viteVersion = version
case <-time.After(time.Second * 5):
// That's fine, then most probably it was not vite that was running
}
logutils.LogGreen("Running frontend DevWatcher command: '%s'", devCommand)
var wg sync.WaitGroup
wg.Add(1)
@@ -280,11 +276,11 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
}
cancel()
wg.Wait()
}, viteServerURL, nil
}, viteServerURL, viteVersion, nil
}
// restartApp does the actual rebuilding of the application when files change
func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, exitCodeChannel chan int) (*process.Process, string, error) {
func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, exitCodeChannel chan int, legacyUseDevServerInsteadofCustomScheme bool) (*process.Process, string, error) {
appBinary, err := build.Build(buildOptions)
println()
@@ -322,6 +318,9 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
os.Setenv("assetdir", f.AssetDir)
os.Setenv("devserver", f.DevServer)
os.Setenv("frontenddevserverurl", f.FrontendDevServerURL)
if legacyUseDevServerInsteadofCustomScheme {
os.Setenv("legacyusedevsererinsteadofcustomscheme", "true")
}
// Start up new binary with correct args
newProcess := process.NewProcess(appBinary, args...)
@@ -341,7 +340,7 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
}
// doWatcherLoop is the main watch loop that runs while dev is active
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL) *process.Process {
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL, legacyUseDevServerInsteadofCustomScheme bool) *process.Process {
// Main Loop
var extensionsThatTriggerARebuild = sliceToMap(strings.Split(f.Extensions, ","))
var dirsThatTriggerAReload []string
@@ -447,7 +446,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
rebuild = false
logutils.LogGreen("[Rebuild triggered] files updated")
// Try and build the app
newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, f, exitCodeChannel)
newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, f, exitCodeChannel, legacyUseDevServerInsteadofCustomScheme)
if err != nil {
logutils.LogRed("Error during build: %s", err.Error())
continue
+37 -2
View File
@@ -2,30 +2,47 @@ package dev
import (
"bufio"
"fmt"
"net/url"
"os"
"strings"
"github.com/acarl005/stripansi"
"github.com/wailsapp/wails/v2/cmd/wails/internal/logutils"
"golang.org/x/mod/semver"
)
// stdoutScanner acts as a stdout target that will scan the incoming
// data to find out the vite server url
type stdoutScanner struct {
ViteServerURLChan chan string
ViteServerURLChan chan string
ViteServerVersionC chan string
versionDetected bool
}
// NewStdoutScanner creates a new stdoutScanner
func NewStdoutScanner() *stdoutScanner {
return &stdoutScanner{
ViteServerURLChan: make(chan string, 2),
ViteServerURLChan: make(chan string, 2),
ViteServerVersionC: make(chan string, 2),
}
}
// Write bytes to the scanner. Will copy the bytes to stdout
func (s *stdoutScanner) Write(data []byte) (n int, err error) {
input := stripansi.Strip(string(data))
if !s.versionDetected {
v, err := detectViteVersion(input)
if v != "" || err != nil {
if err != nil {
logutils.LogRed("ViteStdoutScanner: %s", err)
v = "v0.0.0"
}
s.ViteServerVersionC <- v
s.versionDetected = true
}
}
match := strings.Index(input, "Local:")
if match != -1 {
sc := bufio.NewScanner(strings.NewReader(input))
@@ -47,3 +64,21 @@ func (s *stdoutScanner) Write(data []byte) (n int, err error) {
}
return os.Stdout.Write(data)
}
func detectViteVersion(line string) (string, error) {
s := strings.Split(strings.TrimSpace(line), " ")
if strings.ToLower(s[0]) != "vite" {
return "", nil
}
if len(line) < 2 {
return "", fmt.Errorf("unable to parse vite version")
}
v := s[1]
if !semver.IsValid(v) {
return "", fmt.Errorf("%s is not a valid vite version string", v)
}
return v, nil
}
+1 -1
View File
@@ -1 +1 @@
v2.4.0
v2.4.1
+1 -1
View File
@@ -41,7 +41,7 @@ func printBulletPoint(text string, args ...any) {
fatal(err.Error())
}
t = strings.Trim(t, "\n\r")
pterm.Printf(t, args...)
pterm.Printfln(t, args...)
}
func printFooter() {
@@ -8,6 +8,6 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^2.9.9"
"vite": "^3.0.7"
}
}
+44 -5
View File
@@ -8,9 +8,11 @@ import (
"flag"
"fmt"
iofs "io/fs"
"net"
"net/url"
"os"
"path/filepath"
"time"
"github.com/wailsapp/wails/v2/pkg/assetserver"
@@ -104,17 +106,35 @@ func CreateApp(appoptions *options.App) (*App, error) {
}
if frontendDevServerURL != "" {
if devServer == "" {
return nil, fmt.Errorf("Unable to use FrontendDevServerUrl without a DevServer address")
if os.Getenv("legacyusedevsererinsteadofcustomscheme") != "" {
startURL, err := url.Parse("http://" + devServer)
if err != nil {
return nil, err
}
ctx = context.WithValue(ctx, "starturl", startURL)
}
startURL, err := url.Parse("http://" + devServer)
ctx = context.WithValue(ctx, "frontenddevserverurl", frontendDevServerURL)
externalURL, err := url.Parse(frontendDevServerURL)
if err != nil {
return nil, err
}
ctx = context.WithValue(ctx, "starturl", startURL)
ctx = context.WithValue(ctx, "frontenddevserverurl", frontendDevServerURL)
if externalURL.Host == "" {
return nil, fmt.Errorf("Invalid frontend:dev:serverUrl missing protocol scheme?")
}
waitCb := func() { myLogger.Debug("Waiting for frontend DevServer '%s' to be ready", externalURL) }
if !checkPortIsOpen(externalURL.Host, time.Minute, waitCb) {
myLogger.Error("Timeout waiting for frontend DevServer")
}
handler := assetserver.NewExternalAssetsHandler(myLogger, assetConfig, externalURL)
assetConfig.Assets = nil
assetConfig.Handler = handler
assetConfig.Middleware = nil
myLogger.Info("Serving assets from frontend DevServer URL: %s", frontendDevServerURL)
} else {
@@ -246,3 +266,22 @@ func tryInferAssetDirFromFS(assets iofs.FS) (string, error) {
return path, nil
}
func checkPortIsOpen(host string, timeout time.Duration, waitCB func()) (ret bool) {
if timeout == 0 {
timeout = time.Minute
}
deadline := time.Now().Add(timeout)
for time.Now().Before(deadline) {
conn, _ := net.DialTimeout("tcp", host, 2*time.Second)
if conn != nil {
conn.Close()
return true
}
waitCB()
time.Sleep(1 * time.Second)
}
return false
}
@@ -12,5 +12,6 @@ typedef int Role;
static const Role AppMenu = 1;
static const Role EditMenu = 2;
static const Role WindowMenu = 3;
#endif /* Role_h */
@@ -68,12 +68,20 @@
appName = [[NSProcessInfo processInfo] processName];
}
WailsMenu *appMenu = [[[WailsMenu new] initWithNSTitle:appName] autorelease];
if (ctx.aboutTitle != nil) {
[appMenu addItem:[self newMenuItemWithContext :ctx :[@"About " stringByAppendingString:appName] :@selector(About) :nil :0]];
[appMenu addItem:[NSMenuItem separatorItem]];
}
[appMenu addItem:[self newMenuItem:[@"Hide " stringByAppendingString:appName] :@selector(hide:) :@"h" :NSEventModifierFlagCommand]];
[appMenu addItem:[self newMenuItem:@"Hide Others" :@selector(hideOtherApplications:) :@"h" :(NSEventModifierFlagOption | NSEventModifierFlagCommand)]];
[appMenu addItem:[self newMenuItem:@"Show All" :@selector(unhideAllApplications:) :@""]];
[appMenu addItem:[NSMenuItem separatorItem]];
id quitTitle = [@"Quit " stringByAppendingString:appName];
NSMenuItem* quitMenuItem = [self newMenuItem:quitTitle :@selector(Quit) :@"q" :NSEventModifierFlagCommand];
quitMenuItem.target = ctx;
if (ctx.aboutTitle != nil) {
[appMenu addItem:[self newMenuItemWithContext :ctx :[@"About " stringByAppendingString:appName] :@selector(About) :nil :0]];
}
[appMenu addItem:quitMenuItem];
[self appendSubmenu:appMenu];
break;
@@ -100,6 +108,17 @@
[editMenu appendSubmenu:speechMenu];
[self appendSubmenu:editMenu];
break;
}
case WindowMenu:
{
WailsMenu *windowMenu = [[[WailsMenu new] initWithNSTitle:@"Window"] autorelease];
[windowMenu addItem:[self newMenuItem:@"Minimize" :@selector(performMiniaturize:) :@"m" :NSEventModifierFlagCommand]];
[windowMenu addItem:[self newMenuItem:@"Zoom" :@selector(performZoom:) :@""]];
[windowMenu addItem:[NSMenuItem separatorItem]];
[windowMenu addItem:[self newMenuItem:@"Full Screen" :@selector(enterFullScreenMode:) :@"f" :(NSEventModifierFlagControl | NSEventModifierFlagCommand)]];
[self appendSubmenu:windowMenu];
break;
}
}
@@ -20,7 +20,6 @@ import (
"html/template"
"log"
"net/url"
"strconv"
"unsafe"
"github.com/wailsapp/wails/v2/pkg/assetserver"
@@ -114,7 +113,6 @@ func (f *Frontend) startMessageProcessor() {
func (f *Frontend) startRequestProcessor() {
for request := range requestBuffer {
f.assets.ServeWebViewRequest(request)
request.Release()
}
}
func (f *Frontend) startCallbackProcessor() {
@@ -337,7 +335,11 @@ func (f *Frontend) processMessage(message string) {
}
func (f *Frontend) Callback(message string) {
f.ExecJS(`window.wails.Callback(` + strconv.Quote(message) + `);`)
escaped, err := json.Marshal(message)
if err != nil {
panic(err)
}
f.ExecJS(`window.wails.Callback(` + string(escaped) + `);`)
}
func (f *Frontend) ExecJS(js string) {
@@ -130,6 +130,5 @@ func (f *Frontend) MenuSetApplicationMenu(menu *menu.Menu) {
}
func (f *Frontend) MenuUpdateApplicationMenu() {
f.MenuSetApplicationMenu(f.frontendOptions.Menu)
f.mainWindow.UpdateApplicationMenu()
}
+10 -45
View File
@@ -78,16 +78,15 @@ import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
"runtime"
"strconv"
"strings"
"text/template"
"unsafe"
"github.com/wailsapp/wails/v2/pkg/assetserver"
"github.com/wailsapp/wails/v2/pkg/assetserver/webview"
"github.com/wailsapp/wails/v2/internal/binding"
"github.com/wailsapp/wails/v2/internal/frontend"
@@ -166,10 +165,7 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
}
result.assets = assets
// Start 10 processors to handle requests in parallel
for i := 0; i < 10; i++ {
go result.startRequestProcessor()
}
go result.startRequestProcessor()
}
go result.startMessageProcessor()
@@ -437,7 +433,11 @@ func (f *Frontend) processMessage(message string) {
}
func (f *Frontend) Callback(message string) {
f.ExecJS(`window.wails.Callback(` + strconv.Quote(message) + `);`)
escaped, err := json.Marshal(message)
if err != nil {
panic(err)
}
f.ExecJS(`window.wails.Callback(` + string(escaped) + `);`)
}
func (f *Frontend) startDrag() {
@@ -461,50 +461,15 @@ func processMessage(message *C.char) {
messageBuffer <- goMessage
}
var requestBuffer = make(chan unsafe.Pointer, 100)
var requestBuffer = make(chan webview.Request, 100)
func (f *Frontend) startRequestProcessor() {
for request := range requestBuffer {
f.processRequest(request)
C.g_object_unref(C.gpointer(request))
f.assets.ServeWebViewRequest(request)
}
}
//export processURLRequest
func processURLRequest(request unsafe.Pointer) {
// Increment reference counter to allow async processing, will be decremented after the processing
// has been finished by a worker.
C.g_object_ref(C.gpointer(request))
requestBuffer <- request
}
func (f *Frontend) processRequest(request unsafe.Pointer) {
req := (*C.WebKitURISchemeRequest)(request)
uri := C.webkit_uri_scheme_request_get_uri(req)
goURI := C.GoString(uri)
rw := &webKitResponseWriter{req: req}
defer rw.Close()
f.assets.ProcessHTTPRequestLegacy(
rw,
func() (*http.Request, error) {
method := webkit_uri_scheme_request_get_http_method(req)
r, err := http.NewRequest(method, goURI, nil)
if err != nil {
return nil, err
}
r.Header = webkit_uri_scheme_request_get_http_headers(req)
if r.URL.Host != f.startURL.Host {
if r.Body != nil {
r.Body.Close()
}
return nil, fmt.Errorf("Expected host '%s' in request, but was '%s'", f.startURL.Host, r.URL.Host)
}
return r, nil
})
requestBuffer <- webview.NewRequest(request)
}

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