[fix] compile error and mobile context menu

This commit is contained in:
kwaroran
2023-05-23 10:18:28 +09:00
parent 398a8c0846
commit 1eb52800e0
4 changed files with 13 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
}, },
"package": { "package": {
"productName": "RisuAI", "productName": "RisuAI",
"version": "1.15.2" "version": "1.15.3"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {
@@ -90,7 +90,7 @@
"targets": "all" "targets": "all"
}, },
"security": { "security": {
"csp": "" "csp": null
}, },
"updater": { "updater": {
"active": false "active": false

View File

@@ -277,6 +277,13 @@
} catch (error) {} } catch (error) {}
} }
const preventAll = (e:Event) => {
e.preventDefault()
e.stopPropagation()
e.stopImmediatePropagation()
return false
}
onDestroy(unsub); onDestroy(unsub);
</script> </script>
@@ -313,6 +320,7 @@
on:dragover={avatarDragOver} on:dragover={avatarDragOver}
on:drop={(e) => {avatarDrop({index:ind}, e)}} on:drop={(e) => {avatarDrop({index:ind}, e)}}
on:dragenter|preventDefault on:dragenter|preventDefault
on:contextmenu={preventAll}
> >
<SidebarIndicator <SidebarIndicator
isActive={char.type === 'normal' && $selectedCharID === char.index && sideBarMode !== 1} isActive={char.type === 'normal' && $selectedCharID === char.index && sideBarMode !== 1}
@@ -381,6 +389,7 @@
on:dragover={avatarDragOver} on:dragover={avatarDragOver}
on:drop={(e) => {if(char.type === 'folder'){avatarDrop({index: ind, folder:char.id}, e)}}} on:drop={(e) => {if(char.type === 'folder'){avatarDrop({index: ind, folder:char.id}, e)}}}
on:dragenter|preventDefault on:dragenter|preventDefault
on:contextmenu={preventAll}
> >
<SidebarIndicator <SidebarIndicator
isActive={$selectedCharID === char2.index && sideBarMode !== 1} isActive={$selectedCharID === char2.index && sideBarMode !== 1}

View File

@@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash';
export const DataBase = writable({} as any as Database) export const DataBase = writable({} as any as Database)
export const loadedStore = writable(false) export const loadedStore = writable(false)
export let appVer = '1.15.2' export let appVer = '1.15.3'
export function setDatabase(data:Database){ export function setDatabase(data:Database){

View File

@@ -1 +1 @@
{"version":"1.15.2"} {"version":"1.15.3"}