Compare commits

...

8 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
Lea Anthony 1193fe9799 Update credits 2024-05-08 20:50:38 +10:00
23 changed files with 73 additions and 36 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
@@ -56,7 +56,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: ['1.20']
go-version: ['1.22']
steps:
- name: Checkout code
@@ -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;
@@ -4,7 +4,9 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
@@ -4,7 +4,9 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
+3 -1
View File
@@ -4,7 +4,9 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
+4 -1
View File
@@ -4,7 +4,10 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
+3 -1
View File
@@ -4,7 +4,9 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
+4 -1
View File
@@ -4,7 +4,10 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#cgo CFLAGS: -w
#include <stdio.h>
#include "webkit2/webkit2.h"
@@ -3,7 +3,8 @@
package linux
/*
#cgo linux pkg-config: webkit2gtk-4.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "webkit2/webkit2.h"
*/
import "C"
+3 -1
View File
@@ -4,7 +4,9 @@
package linux
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include <JavaScriptCore/JavaScript.h>
#include <gtk/gtk.h>
+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
}
+3 -1
View File
@@ -4,7 +4,9 @@
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
@@ -4,7 +4,9 @@
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
+4 -2
View File
@@ -1,9 +1,11 @@
//go:build linux && (webkit2_36 || webkit2_40)
//go:build linux && (webkit2_36 || webkit2_40 || webkit2_41 )
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 libsoup-2.4
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0 libsoup-2.4
#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
+4 -2
View File
@@ -1,9 +1,11 @@
//go:build linux && webkit2_40
//go:build linux && (webkit2_40 || webkit2_41)
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
+5
View File
@@ -0,0 +1,5 @@
//go:build linux && webkit2_41
package webview
const Webkit2MinMinorVersion = 41
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build linux && !(webkit2_36 || webkit2_40)
//go:build linux && !(webkit2_36 || webkit2_40 || webkit2_41)
package webview
+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).

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