Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
blurymind committed Aug 10, 2024
1 parent bbf8833 commit 5388069
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 25 deletions.
2 changes: 1 addition & 1 deletion css/0.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
42 changes: 25 additions & 17 deletions public/plugins/plugin-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,35 @@ export var PluginEditor = function ({
});
}
if (this.mode === 'test') {
const extension = new Function("parameters", `return ${fileContents}`)();
console.log({ extensionData: extension(), fileContents })
if (typeof extension === 'function') {
try {
const data = extension();
if (!data) {
document.getElementById('plugin-output-previewer').value = `The function needs to return an object..
try{
const extension = new Function("parameters", `return ${fileContents}`)();
console.log({ extensionData: extension(), fileContents })
if (typeof extension === 'function') {
try {
const data = extension();
if (!data) {
document.getElementById('plugin-output-previewer').value = `The function needs to return an object..
${ExampleOutputFunction}
`
return;
}
document.getElementById('plugin-output-previewer').value = getPreviewHtml(data.modules || [], data.body, data.script)
} catch (e) {
document.getElementById('plugin-output-previewer').value = `${e.toString()}
SEE CONSOLE LOGS
${ExampleOutputFunction}
`
return;
`;
}
document.getElementById('plugin-output-previewer').value = getPreviewHtml(data.modules || [], data.body, data.script)
} catch (e) {
document.getElementById('plugin-output-previewer').value = `${ExampleOutputFunction}
SEE CONSOLE LOGS
`;
console.error(e)
return
}
return
document.getElementById('plugin-output-previewer').value = ExampleOutputFunction;
} catch(e) {
document.getElementById('plugin-output-previewer').value = `${e.toString()}
SEE CONSOLE LOGS
${ExampleOutputFunction}
`;
console.error(e)
}
document.getElementById('plugin-output-previewer').value = ExampleOutputFunction;
}
});
};
Expand Down
6 changes: 5 additions & 1 deletion public/themes/dracula.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
background-color: #343746;
}

.menu .dropdown .search-field{
color: #f8f8f2;
background: #282a36;
}

.app-menu .menu .dropdown .item:hover {
background: #44475a;
color: #f8f8f2;
Expand Down Expand Up @@ -474,7 +479,6 @@ input[type="text"] {
color: #f8f8f2;
background: #44475a;
border: none;
height: 22px;
line-height: 22px;
}

Expand Down
2 changes: 1 addition & 1 deletion public/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.4.290"
"version": "0.4.292"
}
2 changes: 1 addition & 1 deletion sw.js

Large diffs are not rendered by default.

0 comments on commit 5388069

Please sign in to comment.