* Feature/1090 native drag and drop for file and folder (#3203)
* implement basic dnd for linux
* implemented windows
* progress changed linux handling and added coordinates to drop
* progress fix drop coordinates on windows
* progress remove log from windows
* progress move js
* update js after merge
* fix event listener registration
* fix segfault on non file drag
* remove logs, fix coordinates
* minor changes, simplify to drop only
* rename EnableWails -> EnableFileDrop
* add documentation (PR id missing)
* add PR id to changelog
* fix remove casting from malloc
* fix nil check for OnFileDrop's callback
* fix nil check for OnFileDrop skip event when nil
* add error message for nil callback in OnFileDrop
---------
Co-authored-by: lyimmi <lelvente.zambo@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* implement native drag and drop for macOS (#3250)
* implement native drag and drop for macOS
* update docs
* add to changelog
* update docs (macOS is supported)
* Fix windows DragAndDrop options
* Fix class unset on dragleave for full frame elements
* improve class unset (nested elements and borders case)
* Fix runtime drop target detection and CSS class assignment
* Edit changelog
* Fix drag-and-drop options in references
* Update v2/internal/frontend/desktop/darwin/WailsWebView.m
* Update v2/internal/frontend/desktop/darwin/WailsWebView.m
---------
Co-authored-by: Zámbó, Levente <levente.zambo@gmail.com>
Co-authored-by: lyimmi <lelvente.zambo@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Andrey Pshenkin <andrey.pshenkin@gmail.com>
Co-authored-by: Pavel Binar <pavel@beamtransfer.io>
To reproduce:
- Use Windows
- Set your default browser to Firefox (Settings -> Apps -> Default Apps -> Web Browser)
- Rename your firefox.exe to something.else
The BrowserOpenURL before this commit silently fails.
The BrowserOpenURL after this commit tries to use a hardcoded fallback browser.
If successful, a warning message is logged.
If unsuccessful (default browser and fallback browsers fail), an error message is logged.
Co-authored-by: Sean <sean@malonetuning.com>
* Add disable zoom on mac
* Add changelog line
* Add zommable in main.m
I see this file is ignore, but i think it's better to keep it up-to-date so if we ever unignore it will work correctly.
* Add better macos guard for elementFullscreenEnabled
* Disable go linters as they constantly error
* Run full check on bugfix branches
* Update to Go 1.20+1.21
* Update github.com/tc-hib/winres to v0.2.1
* Update setup-go to v4
* Try fix for Go 1.20
* Fix go.mod
* Update go sum
* Revert to builds on Go 1.18 + 1.19
* Update Go version to 1.19 for all workflows and modules
The Go version is updated to 1.19 across all GitHub Actions workflows and go.mod files. All builds and tests will now only run on Go 1.19, simplifying our build matrix, and ensuring we're testing on the latest stable Go version.
* Update build-and-test workflow for MacOS version and Go version
The build-and-test workflow has been updated to run tests on 'macos-11' in addition to 'macos-latest'. Furthermore, Go version for the tests has been set to '1.19' only.
* Update actions versions
* Move to go 1.20 and improve caching
* Move to go 1.20 and improve caching
* Add additional guards
* implement MacOS openFile/openFiles events
* wip: windows file association
* fix macro import
* add file icon copy
* try copy icon
* keep only required part of scripts
* update config schema
* fix json
* set fileAssociation for mac via config
* proper iconName handling
* add fileAssociation icon generator
* fix file association icons bundle
* don't break compatibility
* remove mimeType as not supported linux for now
* add documentation
* adjust config schema
* restore formatting
* try implement single instance lock with params passing
* fix focusing
* fix focusing
* formatting
* use channel buffer for second instance events
* handle errors
* add comment
* remove unused option in file association
* wip: linux single instance lock
* wip: linux single instance
* some experiments with making window active
* try to use unminimise
* remove unused
* try present for window
* try present for window
* fix build
* cleanup
* cleanup
* implement single instance lock on mac os
* implement proper show for windows
* proper unmimimise
* get rid of openFiles mac os. change configuration structure
* remove unused channel
* remove unused function
* add documentation for single instance lock
* add PR link
* wip mac os deeplinks
* put custom url listner on top to catch link on app opening
* put custom url listner on top to catch link on app opening
* try add custom url windows
* adjust custom url
* add docs
* merge master
* update documentation
* add comment for darwin
* add PR link
* change naming
* change naming
* change naming
* change naming
* fix formatting
* fix naming
* Fix typo
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* implement MacOS openFile/openFiles events
* wip: windows file association
* fix macro import
* add file icon copy
* try copy icon
* keep only required part of scripts
* update config schema
* fix json
* set fileAssociation for mac via config
* proper iconName handling
* add fileAssociation icon generator
* fix file association icons bundle
* don't break compatibility
* remove mimeType as not supported linux for now
* add documentation
* adjust config schema
* restore formatting
* try implement single instance lock with params passing
* fix focusing
* fix focusing
* formatting
* use channel buffer for second instance events
* handle errors
* add comment
* remove unused option in file association
* wip: linux single instance lock
* wip: linux single instance
* some experiments with making window active
* try to use unminimise
* remove unused
* try present for window
* try present for window
* fix build
* cleanup
* cleanup
* implement single instance lock on mac os
* implement proper show for windows
* proper unmimimise
* get rid of openFiles mac os. change configuration structure
* remove unused channel
* remove unused function
* add documentation for single instance lock
* add PR link
* changes after review
* update docs
* changes after review
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* [assetserver, darwin] Fix copying request headers by using strdup
* [assetserver, linux] Fake some basic http headers for legacy webkit2 versions to support proxying requests to other servers
This fixes the devserver on v2 for newer vite versions that use the custom
scheme.
* [v2, windows] 304 responses are going to hang the WebView2 so prevent them by removing cache related headers in the request.
* [v2, dev] Now uses the custom schemes `wails://` on macOS and Linux for all Vite versions.
Prevent missing reload after fast multiple savings on Linux and Windows.
* [v2, darwin] Add "Hide, Hide Others, Show All“ to appmenu
This also includes shortcuts support for those commands.
Arrange the menu items in the well known MacOS order.
* [v2, darwin] Add Window menu with well known shortcuts Minimize, Full-Screen and Zoom.
* Use json.Marshal instead of strconv.Quote to correctly support unicode
* Add fix to changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This will show a message on the console
"+[CATransaction synchronize] called within transaction"
but there's seem no way to mitigate that. Still everything
works as expected.
* [assetserver] Add support for HTTP Middlewares
* [dev] Disable frontend DevServer if no Assets has been defined and inform user
* [dev] Consistent WebSocket behaviour in dev and prod mode for assets handler and middleware
In prod mode we can't support WebSockets so make sure the
assets handler and middleware never see WebSockets in dev mode.
* [templates] Migrate to new AssetServer option
* [docs] Add assetserver.Options to the reference
* Add WindowExecJS
* [devserver] Embed the base frontend into the DevServer struct
* Update docs
Co-authored-by: stffabi <stffabi@users.noreply.github.com>