feat: support loading
This commit is contained in:
1 parent
ad9e8a4937
commit
62531ae987
5 files changed
+104
-2
No files matched your search
+25
-1
@@ -1 +1,25 @@
|
||||
console.log('index.main.ts')
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { contextBridge, ipcRenderer } from 'electron'
|
||||
import { domReady } from './utils'
|
||||
import { useLoading } from './loading'
|
||||
|
||||
const { appendLoading, removeLoading } = useLoading()
|
||||
|
||||
|
||||
; (async () => {
|
||||
await domReady()
|
||||
|
||||
appendLoading()
|
||||
})();
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
contextBridge.exposeInMainWorld('bridge', {
|
||||
__dirname,
|
||||
__filename,
|
||||
fs,
|
||||
path,
|
||||
ipcRenderer,
|
||||
removeLoading,
|
||||
})
|
||||
Reference in new issue
Block a user