From 4f0aa1bc0201f0530ffbccb8249ddc94d8a82d67 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 14 Nov 2018 12:51:02 +0000 Subject: [PATCH] Add 'open project' option to Projects Welcome dialog --- .../editor-client/src/js/ui/projects/projects.js | 14 ++++++++++++++ .../@node-red/editor-client/src/sass/mixins.scss | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js index e35cfb4b6..15a6391a4 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js @@ -103,6 +103,18 @@ RED.projects = (function() { return container; }, buttons: [ + { + // id: "clipboard-dialog-cancel", + text: "Open existing project", //RED._("projects.welcome.not-right-now"), + class: "secondary", + click: function() { + createProjectOptions = { + action: "open" + } + show('git-config'); + } + }, + { // id: "clipboard-dialog-cancel", text: RED._("projects.welcome.not-right-now"), @@ -187,6 +199,8 @@ RED.projects = (function() { show('project-details'); } else if (createProjectOptions.action === "clone") { show('clone-project'); + } else if (createProjectOptions.action === "open") { + show('create',{screen:'open'}) } } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss b/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss index 2b283a1af..8dd0fc3ae 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss @@ -118,6 +118,13 @@ color: $editor-button-color-primary !important; } } + &.secondary { + background: none; + &:not(:hover) { + border-color: rgba(0,0,0,0); + } + + } } .button-group-vertical { @@ -135,7 +142,7 @@ &.single { color: $workspace-button-color !important; background: $workspace-button-background; - + &.selected:not(.disabled):not(:disabled) { color: $workspace-button-toggle-color !important; background: $workspace-button-background-active;