@@ -30,7 +30,7 @@ import { ref } from 'vue'
3030import Folder from ' ~icons/unicons/folder'
3131import AngleRight from ' ~icons/unicons/angle-right'
3232import { onClickOutside } from ' @vueuse/core'
33- import { ipc } from ' @/electron'
33+ import { ipc , track } from ' @/electron'
3434import type {
3535 ContextMenuPayload ,
3636 ContextMenuResponse ,
@@ -80,16 +80,17 @@ const onClickContextMenu = async () => {
8080
8181 if (action === ' new' ) {
8282 await folderStore .addNewFolder ()
83+ track (' folders/add-new' )
8384 }
8485
8586 if (action === ' delete' ) {
8687 await folderStore .deleteFoldersById (props .id ! )
87- console . log ( action , type )
88+ track ( ' folders/delete ' )
8889 }
8990
9091 if (action === ' update:language' ) {
91- console .log (data )
9292 await folderStore .patchFoldersById (props .id ! , { defaultLanguage: data })
93+ track (' folders/set-language' , data )
9394 }
9495 }
9596
@@ -104,9 +105,9 @@ const onClickContextMenu = async () => {
104105 })
105106
106107 if (action === ' delete' ) {
107- console .log (' trash delete' )
108108 snippetStore .emptyTrash ()
109109 await snippetStore .getSnippets ()
110+ track (' app/empty-trash' )
110111
111112 if (folderStore .selectedAlias === ' trash' ) {
112113 snippetStore .setSnippetsByAlias (' trash' )
@@ -126,6 +127,7 @@ const onClickContextMenu = async () => {
126127
127128 if (action === ' delete' ) {
128129 await tagStore .deleteTagById (props .id ! )
130+ track (' tags/delete' )
129131
130132 if (props .id === tagStore .selectedId ) {
131133 tagStore .selectedId = undefined
0 commit comments