diff --git a/CockpitSpace/FullScreen.js b/CockpitSpace/FullScreen.js index 2218de0c0..8f204e3b7 100644 --- a/CockpitSpace/FullScreen.js +++ b/CockpitSpace/FullScreen.js @@ -78,10 +78,12 @@ function newFullScreen () { thisObject.status = 'On' goFullscreen() CURRENT_TOP_MARGIN = 0 + AT_FULL_SCREEN_MODE = true } else { thisObject.status = 'Off' goOutFullscreen() CURRENT_TOP_MARGIN = window.canvasApp.topMargin + AT_FULL_SCREEN_MODE = false } } diff --git a/FloatingSpace/CircularMenuItem.js b/FloatingSpace/CircularMenuItem.js index d969cdb74..40f87bfa0 100644 --- a/FloatingSpace/CircularMenuItem.js +++ b/FloatingSpace/CircularMenuItem.js @@ -93,7 +93,7 @@ function newCircularMenuItem () { } function getContainer (point) { - if (thisObject.dontShowAtFullscreen === true && CURRENT_TOP_MARGIN === 0) { return } + if (thisObject.dontShowAtFullscreen === true && AT_FULL_SCREEN_MODE === true) { return } let container if (thisObject.isDeployed === true) { @@ -106,7 +106,7 @@ function newCircularMenuItem () { } function physics () { - if (thisObject.dontShowAtFullscreen === true && CURRENT_TOP_MARGIN === 0) { return } + if (thisObject.dontShowAtFullscreen === true && AT_FULL_SCREEN_MODE === true) { return } const INCREASE_STEP = 2 @@ -206,7 +206,7 @@ function newCircularMenuItem () { } function drawBackground () { - if (thisObject.dontShowAtFullscreen === true && CURRENT_TOP_MARGIN === 0) { return } + if (thisObject.dontShowAtFullscreen === true && AT_FULL_SCREEN_MODE === true) { return } if (thisObject.container.frame.position.x > 0 && thisObject.isDeployed === true && thisObject.currentRadius >= thisObject.targetRadius) { if (thisObject.type === 'Icon & Text') { @@ -231,7 +231,7 @@ function newCircularMenuItem () { } function drawForeground () { - if (thisObject.dontShowAtFullscreen === true && CURRENT_TOP_MARGIN === 0) { return } + if (thisObject.dontShowAtFullscreen === true && AT_FULL_SCREEN_MODE === true) { return } let menuPosition = { x: thisObject.currentRadius * 1.5, diff --git a/FloatingSpace/CodeEditor.js b/FloatingSpace/CodeEditor.js index 9b910f842..5bfa65232 100644 --- a/FloatingSpace/CodeEditor.js +++ b/FloatingSpace/CodeEditor.js @@ -133,7 +133,7 @@ function newCodeEditor () { let textAreaPosition = { x: 0 - thisObject.container.frame.width / 2, - y: 0 + thisObject.container.frame.height * 2 / 7 + y: 0 - thisObject.container.frame.height * 3 / 7 } textAreaPosition = thisObject.container.frame.frameThisPoint(textAreaPosition) diff --git a/FloatingSpace/StrategyPartConstructor.js b/FloatingSpace/StrategyPartConstructor.js index 0f69d9e1f..2646cdbe3 100644 --- a/FloatingSpace/StrategyPartConstructor.js +++ b/FloatingSpace/StrategyPartConstructor.js @@ -430,7 +430,27 @@ function newStrategyPartConstructor () { break } case 'Exchange Account Key': { + strategyPart.codeEditor = newCodeEditor() + strategyPart.codeEditor.isVisibleFunction = strategyPart.isVisibleFunction + strategyPart.codeEditor.initialize() + strategyPart.codeEditor.container.connectToParent(strategyPart.container, false, false, true, true, false, false, false, false) + addLeftIcons(menuItemsInitialValues, floatingObject) + menuItemsInitialValues.push( + { + action: 'Edit Key Value', + actionFunction: strategyPart.codeEditor.activate, + label: 'Edit Key Value', + visible: false, + iconPathOn: 'html', + iconPathOff: 'html', + rawRadius: 8, + targetRadius: 0, + currentRadius: 0, + angle: -40, + dontShowAtFullscreen: true + } + ) menuItemsInitialValues.push( { action: 'Delete Exchange Account Key', @@ -444,7 +464,7 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -20 + angle: 0 } ) menuItemsInitialValues.push( @@ -458,7 +478,7 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 20 + angle: 40 } ) break diff --git a/Globals.js b/Globals.js index eebdfc073..564259e92 100644 --- a/Globals.js +++ b/Globals.js @@ -170,6 +170,7 @@ let INITIAL_TIME_PERIOD = ONE_DAY_IN_MILISECONDS // This value will be overwrit let VERY_LARGE_NUMBER = 100000000000 let CURRENT_TOP_MARGIN = window.canvasApp.topMargin +let AT_FULL_SCREEN_MODE = false let maxDate = new Date(); maxDate.setMilliseconds(0); diff --git a/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js b/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js index 717496d2d..b37cdf60a 100644 --- a/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js +++ b/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js @@ -355,7 +355,8 @@ function newPartsFromNodes () { function addExchangeAccountKey (parentNode) { let exchangeAccount = parentNode let key = { - name: 'New Key' + name: 'New Key', + code: 'Paste your exchange API secret key here. Secret keys are filtered out and NOT exported when using the SHARE menu option on any object at your workspace. Secret keys ARE downloaded when using the download button.' } exchangeAccount.keys.push(key) createPart('Exchange Account Key', key.name, key, exchangeAccount, exchangeAccount, 'Account Key') diff --git a/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js b/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js index 7f569fc43..45fec8e52 100644 --- a/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js +++ b/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js @@ -321,7 +321,8 @@ function newProtocolNode () { let key = { type: node.type, subType: node.subType, - name: node.name + name: node.name, + code: node.code } return key } diff --git a/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js b/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js index ffb8723cd..964775d6e 100644 --- a/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js +++ b/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js @@ -380,6 +380,7 @@ function newStringifyNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, savedPayload: getSavedPayload(node) } return key