Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:cables-gl/cables_ui into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Jan 30, 2025
2 parents 6f15341 + ca322f7 commit 167afeb
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
2 changes: 0 additions & 2 deletions html/ui/templates/op_add_dependencies.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
<input class="depSrc" type="text" placeholder="@cables/cables">
<div class="edit">
<a class="button add">Add</a>
<a class="button upload"><span class="icon icon-plus-circle icon-1_25x"></span>Upload</a>
<input class="hidden" type="file" accept=".js,application/javascript"/>
</div>
</div>
</script>
Expand Down
2 changes: 1 addition & 1 deletion html/ui/templates/tab_manage_op.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2>Op {{opDoc.shortName}}</h2>
<div class="groupSpacer"><h3>Warnings</h3></div>
<div class="params">
{{#each warns}}
<div class="warning-error warning-error-level1"><b>{{id}}</b> {{text}}</div>
<div class="warning-error warning-error-level1"><b>{{id}}</b> {{{text}}}</div>
<br/>
{{/each}}
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/ui/api/opsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export default class ServerOps
const opText = err.data.opName || opName ? " for " + err.data.opName || opName : "";
this._log.error("failed dependency " + opText + ": " + err.data.stderr);
}
else if(err.msg === "FAILED_TO_ADD_DEPENDENCY" && depType === "op")
else if (err.msg === "FAILED_TO_ADD_DEPENDENCY" && depType === "op")
{
this._log.error("failed op dependency for " + opName + ": " + depSrc);
}
Expand Down Expand Up @@ -1793,6 +1793,11 @@ export default class ServerOps
}
}

if (!opDoc)
{
return [];
}

const opLibs = this.getOpLibs(opDoc.name);
const opCoreLibs = this.getCoreLibs(opDoc.name);
const opDependencies = [];
Expand Down
3 changes: 2 additions & 1 deletion src/ui/components/tabs/tab_electronopdirs.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ export default class ElectronOpDirs
const listEle = ele.byId("dirlist");
const infoBlock = listEle.querySelector(".highlightBlock");
const addButton = this._tab.contentEle.querySelector("#addOpProjectDir");

if (addButton)
{
addButton.addEventListener("click", () =>
{
platform.talkerAPI.send("addProjectOpDir", (dirErr, _dirRes) =>
platform.talkerAPI.send("addProjectOpDir", {}, (dirErr, _dirRes) =>
{
if (!dirErr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ui/defaultops.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const defaultOpNames =

"TriggerNumber": "Ops.Trigger.TriggerNumber",
"TriggerString": "Ops.Trigger.TriggerString",
"TriggerOnChangeString": "Ops.Trigger.TriggerOnChangeString",
"TriggerOnChangeString": "Ops.Trigger.TriggerOnChangeString_v2",
"triggerCounter": "Ops.Trigger.TriggerCounter",

"StringLength": "Ops.String.StringLength_v2",
Expand Down
2 changes: 1 addition & 1 deletion src/ui/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ export default class Gui extends Events

if (platform.frontendOptions.showOpenPatch)
{
let item = "<li><a onclick='platform.talkerAPI.send(\"gotoPatch\");' class=\"mine\" target=\"_top\">Open Patch<span class='shortcut'><p><span class='key key_cmd'></span><code>o</code></p></span></a></li>";
let item = "<li><a onclick='CABLES.platform.talkerAPI.send(\"gotoPatch\");' class=\"mine\" target=\"_top\">Open Patch<span class='shortcut'><p><span class='key key_cmd'></span><code>o</code></p></span></a></li>";
str += this.bottomInfoArea.replaceShortcuts(item);
}

Expand Down
6 changes: 3 additions & 3 deletions src/ui/platform_electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default class PlatformElectron extends Platform
inputEle = ele.byQuery(inputId);
if (inputEle) value = inputEle.value;
}
platform.talkerAPI.send("selectFile", { "url": value, "filter": filterType, "opId": opId }, (_err, file) =>
this.talkerAPI.send("selectFile", { "url": value, "filter": filterType, "opId": opId }, (_err, file) =>
{
if (file && inputEle)
{
Expand All @@ -120,7 +120,7 @@ export default class PlatformElectron extends Platform
{
const showBackupDialog = () =>
{
platform.talkerAPI.send("patchCreateBackup", { }, (err, result) =>
this.talkerAPI.send("patchCreateBackup", { }, (err, result) =>
{
if (result.success) notify("Backup created!");
});
Expand Down Expand Up @@ -158,7 +158,7 @@ export default class PlatformElectron extends Platform
loadingModal.setTask("Exporting patch...");
let talkerCommand = "exportPatch";
if (exportType === "patch") talkerCommand = "exportPatchBundle";
platform.talkerAPI.send(talkerCommand, { "projectId": projectId }, (err, result) =>
this.talkerAPI.send(talkerCommand, { "projectId": projectId }, (err, result) =>
{
if (err)
{
Expand Down

0 comments on commit 167afeb

Please sign in to comment.