diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba67659..380d0c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: uses: AnimMouse/setup-restic@v1 - name: Setup Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.44.2 + run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.1.0 - name: Checkout uses: actions/checkout@v3 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 8c723ef..1d8010a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,6 +1,6 @@ { "name": "restic-frontend", - "version": "0.2.0", + "version": "0.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/frontend/package.json b/frontend/package.json index 9a42b89..646739e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "restic-frontend", "private": true, - "version": "0.2.0", + "version": "0.2.4", "main": "dist/app.es.js", "exports": { ".": "./dist/app.es.js" diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 01c30fc..e238ab4 100644 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -5dbecd1742e8b6751a66c0dd143afccd \ No newline at end of file +d6b1731f280af2e34c2ad0d23b8b5c05 \ No newline at end of file diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts index 55bfce1..56492a4 100644 --- a/frontend/wailsjs/go/models.ts +++ b/frontend/wailsjs/go/models.ts @@ -1,5 +1,19 @@ export namespace restic { + export class EnvValue { + name: string; + value: string; + + static createFrom(source: any = {}) { + return new EnvValue(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.name = source["name"]; + this.value = source["value"]; + } + } export class File { name: string; type: string; @@ -30,44 +44,6 @@ export namespace restic { this.ctime = source["ctime"]; } } - export class Snapshot { - id: string; - short_id: string; - time: string; - paths: string[]; - tags: string[]; - hostname: string; - username: string; - - static createFrom(source: any = {}) { - return new Snapshot(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.id = source["id"]; - this.short_id = source["short_id"]; - this.time = source["time"]; - this.paths = source["paths"]; - this.tags = source["tags"]; - this.hostname = source["hostname"]; - this.username = source["username"]; - } - } - export class EnvValue { - name: string; - value: string; - - static createFrom(source: any = {}) { - return new EnvValue(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.value = source["value"]; - } - } export class Location { prefix: string; path: string; @@ -104,6 +80,30 @@ export namespace restic { return a; } } + export class Snapshot { + id: string; + short_id: string; + time: string; + paths: string[]; + tags: string[]; + hostname: string; + username: string; + + static createFrom(source: any = {}) { + return new Snapshot(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.id = source["id"]; + this.short_id = source["short_id"]; + this.time = source["time"]; + this.paths = source["paths"]; + this.tags = source["tags"]; + this.hostname = source["hostname"]; + this.username = source["username"]; + } + } } diff --git a/frontend/wailsjs/runtime/runtime.d.ts b/frontend/wailsjs/runtime/runtime.d.ts index dd8bddb..df148ea 100644 --- a/frontend/wailsjs/runtime/runtime.d.ts +++ b/frontend/wailsjs/runtime/runtime.d.ts @@ -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 @@ -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; + // [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; @@ -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; + // [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise) // Minimises the window. export function WindowMinimise(): void; @@ -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; + +// [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; + // [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; diff --git a/frontend/wailsjs/runtime/runtime.js b/frontend/wailsjs/runtime/runtime.js index 26dbb22..d614998 100644 --- a/frontend/wailsjs/runtime/runtime.js +++ b/frontend/wailsjs/runtime/runtime.js @@ -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) { @@ -93,6 +93,10 @@ export function WindowUnfullscreen() { window.runtime.WindowUnfullscreen(); } +export function WindowIsFullscreen() { + return window.runtime.WindowIsFullscreen(); +} + export function WindowGetSize() { return window.runtime.WindowGetSize(); } @@ -137,6 +141,10 @@ export function WindowUnmaximise() { window.runtime.WindowUnmaximise(); } +export function WindowIsMaximised() { + return window.runtime.WindowIsMaximised(); +} + export function WindowMinimise() { window.runtime.WindowMinimise(); } @@ -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); } diff --git a/go.mod b/go.mod index 9052982..a64b147 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module restic-browser -go 1.17 +go 1.18 require ( github.com/leaanthony/sail v0.3.0 github.com/pkg/errors v0.9.1 - github.com/wailsapp/wails/v2 v2.0.0-beta.44.2 + github.com/wailsapp/wails/v2 v2.1.0 golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 golang.org/x/text v0.3.7 ) @@ -16,7 +16,7 @@ require ( github.com/google/uuid v1.1.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect - github.com/labstack/echo/v4 v4.7.2 // indirect + github.com/labstack/echo/v4 v4.9.0 // indirect github.com/labstack/gommon v0.3.1 // indirect github.com/leaanthony/go-ansi-parser v1.0.1 // indirect github.com/leaanthony/gosod v1.0.3 // indirect @@ -28,6 +28,6 @@ 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/net v0.0.0-20211015210444-4f30a5c0130f // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect ) diff --git a/go.sum b/go.sum index 0fcefc8..0fb6ca8 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,8 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= -github.com/labstack/echo/v4 v4.7.2 h1:Kv2/p8OaQ+M6Ex4eGimg9b9e6icoxA42JSlOR3msKtI= -github.com/labstack/echo/v4 v4.7.2/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= +github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY= +github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o= github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc= @@ -38,8 +38,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= @@ -48,13 +48,13 @@ 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.44.2 h1:fnOjRIan7rZLq6UGeBItBa4dBuUXcyTObh5VNZL3StM= -github.com/wailsapp/wails/v2 v2.0.0-beta.44.2/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.1.0 h1:OJxPu/4vQxSwAjVVpSNiMVGyYyInpm0UtlDUgVxpaSo= +github.com/wailsapp/wails/v2 v2.1.0/go.mod h1:zdc9YVrIijjuNNkLOO3UpTU6M12TJe6TlriL+3ttlMM= +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= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -74,5 +74,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= diff --git a/wails.json b/wails.json index 4a065b1..8c009ed 100644 --- a/wails.json +++ b/wails.json @@ -12,7 +12,7 @@ "info": { "productName": "Restic-Browser", "companyName": "The Restic-Browser Team", - "productVersion": "0.2.3", + "productVersion": "0.2.4", "copyright": "See https://github.com/emuell/restic-browser", "description": "Restic Backup Browser GUI", "comments": "Built using Wails: https://wails.io"