From 1eb52800e085dbeab8246ccfdc2aa754bbcc794c Mon Sep 17 00:00:00 2001 From: kwaroran Date: Tue, 23 May 2023 10:18:28 +0900 Subject: [PATCH] [fix] compile error and mobile context menu --- src-tauri/tauri.conf.json | 4 ++-- src/lib/SideBars/Sidebar.svelte | 9 +++++++++ src/ts/database.ts | 2 +- version.json | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ff2f49cd..eef90976 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "RisuAI", - "version": "1.15.2" + "version": "1.15.3" }, "tauri": { "allowlist": { @@ -90,7 +90,7 @@ "targets": "all" }, "security": { - "csp": "" + "csp": null }, "updater": { "active": false diff --git a/src/lib/SideBars/Sidebar.svelte b/src/lib/SideBars/Sidebar.svelte index 805d6742..bf02c3d9 100644 --- a/src/lib/SideBars/Sidebar.svelte +++ b/src/lib/SideBars/Sidebar.svelte @@ -277,6 +277,13 @@ } catch (error) {} } + const preventAll = (e:Event) => { + e.preventDefault() + e.stopPropagation() + e.stopImmediatePropagation() + return false + } + onDestroy(unsub); @@ -313,6 +320,7 @@ on:dragover={avatarDragOver} on:drop={(e) => {avatarDrop({index:ind}, e)}} on:dragenter|preventDefault + on:contextmenu={preventAll} > {if(char.type === 'folder'){avatarDrop({index: ind, folder:char.id}, e)}}} on:dragenter|preventDefault + on:contextmenu={preventAll} >