mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e408fa377b | |||
| d18fef8f55 | |||
| 18d28c9ab5 |
@@ -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
|
||||
|
||||
@@ -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.0-dev build-essential pkg-config
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-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 visibleFrame];
|
||||
NSRect screenFrame = [screen frame];
|
||||
windowFrame.origin.x = screenFrame.origin.x + (float)x;
|
||||
windowFrame.origin.y = (screenFrame.origin.y + screenFrame.size.height) - windowFrame.size.height - (float)y;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package typescriptify
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
@@ -394,7 +394,7 @@ func loadCustomCode(fileName string) (map[string]string, error) {
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
bytes, err := io.ReadAll(f)
|
||||
bytes, err := ioutil.ReadAll(f)
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
@@ -430,7 +430,7 @@ func (t TypeScriptify) backup(fileName string) error {
|
||||
}
|
||||
defer fileIn.Close()
|
||||
|
||||
bytes, err := io.ReadAll(fileIn)
|
||||
bytes, err := ioutil.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 os.WriteFile(backupFn, bytes, os.FileMode(0o700))
|
||||
return ioutil.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"`, strippedFieldName)
|
||||
fld = fmt.Sprintf(`"%s"`, fld)
|
||||
if isOptional {
|
||||
fld += "?"
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@ 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 {
|
||||
@@ -14,7 +16,10 @@ func NewProxyServer(proxyURL string) http.Handler {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return httputil.NewSingleHostReverseProxy(parsedURL)
|
||||
return NewExternalAssetsHandler(nil,
|
||||
assetserver.Options{},
|
||||
parsedURL)
|
||||
|
||||
}
|
||||
|
||||
func NewExternalAssetsHandler(logger Logger, options assetserver.Options, url *url.URL) http.Handler {
|
||||
@@ -63,7 +68,7 @@ func NewExternalAssetsHandler(logger Logger, options assetserver.Options, url *u
|
||||
|
||||
var result http.Handler = http.HandlerFunc(
|
||||
func(rw http.ResponseWriter, req *http.Request) {
|
||||
if req.Method == http.MethodGet {
|
||||
if runtime.GOOS == "darwin" || req.Method == http.MethodGet {
|
||||
proxy.ServeHTTP(rw, req)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -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.mdx).
|
||||
A full list of application options can be found in the [Options Reference](reference/options).
|
||||
|
||||
#### 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.mdx).
|
||||
More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro).
|
||||
|
||||
@@ -17,14 +17,6 @@ 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: 242 KiB After Width: | Height: | Size: 243 KiB |
Reference in New Issue
Block a user