File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 421421 );
422422 } catch {}
423423 })();
424-
425- // Wails native file drop handler
426- (async () => {
427- try {
428- const {OnFileDrop} = await import (' ../wailsjs/runtime/runtime' );
429- OnFileDrop (async (x : number , y : number , paths : string []) => {
430- try {
431- const {HandleDroppedFiles} = await import (
432- ' ../wailsjs/go/main/App'
433- );
434- const path = await HandleDroppedFiles (paths );
435- if (path ) {
436- setWallpaperPath (path );
437- setActiveTab (' editor' );
438- showToast (
439- ' Wallpaper selected — click Extract to generate palette'
440- );
441- }
442- } catch (e : any ) {
443- showToast (
444- ' Drop failed: ' + (e ?.message || ' unknown error' )
445- );
446- }
447- }, true );
448- } catch {}
449- })();
450424 });
451425 </script >
452426
Original file line number Diff line number Diff line change @@ -139,8 +139,8 @@ func main() {
139139 BackgroundColour : bgColour ,
140140 OnStartup : app .startup ,
141141 DragAndDrop : & options.DragAndDrop {
142- EnableFileDrop : true ,
143- DisableWebViewDrop : false ,
142+ EnableFileDrop : false ,
143+ DisableWebViewDrop : true ,
144144 },
145145 Bind : []interface {}{
146146 app ,
You can’t perform that action at this time.
0 commit comments