Skip to content

Commit

Permalink
Merge pull request #738 from intechstudio/bug/Import
Browse files Browse the repository at this point in the history
🚩PR: Fixed import handling in grid editor web view
  • Loading branch information
elsoazemelet authored Jun 11, 2024
2 parents 4087cf6 + 4e2b415 commit c19b537
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/electron/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ contextBridge.exposeInMainWorld("electron", {
startConfigsWatch: (configPath, rootDirectory) =>
ipcRenderer.invoke("startConfigsWatch", { configPath, rootDirectory }),
stopConfigsWatch: () => ipcRenderer.invoke("stopConfigsWatch"),
saveConfig: (configPath, rootDirectory, config) =>
ipcRenderer.invoke("saveConfig", {
configPath,
rootDirectory,
config,
}),
saveConfig: (configPath, rootDirectory, config) => {
return new Promise((resolve, reject) => {
const res = ipcRenderer.invoke("saveConfig", {
configPath,
rootDirectory,
config,
});
resolve(res);
});
},
deleteConfig: (configPath, rootDirectory, config) =>
ipcRenderer.invoke("deleteConfig", {
configPath,
Expand Down
1 change: 1 addition & 0 deletions src/renderer/main/panels/profileCloud/ProfileCloud.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
channelMessageWrapper(event, handleSendLogMessage);
break;
case "openExternalLink":
console.log("asd");
channelMessageWrapper(event, handleOpenExternalLink);
break;
}
Expand Down
12 changes: 12 additions & 0 deletions src/renderer/preload-window-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ if (import.meta.env.VITE_WEB_MODE == "true") {
restore: () => {},
isMaximized: () => {},
},
clipboard: {
writeText: () => {
return new Promise((resolve, reject) => {
reject("This feature is not yet supported in web mode.");
});
},
},
persistentStorage: {
set: () => {},
get: async () => {
Expand All @@ -79,6 +86,11 @@ if (import.meta.env.VITE_WEB_MODE == "true") {
startConfigsWatch: async () => {},
stopConfigsWatch: async () => {},
onSendConfigsToRenderer: async () => {},
saveConfig: () => {
return new Promise((resolve, reject) => {
reject("This feature is not yet supported in web mode.");
});
},
},
updater: {
onAppUpdate: async () => {},
Expand Down

0 comments on commit c19b537

Please sign in to comment.