@@ -11,13 +11,14 @@ import Events from "./emitter";
|
||||
import DataStore from "./datastore";
|
||||
import React from "./react";
|
||||
import Strings from "./strings";
|
||||
import ipc from "./ipc";
|
||||
|
||||
import AddonEditor from "@ui/misc/addoneditor";
|
||||
import FloatingWindows from "@ui/floatingwindows";
|
||||
import Toasts from "@ui/toasts";
|
||||
|
||||
|
||||
const openItem = shell.openItem || shell.openPath;
|
||||
const openItem = ipc.openPath;
|
||||
|
||||
const splitRegex = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/;
|
||||
const escapedAtRegex = /^\\@/;
|
||||
|
||||
@@ -60,4 +60,8 @@ export default new class IPCRenderer {
|
||||
getSystemAccentColor() {
|
||||
return ipc.invoke(IPCEvents.GET_ACCENT_COLOR);
|
||||
}
|
||||
|
||||
openPath(path) {
|
||||
return ipc.send(IPCEvents.OPEN_PATH, path);
|
||||
}
|
||||
};
|
||||
@@ -3,6 +3,7 @@ import Strings from "@modules/strings";
|
||||
import Events from "@modules/emitter";
|
||||
import DataStore from "@modules/datastore";
|
||||
import DiscordModules from "@modules/discordmodules";
|
||||
import ipc from "@modules/ipc";
|
||||
|
||||
import SettingsTitle from "./title";
|
||||
import AddonCard from "./addoncard";
|
||||
@@ -37,9 +38,7 @@ const buildDirectionOptions = () => [
|
||||
|
||||
|
||||
function openFolder(folder) {
|
||||
const shell = require("electron").shell;
|
||||
const open = shell.openItem || shell.openPath;
|
||||
open(folder);
|
||||
ipc.openPath(folder);
|
||||
}
|
||||
|
||||
function blankslate(type, onClick) {
|
||||
|
||||
Reference in New Issue
Block a user