File tree Expand file tree Collapse file tree 4 files changed +2
-35
lines changed
Expand file tree Collapse file tree 4 files changed +2
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import { subscribeToContextMenu } from './context-menu'
22import { subscribeToNotification } from './notifications'
33import { subscribeToPrettier } from './prettier'
4- import { subscribeToFs } from './fs'
54
65export const subscribeToChannels = ( ) => {
76 subscribeToContextMenu ( )
87 subscribeToNotification ( )
98 subscribeToPrettier ( )
10- subscribeToFs ( )
119}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import { useRoute } from 'vue-router'
4343import type { Snippet } from ' @shared/types/main/db'
4444import { addDays , isSameDay , isYesterday } from ' date-fns'
4545import { loadWASM } from ' onigasm'
46+ import onigasmFile from ' onigasm/lib/onigasm.wasm?url'
4647import { loadGrammars } from ' @/components/editor/grammars'
4748
4849// По какой то причине необходимо явно установить роут в '/'
@@ -58,7 +59,7 @@ const isUpdateAvailable = ref(false)
5859const isSupportToastShow = ref (false )
5960
6061const init = async () => {
61- await loadOnigasm ( )
62+ loadWASM ( onigasmFile )
6263 await loadGrammars ()
6364
6465 const theme = store .preferences .get (' theme' )
@@ -89,14 +90,6 @@ const init = async () => {
8990 checkForRemoteNotification ()
9091}
9192
92- const loadOnigasm = async () => {
93- const file = await ipc .invoke (' main:fs-read' , {
94- path: ' /onigasm/onigasm.wasm'
95- })
96-
97- loadWASM (new Uint8Array (file ).buffer )
98- }
99-
10093const setTheme = (theme : string ) => {
10194 document .body .dataset .theme = theme
10295}
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ type MainAction =
5252 | 'open-url'
5353 | 'prettier'
5454 | 'focus'
55- | 'fs-read'
5655
5756type ApiAction = 'snippet-create'
5857
You can’t perform that action at this time.
0 commit comments