* webkitgtk4.0->webkitgtk4.1
changelog
* Update mkdocs-website/docs/en/changelog.md
* Update deps in pipeline
* Update deps in pipeline
* Install 4.1 only when v3
* Install 4.1 only when v3
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Add `port` flag to dev command, ...
Add support for environment variable WAILS_VITE_PORT
* Check if port is already in use
* Update changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Unmarshal arguments to appropriate type in binding calls
* Marshal multiple return values to arrays in binding calls
* Improve logging of remote method calls
* Add tests for `BoundMethod.Call`
* Fix return value if error is nil
* Update changelog
---------
Co-authored-by: Andreas Bichinger <andreas.bichinger@gmail.com>
* allow for non-Window WailsEvent listeners
- adds a RegisterListener function on the App struct such
that code can listen for WailsEvent(s) even if it isn't a Window
- rename dispatchEventToWindows -> dispatchEventToListeners
- add all windows and WailsEventListeners to slice before emitting
* Update v3/pkg/application/application.go
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Fix: #3270
removes an unnessecary check which returned a double nil wich in turned causes a crash if systray doesn't have an attached window.
* Add iconIsInFlyout method to systray_windows
and use it to determine if the icon is in the
flyout or not when positioning an attached window.
* optimize the windows systray window positioning
we only need to get the systray bounds if
the icon is in the flyout area.
* Use correct behavior for placing the window
if the systray icon is visible in the taskbar the
window should be centered on the systray icon
otherwise the icon is in a flyout are and the
window should be placed in the corner.
Added comments to explain placement logic
* consistent placing of systray menu on right vs left click
* add PR info in changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Fix appimage file sourcing
Add findGTKFiles to source webkit files for appimage generation
s
* Update refresh version to fix CPU usage
s
* update changelong
* refresh version up
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Fix appimage file sourcing
Add findGTKFiles to source webkit files for appimage generation
s
* Update refresh version to fix CPU usage
s
* update changelong
`linux` suffix means it won't compile on non-Linux platforms.
Shorten the name to avoid:
../../pkg/application/options_webview_window.go:104:8: undefined: LinuxWindow
../../pkg/application/options_application.go:28:8: undefined: LinuxOptions
../../pkg/application/options_webview_window.go:104:8: undefined: LinuxWindow
* Fix computing 'startURL' when 'FRONTEND_DEVSERVER_URL' is present.
* Respect provided URL when computing 'startURL' and 'FRONTEND_DEVSERVER_URL' is present.
* Update changelog.
* Correctly produce absolute URI in 'GetStartURL' when input is provided.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
* Add option for showing the toolbar in fullscreen mode on macOS
* Add an example demonstrating the ShowToolbarWhenFullscreen option
* Update docs
* Add changelog entry
* Run go mod tidy
* Add JS Window API example
* Add ToggleMaximise button to Window API example
* Restore ToggleMaximise method in Window interface
* Update docs and changelog
Three new options have been introduced in the application options for MacOS to disable the minimize, maximize, and close buttons on the window. Corresponding functionality has been added in the webview window for darwin to handle these new options. These changes have been showcased in the window example main.go file.
This commit introduces the functionality to disable the minimise and maximise buttons on windows. These options have been added to the `application.WebviewWindowOptions` and integrated in the Windows application logic. Effectively, developers can now control the availability of these buttons in their windows applications.
This update adds implementation to several menu item functions, replacing their previous 'not implemented' state. This includes actions for close, reload, forcing reload, toggling of fullscreen, reset zoom, and others. The update also includes modifications for the handling of developer tools toggle under different build configurations. This refactoring is aimed to standardize devtools configuration across different operating systems.
* Fix systray click handling
* Open Menu if no window is attached in defaultClickHandler()
* Remove systemTraySetMenu function
* Fix a crash in hide-window example
* Update changelog
The code update sets the default extension to the first pattern in the save dialog file filter when options.Filters is populated. This improvement applies to Windows platform interface function for 'Save File Dialog' and provides a more intuitive user experience.
This update allows the application shutdown to be cancelled. It implements the shouldQuit function, which can prevent the application from quitting if it returns false. Additional checks have been added to ensure cleanup and quit processes are performed only if required. The darwin delegate and linux and windows applications were modified to include this new functionality.
2024-01-17 20:45:30 +11:00
533 changed files with 18824 additions and 22484 deletions
Mae'r API cais yn cynorthwyo i greu cais gan ddefnyddio fframwaith Wails.
### Newydd
API: `New(appOptions Options) *App`
`New(appOptions Options)` yn creu cais newydd gan ddefnyddio'r opsiynau cais a ddarperir. Mae'n cymhwyso gwerthoedd rhagosodedig ar gyfer opsiynau heb eu pennu, yn eu cyfuno â'r rhai a ddarparwyd, yn eu cychwyn a'n dychwelyd enghraifft o'r cais.
Os bydd gwall yn ystod y cychwyn, caiff y cais ei atal gyda'r neges gwall a ddarperir.
Dylid nodi, os oes enghraifft gyffredinol o gais yn bodoli eisoes, y bydd yr enghraifft honno'n cael ei dychwelyd yn hytrach na chreu un newydd.
`Get()` yn dychwelyd yr enghraifft gyffredinol o'r cais. Mae'n ddefnyddiol pan fydd angen mynediad i'r cais o wahanol rannau o'ch cod.
```go
// Cael enghraifft o'r cais
app := application.Get()
```
### Galluoedd
API: `Capabilities() capabilities.Capabilities`
`Capabilities()` yn adfer map o'r galluoedd sydd gan y cais ar hyn o bryd. Gall y galluoedd fod ynghylch y nodweddion gwahanol y system weithredu sy'n darparu, fel nodweddion gweddarlunydd.
```go
// Cael galluoedd y cais
capabilities := app.Capabilities()
if capabilities.HasNativeDrag {
// Gwneud rhywbeth
}
```
### GetPID
API: `GetPID() int`
`GetPID()` yn dychwelyd ID y Broses y cais.
```go
pid := app.GetPID()
```
### Rhedeg
API: `Run() error`
`Run()` yn dechrau gweithredu'r cais a'i gydrannau.
```go
app := application.New(application.Options{
//options
})
// Rhedeg y cais
err := application.Run()
if err != nil {
// Ymdrin â'r gwall
}
```
### Gadael
API: `Quit()`
`Quit()` yn gadael y cais trwy ddinistrio ffenestri a rhai cydrannau eraill o bosibl.
```go
// Gadael y cais
app.Quit()
```
### AydunDdyryslyd
API: `IsDarkMode() bool`
`IsDarkMode()` yn gwirio a yw'r cais yn rhedeg mewn modd tywyll. Mae'n dychwelyd gwerth boolean yn nodi a yw'r modd tywyll wedi'i alluogi.
Mae `Ar()` yn cofrestru gwrandäwr digwyddiad ar gyfer digwyddiadau cymhwysiad penodol. Bydd y swyddogaeth atebydd a ddarperir yn cael ei sbarduno pan fydd y digwyddiad cysylltiedig yn digwydd. Mae'r swyddogaeth yn dychwelyd swyddogaeth y gellir ei galw i dynnu'r gwrandäwr.
Mae `CofrestruArgraffwyr()` yn cofrestru atebydd i'w redeg fel crocen yn ystod digwyddiadau penodol. Caiff y crocenau hyn eu rhedeg cyn gwrandawyr sy'n gysylltiedig ag `Ar()`. Mae'r swyddogaeth yn dychwelyd swyddogaeth y gellir ei galw i dynnu'r bâs.
API: `RegisterContextMenu(name string, menu *Menu)`
Mae `RegisterContextMenu()` yn cofrestru dewislen cyd-destun gyda enw penodol. Gellir defnyddio'r dewislen hon yn ddiweddarach yn yr ap.
```go
// Creu dewislen newydd
ctxmenu:=app.NewMenu()
// Cofrestru'r dewislen fel dewislen cyd-destun
app.RegisterContextMenu("MyContextMenu",ctxmenu)
```
### SetMenu
API: `SetMenu(menu *Menu)`
Mae `SetMenu()` yn gosod y ddewislen ar gyfer yr ap. Ar Mac, bydd hyn yn fod y ddewislen fyd-eang. Ar gyfer Windows a Linux, bydd hyn yn fod y ddewislen ddiofyn ar gyfer unrhyw ffenestr newydd a grëir.
Mae `GetPrimaryScreen()` yn dychwelyd y sgrin brif y system.
### GetScreens
API: `GetScreens() ([]*Sgrin, error)`
Mae `GetScreens()` yn dychwelyd gwybodaeth am bob sgrin sydd wedi'i chysylltu â'r system.
Dyma grynodeb byr o'r dulliau allforio yn y `App` strwythur a ddarparwyd. Cofiwch, ar gyfer mwy o swyddogaethau neu ystyriaethau manwl, cyfeiriwch at y cod Go gwirioneddol neu ddogfennaeth fewnol bellach.
Mae `NewWebviewWindowWithOptions()` yn creu ffenestr webview newydd gydag opsiynau custom. Caiff y ffenestr newydd ei ychwanegu at fap o ffenestri a reolir gan y cymhwysiad.
```go
// Creu ffenestr webview newydd gydag opsiynau custom
Mae'r dull `WindowDebounce` yn gosod amser diddymu. Yng nghyd-destun Windows, defnyddir hyn i bennu faint o amser i aros cyn ymateb i ddigwyddiad clic llygoden i fyny ar yr eicon hysbysu.
### OpenMenu
API: `OpenMenu()`
Mae'r dull `OpenMenu` yn agor y ddewislen sy'n gysylltiedig â'r ardal hysbysu system.
Bydd pob newid sylweddol i'r prosiect hwn yn cael ei ddogfennu yn y ffeil hon.
Mae'r fformat yn seiliedig ar [Cadw Croniclau](https://keepachangelog.com/en/1.0.0/),
ac mae'r prosiect hwn yn cydymffurfio â [Fersiwneiddio Semantig](https://semver.org/spec/v2.0.0.html).
-`Ychwanegwyd` ar gyfer nodweddion newydd.
-`Newidiwyd` ar gyfer newidiadau mewn swyddogaeth bresennol.
-`Wedi Dibrisio` ar gyfer nodweddion a fydd yn cael eu dileu yn fuan.
-`Tynnwyd` ar gyfer nodweddion a gafodd eu tynnu yn awr.
-`Wedi Trwsio` ar gyfer unrhyw ddatrysiadau grwydro.
-`Diogelwch` os oes agoreiddiadau diamddiffyn.
-->
## [Heb ei ryddhau]
### Ychwanegwyd
- [darwin] ychwanegu Digwyddiad ApplicationShouldHandleReopen i fedru ymdrin â chlicio ar yr eicon doc gan @5aaee9 yn [#2991](https://github.com/wailsapp/wails/pull/2991)
- [darwin] ychwanegu getPrimaryScreen/getScreens i impl gan @tmclane yn [#2618](https://github.com/wailsapp/wails/pull/2618)
- [darwin] ychwanegu opsiwn ar gyfer dangos y bar offer mewn modd sgrin llawn ar macOS gan [@fbbdev](https://github.com/fbbdev) yn [#3282](https://github.com/wailsapp/wails/pull/3282)
- [linux] ychwanegu rhesymeg onKeyPress i drosi allwedd linux i gyflymydd gan @[Atterpac](https://github.com/Atterpac) yn [#3022](https://github.com/wailsapp/wails/pull/3022])
- [linux] ychwanegu tasg `rhedeg:linux` gan [@marcus-crane](https://github.com/marcus-crane) yn [#3146](https://github.com/wailsapp/wails/pull/3146)
- allforio dull `SetIcon` gan @almas1992 yn [PR](https://github.com/wailsapp/wails/pull/3147)
- Gwella `OnShutdown` gan @almas1992 yn [PR](https://github.com/wailsapp/wails/pull/3189)
- adfer dull `ToggleMaximise` yn y rhyngwyneb `Window` gan [@fbbdev](https://github.com/fbbdev) yn [#3281](https://github.com/wailsapp/wails/pull/3281)
### Wedi Trwsio
- Wedi trwsio prosesau zombie wrth weithio mewn modd datblygu drwy ddiweddaru i'r diweddaraf gan [Atterpac](https://github.com/atterpac) yn [#3320](https://github.com/wailsapp/wails/pull/3320).
- Wedi trwsio ffynhonnell ffeil webkit appimage gan [Atterpac](https://github.com/atterpac) yn [#3306](https://github.com/wailsapp/wails/pull/3306).
- Wedi trwsio Doctor fygythiad pecyn apt gan [Atterpac](https://github.com/Atterpac) yn [#2972](https://github.com/wailsapp/wails/pull/2972).
- Wedi trwsio'r cais wedi rhewi wrth ddod allan (Darwin) gan @5aaee9 yn [#2982](https://github.com/wailsapp/wails/pull/2982)
- Wedi trwsio lliwiau cefndir yr enghreifftiau ar Windows gan [mmgvh](https://github.com/mmghv) yn [#2750](https://github.com/wailsapp/wails/pull/2750).
- Wedi trwsio dewislenni cyd-destun rhagosodedig gan [mmgvh](https://github.com/mmghv) yn [#2753](https://github.com/wailsapp/wails/pull/2753).
- Wedi trwsio gwerth hecsadegol ar gyfer bysellau saeth ar Darwin gan [jaybeecave](https://github.com/jaybeecave) yn [#3052](https://github.com/wailsapp/wails/pull/3052).
- Gosod llusgo-a-gollwng ar gyfer Windows i weithio. Ychwanegwyd gan [@pylotlight](https://github.com/pylotlight) yn [PR](https://github.com/wailsapp/wails/pull/3039)
- Wedi trwsio bygiau ar gyfer linux yn y meddyg os nad oes gan y defnyddiwr y gyrwyr priodol wedi'u gosod. Ychwanegwyd gan [@pylotlight](https://github.com/pylotlight) yn [PR](https://github.com/wailsapp/wails/pull/3032)
- Trwsio graddio dpi wrth gychwyn (windows). Newidiwyd gan @almas1992 yn [PR](https://github.com/wailsapp/wails/pull/3145)
- Trwsio'r llinell amnewid yn `go.mod` i ddefnyddio llwybrau cymharol - Trwsio llwybrau Windows gyda gofodau gan @leaanthony.
- Trwsio gweithredu clicio Maclanwad system wrth ddim cysylltiedig â ffenestr gan [thomas-senechal](https://github.com/thomas-senechal) yn PR [#3207](https://github.com/wailsapp/wails/pull/3207)
- Trwsio adeiladu Windows yn methu oherwydd opsiwn anhysbys gan [thomas-senechal](https://github.com/thomas-senechal) yn PR [#3208](https://github.com/wailsapp/wails/pull/3208)
- Trwsio URL sylfaenol anghywir wrth agor ffenestr ddwywaith gan @5aaee9 yn PR [#3273](https://github.com/wailsapp/wails/pull/3273)
- Trwsio trefn brigiau os yn y dull `WebviewWindow.Restore` gan [@fbbdev](https://github.com/fbbdev) yn [#3279](https://github.com/wailsapp/wails/pull/3279)
- Cyfrifo `startURL` yn gywir ar draws galwadau lluosog `GetStartURL` pan fo `FRONTEND_DEVSERVER_URL` yn bresennol. [#3299](https://github.com/wailsapp/wails/pull/3299)
Darperir hwn dim ond fel dull cyfleustra ar gyfer datblygu. Ni chyngherir i'w ddefnyddio mewn cynhyrchiad.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.