mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
19 Commits
3.0.0-beta
...
fix-monaco
Author | SHA1 | Date | |
---|---|---|---|
|
ca20f41d0e | ||
|
13e8aeae4e | ||
|
f760354e82 | ||
|
e91e35d508 | ||
|
db7e196bf8 | ||
|
f5fe4f99f1 | ||
|
e2bff36395 | ||
|
0a5d7c2100 | ||
|
4d42f8ec58 | ||
|
81e7b052da | ||
|
be44b7e2c7 | ||
|
d8a781632c | ||
|
3726d6fe3b | ||
|
6090a5b274 | ||
|
d4fdf6be67 | ||
|
1b6cbe5c23 | ||
|
1d130a7857 | ||
|
d81523370e | ||
|
6939546f22 |
@@ -2,6 +2,7 @@
|
||||
|
||||
Editor
|
||||
|
||||
- Move all colours to CSS variables (#3692) @bonanitech
|
||||
- Fix clicking on node in workspace to hide context menu (#3696) @knolleary
|
||||
- Fix credential type input item of subflow template (#3703) @HiroyasuNishiyama
|
||||
- Add option flag `reimport` to `importNodes` (#3718) @Steve-Mcl
|
||||
@@ -22,6 +23,7 @@ Editor
|
||||
|
||||
Runtime
|
||||
|
||||
- Allow flows to be stopped and started manually (#3719) @knolleary
|
||||
- Import default export if node is a transpiled es module (#3669) @dschmidt
|
||||
- Leave Monaco theme commented out by default (#3704) @bonanitech
|
||||
|
||||
|
@@ -101,7 +101,10 @@ module.exports = {
|
||||
}
|
||||
themeSettings = null;
|
||||
theme = settings.editorTheme || {};
|
||||
themeContext.asset.vendorMonaco = ((theme.codeEditor || {}).lib === "monaco") ? "vendor/monaco/monaco-bootstrap.js" : "";
|
||||
themeContext.asset.vendorMonaco = "vendor/monaco/monaco-bootstrap.js"
|
||||
if (theme.codeEditor && theme.codeEditor.lib === 'ace') {
|
||||
themeContext.asset.vendorMonaco = ''
|
||||
}
|
||||
activeTheme = theme.theme;
|
||||
},
|
||||
|
||||
|
@@ -300,6 +300,10 @@
|
||||
"modifiedFlowsDesc": "Only deploys flows that contain changed nodes",
|
||||
"modifiedNodes": "Modified Nodes",
|
||||
"modifiedNodesDesc": "Only deploys nodes that have changed",
|
||||
"startFlows": "Start",
|
||||
"startFlowsDesc": "Start Flows",
|
||||
"stopFlows": "Stop",
|
||||
"stopFlowsDesc": "Stop Flows",
|
||||
"restartFlows": "Restart Flows",
|
||||
"restartFlowsDesc": "Restarts the current deployed flows",
|
||||
"successfulDeploy": "Successfully deployed",
|
||||
|
@@ -169,6 +169,10 @@
|
||||
}
|
||||
},
|
||||
"notification": {
|
||||
"state": {
|
||||
"flowsStopped": "フローを停止しました",
|
||||
"flowsStarted": "フローを開始しました"
|
||||
},
|
||||
"warning": "<strong>警告</strong>: __message__",
|
||||
"warnings": {
|
||||
"undeployedChanges": "ノードの変更をデプロイしていません",
|
||||
@@ -296,6 +300,10 @@
|
||||
"modifiedFlowsDesc": "変更したノードを含むフローのみデプロイ",
|
||||
"modifiedNodes": "変更したノード",
|
||||
"modifiedNodesDesc": "変更したノードのみデプロイ",
|
||||
"startFlows": "開始",
|
||||
"startFlowsDesc": "フローを開始",
|
||||
"stopFlows": "停止",
|
||||
"stopFlowsDesc": "フローを停止",
|
||||
"restartFlows": "フローを再起動",
|
||||
"restartFlowsDesc": "デプロイされた現在のフローを再起動",
|
||||
"successfulDeploy": "デプロイが成功しました",
|
||||
@@ -685,7 +693,8 @@
|
||||
"showHelp": "ヘルプを表示",
|
||||
"showInOutline": "アウトラインに表示",
|
||||
"showTopics": "トピックを表示",
|
||||
"noHelp": "ヘルプのトピックが未選択"
|
||||
"noHelp": "ヘルプのトピックが未選択",
|
||||
"changeLog": "更新履歴"
|
||||
},
|
||||
"config": {
|
||||
"name": "設定ノードを表示",
|
||||
@@ -845,7 +854,7 @@
|
||||
"pushFailed": "リモートに新しいコミットがあるため、プッシュに失敗しました。プルしてマージしてから、再度プッシュしてください。",
|
||||
"push": "プッシュ",
|
||||
"pull": "プル",
|
||||
"unablePull": "<p>リモートの変更のプル失敗:ステージングされていないローカルの変更を上書きされてしまいます。</p><p>変更をコミットしてから再度実行してください。</p>",
|
||||
"unablePull": "<p>リモートの変更のプル失敗:ステージングされていないローカルの変更が上書きされてしまいます。</p><p>変更をコミットしてから再度実行してください。</p>",
|
||||
"showUnstagedChanges": "ステージングされていない変更を表示",
|
||||
"connectionFailed": "リモートリポジトリに接続できません: ",
|
||||
"pullUnrelatedHistory": "<p>リモートに関連のないコミット履歴があります。</p><p>本当に変更をプルしてローカルリポジトリに反映しますか?</p>",
|
||||
@@ -1159,7 +1168,8 @@
|
||||
"takeATour": "ツアーを開始",
|
||||
"start": "開始",
|
||||
"next": "次へ",
|
||||
"tours": "ツアー"
|
||||
"welcomeTours": "ウェルカムツアー",
|
||||
"tours": "ツアー"
|
||||
},
|
||||
"diagnostics": {
|
||||
"title": "システム情報"
|
||||
@@ -1336,6 +1346,8 @@
|
||||
"new-project": "新しいプロジェクト",
|
||||
"open-project": "プロジェクトを開く",
|
||||
"show-project-settings": "プロジェクト設定を表示",
|
||||
"show-version-control-tab": "バージョンコントロールタブを表示"
|
||||
"show-version-control-tab": "バージョンコントロールタブを表示",
|
||||
"start-flows": "フローを開始",
|
||||
"stop-flows": "フローを停止"
|
||||
}
|
||||
}
|
||||
|
@@ -3,16 +3,12 @@
|
||||
"alt-shift-p":"core:manage-palette",
|
||||
"ctrl-f": "core:search",
|
||||
"ctrl-shift-f": "core:list-flows",
|
||||
"ctrl-+": "core:zoom-in",
|
||||
"ctrl--": "core:zoom-out",
|
||||
"ctrl-0": "core:zoom-reset",
|
||||
"ctrl-enter": "core:confirm-edit-tray",
|
||||
"ctrl-escape": "core:cancel-edit-tray",
|
||||
"ctrl-d": "core:deploy-flows",
|
||||
"ctrl-g i": "core:show-info-tab",
|
||||
"ctrl-g h": "core:show-help-tab",
|
||||
"ctrl-g d": "core:show-debug-tab",
|
||||
"ctrl-g c": "core:show-config-tab",
|
||||
"ctrl-g d": "core:show-debug-tab",
|
||||
"ctrl-g h": "core:show-help-tab",
|
||||
"ctrl-g i": "core:show-info-tab",
|
||||
"ctrl-g v": "core:show-version-control-tab",
|
||||
"ctrl-g x": "core:show-context-tab",
|
||||
"ctrl-e": "core:show-export-dialog",
|
||||
"ctrl-i": "core:show-import-dialog",
|
||||
@@ -23,11 +19,8 @@
|
||||
"ctrl-alt-r": "core:show-remote-diff",
|
||||
"ctrl-alt-n": "core:new-project",
|
||||
"ctrl-alt-o": "core:open-project",
|
||||
"ctrl-g v": "core:show-version-control-tab",
|
||||
"ctrl-shift-l": "core:show-event-log",
|
||||
"ctrl-shift-p":"core:show-action-list",
|
||||
"alt-w": "core:hide-flow",
|
||||
"alt-shift-w": "core:show-last-hidden-flow"
|
||||
"ctrl-shift-p":"core:show-action-list"
|
||||
},
|
||||
"red-ui-sidebar-node-config": {
|
||||
"backspace": "core:delete-config-selection",
|
||||
@@ -93,7 +86,16 @@
|
||||
"alt-a v": "core:distribute-selection-vertically",
|
||||
"shift-f": "core:search-previous",
|
||||
"f": "core:search-next",
|
||||
"alt-l l": "core:split-wire-with-link-nodes"
|
||||
"alt-l l": "core:split-wire-with-link-nodes",
|
||||
"alt-w": "core:hide-flow",
|
||||
"alt-shift-w": "core:show-last-hidden-flow",
|
||||
"ctrl-+": "core:zoom-in",
|
||||
"ctrl--": "core:zoom-out",
|
||||
"ctrl-0": "core:zoom-reset"
|
||||
|
||||
},
|
||||
"red-ui-editor-stack": {
|
||||
"ctrl-enter": "core:confirm-edit-tray",
|
||||
"ctrl-escape": "core:cancel-edit-tray"
|
||||
}
|
||||
}
|
||||
|
@@ -1664,6 +1664,7 @@ RED.nodes = (function() {
|
||||
function importNodes(newNodesObj,options) { // createNewIds,createMissingWorkspace) {
|
||||
const defOpts = { generateIds: false, addFlow: false, reimport: false, importMap: {} }
|
||||
options = Object.assign({}, defOpts, options)
|
||||
options.importMap = options.importMap || {}
|
||||
const createNewIds = options.generateIds;
|
||||
const reimport = (!createNewIds && !!options.reimport)
|
||||
const createMissingWorkspace = options.addFlow;
|
||||
|
@@ -43,7 +43,16 @@ RED.contextMenu = (function() {
|
||||
const isGroup = hasSelection && selection.nodes.length === 1 && selection.nodes[0].type === 'group'
|
||||
|
||||
const canRemoveFromGroup = hasSelection && !!selection.nodes[0].g
|
||||
const offset = $("#red-ui-workspace-chart").offset()
|
||||
|
||||
let addX = options.x - offset.left + $("#red-ui-workspace-chart").scrollLeft()
|
||||
let addY = options.y - offset.top + $("#red-ui-workspace-chart").scrollTop()
|
||||
|
||||
if (RED.view.snapGrid) {
|
||||
const gridSize = RED.view.gridSize()
|
||||
addX = gridSize*Math.floor(addX/gridSize)
|
||||
addY = gridSize*Math.floor(addY/gridSize)
|
||||
}
|
||||
|
||||
const menuItems = [
|
||||
{ onselect: 'core:show-action-list', onpostselect: function() {} },
|
||||
@@ -54,17 +63,42 @@ RED.contextMenu = (function() {
|
||||
label: RED._("contextMenu.node"),
|
||||
onselect: function() {
|
||||
RED.view.showQuickAddDialog({
|
||||
position: [ options.x - offset.left, options.y - offset.top ],
|
||||
position: [ addX, addY ],
|
||||
touchTrigger: true,
|
||||
splice: isSingleLink?selection.links[0]:undefined,
|
||||
// spliceMultiple: isMultipleLinks
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
( hasSelection || hasLinks ) ? {
|
||||
label: RED._("contextMenu.junction"),
|
||||
onselect: 'core:split-wires-with-junctions',
|
||||
disabled: hasSelection || !hasLinks
|
||||
disabled: !hasLinks
|
||||
} : {
|
||||
label: RED._("contextMenu.junction"),
|
||||
onselect: function() {
|
||||
const nn = {
|
||||
_def: {defaults:{}},
|
||||
type: 'junction',
|
||||
z: RED.workspaces.active(),
|
||||
id: RED.nodes.id(),
|
||||
x: addX,
|
||||
y: addY,
|
||||
w: 0, h: 0,
|
||||
outputs: 1,
|
||||
inputs: 1,
|
||||
dirty: true
|
||||
}
|
||||
const historyEvent = {
|
||||
dirty: RED.nodes.dirty(),
|
||||
t:'add',
|
||||
junctions:[nn]
|
||||
}
|
||||
RED.nodes.addJunction(nn);
|
||||
RED.history.push(historyEvent);
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.redraw(true)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: RED._("contextMenu.linkNodes"),
|
||||
@@ -118,7 +152,6 @@ RED.contextMenu = (function() {
|
||||
}
|
||||
|
||||
}
|
||||
const offset = $("#red-ui-workspace-chart").offset()
|
||||
menu = RED.menu.init({
|
||||
direction: 'right',
|
||||
onpreselect: function() {
|
||||
|
@@ -70,8 +70,8 @@ RED.deploy = (function() {
|
||||
null
|
||||
]
|
||||
if (RED.settings.runtimeState && RED.settings.runtimeState.ui === true) {
|
||||
mainMenuItems.push({id:"deploymenu-item-runtime-start", icon:"red/images/start.svg",label:"Start"/*RED._("deploy.startFlows")*/,sublabel:"Start Flows" /*RED._("deploy.startFlowsDesc")*/,onselect:"core:start-flows", visible:false})
|
||||
mainMenuItems.push({id:"deploymenu-item-runtime-stop", icon:"red/images/stop.svg",label:"Stop"/*RED._("deploy.startFlows")*/,sublabel:"Stop Flows" /*RED._("deploy.startFlowsDesc")*/,onselect:"core:stop-flows", visible:false})
|
||||
mainMenuItems.push({id:"deploymenu-item-runtime-start", icon:"red/images/start.svg",label:RED._("deploy.startFlows"),sublabel:RED._("deploy.startFlowsDesc"),onselect:"core:start-flows", visible:false})
|
||||
mainMenuItems.push({id:"deploymenu-item-runtime-stop", icon:"red/images/stop.svg",label:RED._("deploy.stopFlows"),sublabel:RED._("deploy.stopFlowsDesc"),onselect:"core:stop-flows", visible:false})
|
||||
}
|
||||
mainMenuItems.push({id:"deploymenu-item-reload", icon:"red/images/deploy-reload.svg",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"})
|
||||
RED.menu.init({id:"red-ui-header-button-deploy-options", options: mainMenuItems });
|
||||
|
@@ -265,13 +265,18 @@ RED.keyboard = (function() {
|
||||
if (partialState) {
|
||||
partialState = null;
|
||||
return resolveKeyEvent(evt);
|
||||
} else if (Object.keys(handler).length > 0) {
|
||||
partialState = handler;
|
||||
evt.preventDefault();
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
if (Object.keys(handler).length > 0) {
|
||||
// check if there's a potential combined handler initiated by this keyCode
|
||||
for (let h in handler) {
|
||||
if (matchHandlerToEvent(evt,handler[h]) > -1) {
|
||||
partialState = handler;
|
||||
evt.preventDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
var depth = Infinity;
|
||||
var matchedHandler;
|
||||
|
@@ -5,11 +5,11 @@ export default {
|
||||
titleIcon: "fa fa-map-o",
|
||||
title: {
|
||||
"en-US": "Welcome to Node-RED 3.0 Beta 4!",
|
||||
"ja": "Node-RED 3.0 ベータ3へようこそ!"
|
||||
"ja": "Node-RED 3.0 ベータ4へようこそ!"
|
||||
},
|
||||
description: {
|
||||
"en-US": "<p>This is another final beta release of Node-RED 3.0.</p><p>Let's take a moment to discover the new features in this release.</p>",
|
||||
"ja": "<p>これはNode-RED 3.0の最後のベータリリースです。</p><p>本リリースの新機能を見つけてみましょう。</p>"
|
||||
"ja": "<p>これはNode-RED 3.0のもう一つの最後のベータリリースです。</p><p>本リリースの新機能を見つけてみましょう。</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@@ -122,6 +122,7 @@
|
||||
"stopped-flows": "フローを停止しました",
|
||||
"stopped": "停止しました",
|
||||
"stopping-error": "ノードの停止に失敗しました: __message__",
|
||||
"updated-flows": "フローを更新しました",
|
||||
"added-flow": "フローを追加します: __label__",
|
||||
"updated-flow": "フローを更新しました: __label__",
|
||||
"removed-flow": "フローを削除しました: __label__",
|
||||
|
@@ -51,7 +51,7 @@ describe("api/editor/theme", function () {
|
||||
context.should.have.a.property("asset");
|
||||
context.asset.should.have.a.property("red", "red/red.min.js");
|
||||
context.asset.should.have.a.property("main", "red/main.min.js");
|
||||
context.asset.should.have.a.property("vendorMonaco", "");
|
||||
context.asset.should.have.a.property("vendorMonaco", "vendor/monaco/monaco-bootstrap.js");
|
||||
|
||||
should.not.exist(theme.settings());
|
||||
});
|
||||
@@ -69,16 +69,16 @@ describe("api/editor/theme", function () {
|
||||
}
|
||||
});
|
||||
|
||||
it("Adds monaco bootstrap when enabled", async function () {
|
||||
it("Does not add monaco bootstrap when ace selected", async function () {
|
||||
theme.init({
|
||||
editorTheme: {
|
||||
codeEditor: {
|
||||
lib: 'monaco'
|
||||
lib: 'ace'
|
||||
}
|
||||
}
|
||||
});
|
||||
var context = await theme.context();
|
||||
context.asset.should.have.a.property("vendorMonaco", "vendor/monaco/monaco-bootstrap.js");
|
||||
context.asset.should.have.a.property("vendorMonaco", "");
|
||||
});
|
||||
|
||||
it("picks up custom theme", async function () {
|
||||
|
Reference in New Issue
Block a user