diff --git a/core/src/main.js b/core/src/main.js index f0e69aab..204255ec 100644 --- a/core/src/main.js +++ b/core/src/main.js @@ -30,7 +30,7 @@ const TEST_EDITOR = true; import path from 'path'; import sass from 'node-sass'; -import { BrowserWindow as OriginalBrowserWindow, dialog, session } from 'electron'; +import { BrowserWindow as OriginalBrowserWindow, dialog, session, shell } from 'electron'; import deepmerge from 'deepmerge'; import ContentSecurityPolicy from 'csp-parse'; import keytar from 'keytar'; @@ -97,6 +97,21 @@ class Comms { const rf = await FileUtils.readFile(path.resolve(configProxy().getPath('data'), fileName)); event.reply(rf); }); + + BDIpc.on('bd-explorer', (_, _path) => { + if (_path.static) _path = this.bd.config.getPath(_path.static); + else if (_path.full) _path = _path.full; + else if (_path.sub) _path = path.resolve(this.bd.config.getPath(_path.sub.base), [..._path.sub.subs]); + try { + shell.openItem(_path); + } catch (err) { + console.log(err); + } + }); + + BDIpc.on('bd-getPath', (event, paths) => { + event.reply(path.resolve(this.bd.config.getPath(paths[0]), ...paths.splice(1))); + }); } async send(channel, message) { diff --git a/editor/src/Editor.vue b/editor/src/Editor.vue index 5d1b1c11..f8d325ad 100644 --- a/editor/src/Editor.vue +++ b/editor/src/Editor.vue @@ -12,10 +12,8 @@ -
-
Loading Please Wait...
-
- + :toggleLiveUpdate="toggleLiveUpdate" + :ctxAction="ctxAction"/>