Compare commits

..

7 Commits

Author SHA1 Message Date
cenan ozen d4dabc1289 Fix window position inconsistency in MacOS (#3479)
* Fix window position inconsistency in MacOS

* Updated changelog
2024-05-15 07:22:09 +10:00
Lea Anthony cf18fcfc1e Use NewSingleHostReverseProxy (#3480) 2024-05-14 21:04:28 +02:00
Atterpac 035ede4701 fix optional field syntax and ioutil replace with os' (#3476)
changelog
2024-05-14 06:40:31 +10:00
Oguz Yilmaz 0f66a98449 fix broken links in the howdoesitwork page (#3469)
* fix broken links in the howdoesitwork page

* updated changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-12 14:28:32 +10:00
github-actions[bot] cb67c266cf chore: update sponsors.svg (#3472)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2024-05-12 14:27:18 +10:00
Lea Anthony 8d2a353bce Bump Go to 1.22 in pipelines (#3473)
* Bump Go to 1.22 in pipelines

* Bump Go to 1.22 in pipelines
2024-05-12 14:26:56 +10:00
Atterpac 05bdeb0844 allow builds for webkit2gtk-4.1 (#3465) 2024-05-08 19:26:27 -05:00
8 changed files with 23 additions and 20 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-11]
go-version: ['1.20']
go-version: ['1.22']
steps:
- name: Checkout code
@@ -90,7 +90,7 @@ jobs:
vanilla-ts,
plain,
]
go-version: ['1.20']
go-version: ['1.22']
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -64,7 +64,7 @@ jobs:
- 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.1-dev build-essential pkg-config
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v3
@@ -55,7 +55,7 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
NSScreen* screen = [self getCurrentScreen];
NSRect windowFrame = [self.mainWindow frame];
NSRect screenFrame = [screen frame];
NSRect screenFrame = [screen visibleFrame];
windowFrame.origin.x = screenFrame.origin.x + (float)x;
windowFrame.origin.y = (screenFrame.origin.y + screenFrame.size.height) - windowFrame.size.height - (float)y;
+5 -5
View File
@@ -3,7 +3,7 @@ package typescriptify
import (
"bufio"
"fmt"
"io/ioutil"
"io"
"log"
"os"
"path"
@@ -394,7 +394,7 @@ func loadCustomCode(fileName string) (map[string]string, error) {
}
defer f.Close()
bytes, err := ioutil.ReadAll(f)
bytes, err := io.ReadAll(f)
if err != nil {
return result, err
}
@@ -430,7 +430,7 @@ func (t TypeScriptify) backup(fileName string) error {
}
defer fileIn.Close()
bytes, err := ioutil.ReadAll(fileIn)
bytes, err := io.ReadAll(fileIn)
if err != nil {
return err
}
@@ -440,7 +440,7 @@ func (t TypeScriptify) backup(fileName string) error {
backupFn = path.Join(t.BackupDir, backupFn)
}
return ioutil.WriteFile(backupFn, bytes, os.FileMode(0o700))
return os.WriteFile(backupFn, bytes, os.FileMode(0o700))
}
func (t TypeScriptify) ConvertToFile(fileName string, packageName string) error {
@@ -894,7 +894,7 @@ func (t *typeScriptClassBuilder) addField(fld, fldType string, isAnyType bool) {
isOptional := strings.HasSuffix(fld, "?")
strippedFieldName := strings.ReplaceAll(fld, "?", "")
if !regexp.MustCompile(jsVariableNameRegex).Match([]byte(strippedFieldName)) {
fld = fmt.Sprintf(`"%s"`, fld)
fld = fmt.Sprintf(`"%s"`, strippedFieldName)
if isOptional {
fld += "?"
}
+3 -8
View File
@@ -3,12 +3,10 @@ package assetserver
import (
"errors"
"fmt"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"net/http"
"net/http/httputil"
"net/url"
"runtime"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
func NewProxyServer(proxyURL string) http.Handler {
@@ -16,10 +14,7 @@ func NewProxyServer(proxyURL string) http.Handler {
if err != nil {
panic(err)
}
return NewExternalAssetsHandler(nil,
assetserver.Options{},
parsedURL)
return httputil.NewSingleHostReverseProxy(parsedURL)
}
func NewExternalAssetsHandler(logger Logger, options assetserver.Options, url *url.URL) http.Handler {
@@ -68,7 +63,7 @@ func NewExternalAssetsHandler(logger Logger, options assetserver.Options, url *u
var result http.Handler = http.HandlerFunc(
func(rw http.ResponseWriter, req *http.Request) {
if runtime.GOOS == "darwin" || req.Method == http.MethodGet {
if req.Method == http.MethodGet {
proxy.ServeHTTP(rw, req)
return
}
+2 -2
View File
@@ -88,7 +88,7 @@ This example has the following options set:
- `OnShutdown` - A callback for when the application is about to quit
- `Bind` - A slice of struct instances that we wish to expose to the frontend
A full list of application options can be found in the [Options Reference](reference/options).
A full list of application options can be found in the [Options Reference](reference/options.mdx).
#### Assets
@@ -466,4 +466,4 @@ tasks such as emit an event or perform logging operations:
window.runtime.EventsEmit("my-event", 1);
```
More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro).
More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro.mdx).
+8
View File
@@ -17,6 +17,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Support for compiling with `libwebkit2gtk-4.1` instead of `4.0` to support latest Ubuntu release by [atterpac](https://github.com/atterpac) in [#3465](https://github.com/wailsapp/wails/pull/3465)
### Changed
- Updated several broken links in the "How Does It Work?" page on the website. Changed by [@oguz-yilmaz](https://github.com/oguz-yilmaz) in [PR #3469](https://github.com/wailsapp/wails/pull/3469)
- Upgraded Go version in CI to 1.22 by [@leaanthony](https://github.com/leaanthony) in [#3473](https://github.com/wailsapp/wails/pull/3473).
### Fixed
- Fixed optional type generation where an extra `?` would be placed inside the field name instead of outside the name `"field?"?` vs `"field"?`. Fixed by [@atterpac](https://github.com/atterpac) in [#3476](https://github.com/wailsapp/wails/pull/3476)
- Fixed an issue where `WindowGetPosition` and `WindowSetPosition` values were inconsistent on MacOS. Fixed by [@cenan](https://github.com/wailsapp/wails/pull/3479)
## v2.8.2 - 2024-05-08
### Breaking Change
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 243 KiB

After

Width:  |  Height:  |  Size: 242 KiB