From c71b8468df0f37337993102ac8470a1fce88cfe2 Mon Sep 17 00:00:00 2001 From: haex Date: Mon, 3 Nov 2025 02:03:34 +0100 Subject: [PATCH] Fix workspace background feature for Android - Add missing filesystem permissions in capabilities - fs:allow-applocaldata-read-recursive - fs:allow-applocaldata-write-recursive - fs:allow-write-file - fs:allow-mkdir - fs:allow-exists - fs:allow-remove - Fix Android photo picker URI handling - Detect file type from binary signature (PNG, JPEG, WebP) - Use manual path construction to avoid path joining issues - Works with Android photo picker content:// URIs - Improve error handling with detailed toast messages - Show specific error at each step (read, mkdir, write, db) - Better debugging on Android where console is unavailable - Fix window activation behavior - Restore minimized windows when activated - Remove unused imports in launcher component --- src-tauri/capabilities/default.json | 6 + src-tauri/gen/schemas/capabilities.json | 2 +- src/components/haex/extension/launcher.vue | 1 - src/components/haex/system/settings.vue | 134 +++++++++++++++++---- src/stores/desktop/windowManager.ts | 1 + 5 files changed, 118 insertions(+), 26 deletions(-) diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 235bb55..a96e6d8 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -18,8 +18,14 @@ "fs:allow-appconfig-write-recursive", "fs:allow-appdata-read-recursive", "fs:allow-appdata-write-recursive", + "fs:allow-applocaldata-read-recursive", + "fs:allow-applocaldata-write-recursive", "fs:allow-read-file", + "fs:allow-write-file", "fs:allow-read-dir", + "fs:allow-mkdir", + "fs:allow-exists", + "fs:allow-remove", "fs:allow-resource-read-recursive", "fs:allow-resource-write-recursive", "fs:allow-download-read-recursive", diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json index e359516..8e86d50 100644 --- a/src-tauri/gen/schemas/capabilities.json +++ b/src-tauri/gen/schemas/capabilities.json @@ -1 +1 @@ -{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-webview-show","core:webview:default","core:window:allow-create","core:window:allow-get-all-windows","core:window:allow-show","core:window:default","dialog:default","fs:allow-appconfig-read-recursive","fs:allow-appconfig-write-recursive","fs:allow-appdata-read-recursive","fs:allow-appdata-write-recursive","fs:allow-read-file","fs:allow-read-dir","fs:allow-resource-read-recursive","fs:allow-resource-write-recursive","fs:allow-download-read-recursive","fs:allow-download-write-recursive","fs:default",{"identifier":"fs:scope","allow":[{"path":"**"}]},"http:allow-fetch-send","http:allow-fetch","http:default","notification:allow-create-channel","notification:allow-list-channels","notification:allow-notify","notification:allow-is-permission-granted","notification:default","opener:allow-open-url","opener:default","os:allow-hostname","os:default","store:default"]}} \ No newline at end of file +{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-webview-show","core:webview:default","core:window:allow-create","core:window:allow-get-all-windows","core:window:allow-show","core:window:default","dialog:default","fs:allow-appconfig-read-recursive","fs:allow-appconfig-write-recursive","fs:allow-appdata-read-recursive","fs:allow-appdata-write-recursive","fs:allow-applocaldata-read-recursive","fs:allow-applocaldata-write-recursive","fs:allow-read-file","fs:allow-write-file","fs:allow-read-dir","fs:allow-mkdir","fs:allow-exists","fs:allow-remove","fs:allow-resource-read-recursive","fs:allow-resource-write-recursive","fs:allow-download-read-recursive","fs:allow-download-write-recursive","fs:default",{"identifier":"fs:scope","allow":[{"path":"**"}]},"http:allow-fetch-send","http:allow-fetch","http:default","notification:allow-create-channel","notification:allow-list-channels","notification:allow-notify","notification:allow-is-permission-granted","notification:default","opener:allow-open-url","opener:default","os:allow-hostname","os:default","store:default"]}} \ No newline at end of file diff --git a/src/components/haex/extension/launcher.vue b/src/components/haex/extension/launcher.vue index f7b4cb5..0ad1404 100644 --- a/src/components/haex/extension/launcher.vue +++ b/src/components/haex/extension/launcher.vue @@ -43,7 +43,6 @@ draggable="true" @click="openItem(item)" @dragstart="handleDragStart($event, item)" - @dragend="handleDragEnd" /> diff --git a/src/components/haex/system/settings.vue b/src/components/haex/system/settings.vue index fb1b050..61c075e 100644 --- a/src/components/haex/system/settings.vue +++ b/src/components/haex/system/settings.vue @@ -47,7 +47,7 @@ /> -
+
@@ -55,8 +55,14 @@