mirror of
https://github.com/taigrr/wails.git
synced 2026-04-11 09:31:31 -07:00
Compare commits
9 Commits
v2.0.0-bet
...
v2.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d19c982eed | ||
|
|
a963836e75 | ||
|
|
00e9eb4b0b | ||
|
|
262b6281e1 | ||
|
|
f66c70f0be | ||
|
|
717d373668 | ||
|
|
d29fa94aa4 | ||
|
|
01dd0cd0b2 | ||
|
|
126cc78d1a |
@@ -138,6 +138,9 @@ This project is supported by these kind people / companies:
|
||||
<a href="https://github.com/questrail" style="width:50px">
|
||||
<img src="https://github.com/questrail.png?size=50" width="50"/>
|
||||
</a>
|
||||
<a href="https://github.com/DonTomato" style="width:45px">
|
||||
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
|
||||
</a>
|
||||
|
||||
<span id="nav-5"></span>
|
||||
|
||||
|
||||
@@ -139,6 +139,9 @@
|
||||
<a href="https://github.com/questrail" style="width:50px">
|
||||
<img src="https://github.com/questrail.png?size=50" width="50"/>
|
||||
</a>
|
||||
<a href="https://github.com/DonTomato" style="width:45px">
|
||||
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
|
||||
</a>
|
||||
|
||||
<span id="nav-5"></span>
|
||||
|
||||
|
||||
@@ -389,13 +389,15 @@ func runFrontendDevCommand(cwd string, devCommand string, wg *sync.WaitGroup) fu
|
||||
if runtime.GOOS == "windows" {
|
||||
// Credit: https://stackoverflow.com/a/44551450
|
||||
// For whatever reason, killing an npm script on windows just doesn't exit properly with cancel
|
||||
kill := exec.Command("TASKKILL", "/T", "/F", "/PID", strconv.Itoa(cmd.Process.Pid))
|
||||
kill.Stderr = os.Stderr
|
||||
kill.Stdout = os.Stdout
|
||||
err := kill.Run()
|
||||
if err != nil {
|
||||
if err.Error() != "exit status 1" {
|
||||
LogRed("Error from '%s': %s", devCommand, err.Error())
|
||||
if cmd != nil && cmd.Process != nil {
|
||||
kill := exec.Command("TASKKILL", "/T", "/F", "/PID", strconv.Itoa(cmd.Process.Pid))
|
||||
kill.Stderr = os.Stderr
|
||||
kill.Stdout = os.Stdout
|
||||
err := kill.Run()
|
||||
if err != nil {
|
||||
if err.Error() != "exit status 1" {
|
||||
LogRed("Error from '%s': %s", devCommand, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -13,6 +13,7 @@ body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
||||
@@ -8,8 +8,9 @@ body {
|
||||
margin: 0;
|
||||
color: white;
|
||||
font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
sans-serif;
|
||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
sans-serif;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package internal
|
||||
|
||||
var Version = "v2.0.0-beta.14"
|
||||
var Version = "v2.0.0-beta.15"
|
||||
|
||||
@@ -30,7 +30,7 @@ func (d *Dispatcher) processSystemCall(payload callMessage, sender frontend.Fron
|
||||
return &position{x, y}, nil
|
||||
case "WindowGetSize":
|
||||
w, h := sender.WindowGetSize()
|
||||
return &position{w, h}, nil
|
||||
return &size{w, h}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown systemcall message: %s", payload.Name)
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ interface Size {
|
||||
}
|
||||
|
||||
interface RGBA {
|
||||
r,
|
||||
g,
|
||||
b,
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
a: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ const basicUpdated string = `module changeme
|
||||
|
||||
go 1.17
|
||||
|
||||
require github.com/wailsapp/wails/v2 v2.0.0-beta.14
|
||||
require github.com/wailsapp/wails/v2 v2.0.0-beta.15
|
||||
|
||||
require (
|
||||
github.com/andybalholm/brotli v1.0.2 // indirect
|
||||
@@ -330,7 +330,7 @@ const multilineRequireUpdated = `module changeme
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.14
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.15
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -381,12 +381,12 @@ func TestUpdateGoModVersion(t *testing.T) {
|
||||
want []byte
|
||||
wantErr bool
|
||||
}{
|
||||
{"basic", args{[]byte(basic), "v2.0.0-beta.14"}, []byte(basicUpdated), false},
|
||||
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.14"}, []byte(multilineRequireUpdated), false},
|
||||
{"basicmultilinereplace", args{[]byte(multilineReplace), "v2.0.0-beta.14"}, []byte(multilineReplaceUpdated), false},
|
||||
{"basicmultilinereplaceblock", args{[]byte(multilineReplaceBlock), "v2.0.0-beta.14"}, []byte(multilineReplaceBlockUpdated), false},
|
||||
{"basicmultilinereplacenoversion", args{[]byte(multilineReplaceNoVersion), "v2.0.0-beta.14"}, []byte(multilineReplaceNoVersionUpdated), false},
|
||||
{"basicmultilinereplacenoversionblock", args{[]byte(multilineReplaceNoVersionBlock), "v2.0.0-beta.14"}, []byte(multilineReplaceNoVersionBlockUpdated), false},
|
||||
{"basic", args{[]byte(basic), "v2.0.0-beta.15"}, []byte(basicUpdated), false},
|
||||
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.15"}, []byte(multilineRequireUpdated), false},
|
||||
{"basicmultilinereplace", args{[]byte(multilineReplace), "v2.0.0-beta.15"}, []byte(multilineReplaceUpdated), false},
|
||||
{"basicmultilinereplaceblock", args{[]byte(multilineReplaceBlock), "v2.0.0-beta.15"}, []byte(multilineReplaceBlockUpdated), false},
|
||||
{"basicmultilinereplacenoversion", args{[]byte(multilineReplaceNoVersion), "v2.0.0-beta.15"}, []byte(multilineReplaceNoVersionUpdated), false},
|
||||
{"basicmultilinereplacenoversionblock", args{[]byte(multilineReplaceNoVersionBlock), "v2.0.0-beta.15"}, []byte(multilineReplaceNoVersionBlockUpdated), false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
@@ -413,8 +413,8 @@ func TestGoModOutOfSync(t *testing.T) {
|
||||
want bool
|
||||
wantErr bool
|
||||
}{
|
||||
{"basic", args{[]byte(basic), "v2.0.0-beta.14"}, true, false},
|
||||
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.14"}, true, false},
|
||||
{"basic", args{[]byte(basic), "v2.0.0-beta.15"}, true, false},
|
||||
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.15"}, true, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
@@ -433,7 +433,7 @@ const multilineReplaceUpdated = `module changeme
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.14
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.15
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -468,14 +468,14 @@ require (
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect
|
||||
)
|
||||
|
||||
replace github.com/wailsapp/wails/v2 v2.0.0-beta.14 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2
|
||||
replace github.com/wailsapp/wails/v2 v2.0.0-beta.15 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2
|
||||
`
|
||||
const multilineReplaceNoVersionUpdated = `module changeme
|
||||
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.14
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.15
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -517,7 +517,7 @@ const multilineReplaceNoVersionBlockUpdated = `module changeme
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.14
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.15
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -562,7 +562,7 @@ const multilineReplaceBlockUpdated = `module changeme
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.14
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.15
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -598,6 +598,6 @@ require (
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.14 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2
|
||||
github.com/wailsapp/wails/v2 v2.0.0-beta.15 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2
|
||||
)
|
||||
`
|
||||
|
||||
@@ -520,7 +520,14 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
|
||||
}
|
||||
|
||||
// Check if there is a build command
|
||||
if b.projectData.BuildCommand == "" {
|
||||
var buildCommand string
|
||||
switch b.projectData.OutputType {
|
||||
case "dev":
|
||||
buildCommand = b.projectData.DevCommand
|
||||
default:
|
||||
buildCommand = b.projectData.BuildCommand
|
||||
}
|
||||
if buildCommand == "" {
|
||||
outputLogger.Println("No Build command. Skipping.")
|
||||
// No - ignore
|
||||
return nil
|
||||
|
||||
@@ -79,6 +79,9 @@ sidebar_position: 99
|
||||
<a href="https://github.com/questrail" style="width:50px">
|
||||
<img src="https://github.com/questrail.png?size=50" width="50"/>
|
||||
</a>
|
||||
<a href="https://github.com/DonTomato" style="width:45px">
|
||||
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
|
||||
</a>
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -62,7 +62,7 @@ import TabItem from "@theme/TabItem";
|
||||
|
||||
## Installing Wails
|
||||
|
||||
Run `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.14` to install the Wails CLI.
|
||||
Run `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.15` to install the Wails CLI.
|
||||
|
||||
## System Check
|
||||
|
||||
|
||||
11
website/docs/guides/overscroll.mdx
Normal file
11
website/docs/guides/overscroll.mdx
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
# Overscroll
|
||||
|
||||
[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes
|
||||
get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS:
|
||||
|
||||
```css
|
||||
body {
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
```
|
||||
@@ -174,9 +174,9 @@ interface Size {
|
||||
|
||||
```ts
|
||||
interface RGBA {
|
||||
r,
|
||||
g,
|
||||
b,
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
a: number;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -63,7 +63,7 @@ import TabItem from "@theme/TabItem";
|
||||
|
||||
## 安装 Wails
|
||||
|
||||
运行 `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.14` 安装 Wails CLI。
|
||||
运行 `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.15` 安装 Wails CLI。
|
||||
|
||||
## 系统检查
|
||||
|
||||
|
||||
@@ -189,9 +189,9 @@ interface Size {
|
||||
|
||||
```ts
|
||||
interface RGBA {
|
||||
r;
|
||||
g;
|
||||
b;
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
a: number;
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user