From 07b86a33a10fa02b2557e79aa5ffeb88c8ef5029 Mon Sep 17 00:00:00 2001 From: Jochen Friedrich Date: Thu, 27 Feb 2020 11:52:06 +0000 Subject: [PATCH] GUI improvements: - Add help texts. - Fix dialogs - Fix room selection --- icons/matrix.png | Bin 255 -> 3672 bytes matrix.html | 149 ++++++++++++++++++++++++++++++++++------------- matrix.js | 6 +- package.json | 2 +- 4 files changed, 113 insertions(+), 44 deletions(-) diff --git a/icons/matrix.png b/icons/matrix.png index ecec1cce98f986973b63dedc39827bea8db89c44..2e5a9d3deda1d134e8e2f46387897591943650ae 100644 GIT binary patch literal 3672 zcmV-e4yW;nP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+TEC0k|Vthgx`4zAAvi-<8Y1e4SalmV5zs+{+Sp* zxfQLFY5_qYkx0nx|NQ&7fAN=EQJ0HoZMAy-a?34tKB#~G+I$8)bkI(rx4_$kCRGZ3Y zS4Vt~^KC2o@t@?Hem7#@-RBcoh|((Dm15i}B!A!Y<3W1<`#pC4h5LMJ_l!6W35$;> z1mw&1-j3dX4$zk%_g5_4x6yz9^iA+%f1OX?#In8_sz1IE%8!G8L;Pvs^!nsD{pA85 z_jlWQ{hzb+oc-*s=SoED3sK&^MaQ1u#(}AHAFI5C|H5avuf|J#_mku-KmFh}Lkp3t z92as}p@$RpJE)O9XZP>zWWmHy6vtv zgR=4p+!_PM0+0Ok<$iVXPhRevX(0+;pE!XF{ECKL+_22qJ9m+Va9(*UH^6VNSNi=Y z{1{X-w^^8#4R${s6QhI=Y^9s$#C?V1Qx(CBr@P@NF~(ZB}NH>I4TM1 zcpg)ZgA9aH;=;+8Q>xKP)M#t-jD&k{EU`vA4L6a9l4=riLrsyaoD2AotYD~@RB|b$ z7J=AGE4`+gYpJzLHInO+BukMhA}UR~Ce2#3s;Fwy-eOB|U}?2U)7Dz=(RCK;*y`Nh zIWyu&BabrbkfEcEK7r57v&=eW>TI*GxYB|qR$a1mwbgfU8>ZNKmtD7P-EH>+)=oP4 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}OwV;o;_6w^*mdO3PPJ*% jTOP-l-*(_Q|*qV6BcTs*XZj$`n2^>bP0l+XkK*P&UP diff --git a/matrix.html b/matrix.html index f6dffae..4620049 100644 --- a/matrix.html +++ b/matrix.html @@ -40,38 +40,61 @@ + + @@ -139,25 +171,34 @@ @@ -182,21 +223,31 @@ @@ -222,24 +273,40 @@ diff --git a/matrix.js b/matrix.js index c893041..8a84916 100644 --- a/matrix.js +++ b/matrix.js @@ -162,7 +162,7 @@ module.exports = function(RED) { var msg = { payload: event.getContent().body, sender: event.getSender(), - room: room.roomId + roomId: room.roomId }; node.send(msg); @@ -254,7 +254,9 @@ module.exports = function(RED) { } var destRoom = ""; - if (node.room) { + if (msg.roomId) { + destRoom = msg.roomId; + } else if (node.room) { destRoom = node.room; } else if (node.configNode.room) { destRoom = node.configNode.room; diff --git a/package.json b/package.json index 52e3f0f..f71bd15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-matrix", - "version": "0.0.3", + "version": "0.0.4", "description": "Node-RED Module for Matrix", "main": "matrix.js", "dependencies": {