Skip to content

Commit

Permalink
Upgrading to Wails v2.0.0-rc1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
raguay committed Sep 14, 2022
1 parent c1bec86 commit cba7598
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 36 deletions.
18 changes: 9 additions & 9 deletions frontend/public/bundle.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/public/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/public/bundle.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion frontend/src/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
</script>

<svelte:window on:keydown={keyDownProcessor} />
<div id="dragbar" data-wails-drag />
<div id="dragbar" />

{#if $state === "emailit"}
<EmailIt />
Expand Down Expand Up @@ -239,5 +239,6 @@
#dragbar {
height: 30px;
width: 100%;
--wails-draggable: drag;
}
</style>
20 changes: 10 additions & 10 deletions frontend/wailsjs/go/main/App.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {main} from '../models';

export function AppendPath(arg1:string,arg2:string):Promise<string>;

export function CopyEntries(arg1:string,arg2:string):void;
export function CopyEntries(arg1:string,arg2:string):Promise<void>;

export function DeleteEntries(arg1:string):void;
export function DeleteEntries(arg1:string):Promise<void>;

export function DirExists(arg1:string):Promise<boolean>;

Expand All @@ -26,26 +26,26 @@ export function GetOSName():Promise<string>;

export function Getwd():Promise<string>;

export function MakeDir(arg1:string):void;
export function MakeDir(arg1:string):Promise<void>;

export function MakeFile(arg1:string):void;
export function MakeFile(arg1:string):Promise<void>;

export function MoveEntries(arg1:string,arg2:string):void;
export function MoveEntries(arg1:string,arg2:string):Promise<void>;

export function Quit():void;
export function Quit():Promise<void>;

export function ReadDir(arg1:string):Promise<Array<main.FileInfo>>;

export function ReadFile(arg1:string):Promise<string>;

export function RenameEntry(arg1:string,arg2:string):void;
export function RenameEntry(arg1:string,arg2:string):Promise<void>;

export function RunCommandLine(arg1:string,arg2:Array<string>,arg3:Array<string>,arg4:string):Promise<string>;

export function SetClip(arg1:string):void;
export function SetClip(arg1:string):Promise<void>;

export function SplitFile(arg1:string):Promise<main.FileParts>;

export function SystemOpenFile(arg1:string):void;
export function SystemOpenFile(arg1:string):Promise<void>;

export function WriteFile(arg1:string,arg2:string):void;
export function WriteFile(arg1:string,arg2:string):Promise<void>;
18 changes: 17 additions & 1 deletion frontend/wailsjs/runtime/runtime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function EventsOnce(eventName: string, callback: (...data: any) => void):

// [EventsOff](https://wails.io/docs/reference/runtime/events#eventsff)
// unregisters the listener for the given event name.
export function EventsOff(eventName: string): void;
export function EventsOff(eventName: string, ...additionalEventNames: string[]): void;

// [LogPrint](https://wails.io/docs/reference/runtime/log#logprint)
// logs the given message as a raw message
Expand Down Expand Up @@ -120,6 +120,10 @@ export function WindowFullscreen(): void;
// Restores the previous window dimensions and position prior to full screen.
export function WindowUnfullscreen(): void;

// [WindowIsFullscreen](https://wails.io/docs/reference/runtime/window#windowisfullscreen)
// Returns the state of the window, i.e. whether the window is in full screen mode or not.
export function WindowIsFullscreen(): Promise<boolean>;

// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize)
// Sets the width and height of the window.
export function WindowSetSize(width: number, height: number): Promise<Size>;
Expand Down Expand Up @@ -166,6 +170,10 @@ export function WindowToggleMaximise(): void;
// Restores the window to the dimensions and position prior to maximising.
export function WindowUnmaximise(): void;

// [WindowIsMaximised](https://wails.io/docs/reference/runtime/window#windowismaximised)
// Returns the state of the window, i.e. whether the window is maximised or not.
export function WindowIsMaximised(): Promise<boolean>;

// [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise)
// Minimises the window.
export function WindowMinimise(): void;
Expand All @@ -174,6 +182,14 @@ export function WindowMinimise(): void;
// Restores the window to the dimensions and position prior to minimising.
export function WindowUnminimise(): void;

// [WindowIsMinimised](https://wails.io/docs/reference/runtime/window#windowisminimised)
// Returns the state of the window, i.e. whether the window is minimised or not.
export function WindowIsMinimised(): Promise<boolean>;

// [WindowIsNormal](https://wails.io/docs/reference/runtime/window#windowisnormal)
// Returns the state of the window, i.e. whether the window is normal or not.
export function WindowIsNormal(): Promise<boolean>;

// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
Expand Down
20 changes: 18 additions & 2 deletions frontend/wailsjs/runtime/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export function EventsOn(eventName, callback) {
EventsOnMultiple(eventName, callback, -1);
}

export function EventsOff(eventName) {
return window.runtime.EventsOff(eventName);
export function EventsOff(eventName, ...additionalEventNames) {
return window.runtime.EventsOff(eventName, ...additionalEventNames);
}

export function EventsOnce(eventName, callback) {
Expand Down Expand Up @@ -93,6 +93,10 @@ export function WindowUnfullscreen() {
window.runtime.WindowUnfullscreen();
}

export function WindowIsFullscreen() {
return window.runtime.WindowIsFullscreen();
}

export function WindowGetSize() {
return window.runtime.WindowGetSize();
}
Expand Down Expand Up @@ -137,6 +141,10 @@ export function WindowUnmaximise() {
window.runtime.WindowUnmaximise();
}

export function WindowIsMaximised() {
return window.runtime.WindowIsMaximised();
}

export function WindowMinimise() {
window.runtime.WindowMinimise();
}
Expand All @@ -153,6 +161,14 @@ export function ScreenGetAll() {
return window.runtime.ScreenGetAll();
}

export function WindowIsMinimised() {
return window.runtime.WindowIsMinimised();
}

export function WindowIsNormal() {
return window.runtime.WindowIsNormal();
}

export function BrowserOpenURL(url) {
window.runtime.BrowserOpenURL(url);
}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/atotto/clipboard v0.1.4
github.com/otiai10/copy v1.7.0
github.com/wailsapp/wails/v2 v2.0.0-beta.43
github.com/wailsapp/wails/v2 v2.0.0-rc.1.1
)

require (
Expand All @@ -27,9 +27,9 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/text v0.3.7 // indirect
)

Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ=
github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
Expand All @@ -55,10 +55,10 @@ github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails/v2 v2.0.0-beta.43 h1:k3XGylH7GYuMSFXPuCEtBbJIVIVHfcTdoXH1sR5u6LA=
github.com/wailsapp/wails/v2 v2.0.0-beta.43/go.mod h1:GplgLNVum9fEKu7Y4nq289pxHs7Htbp/UG7uhPr5zD0=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
github.com/wailsapp/wails/v2 v2.0.0-rc.1.1 h1:oanYrSVD/0ONXOEI4BHUctSYf3Di/bbE8U9oJtwXmKM=
github.com/wailsapp/wails/v2 v2.0.0-rc.1.1/go.mod h1:z3os4dBFCOmPhFHjjEKY4KygTVFKAGECkS9/mKm1wEU=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
Expand All @@ -70,8 +70,8 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
Expand All @@ -81,5 +81,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func main() {
OnStartup: app.startup,
OnDomReady: app.domReady,
OnShutdown: app.shutdown,
CSSDragProperty: "--wails-draggable",
CSSDragValue: "drag",
Bind: []interface{}{
app,
},
Expand Down

0 comments on commit cba7598

Please sign in to comment.