|
98 | 98 | <template v-slot:activator="{ on, attrs }">
|
99 | 99 | <v-text-field class="custom-label-color" v-bind="attrs" v-on="on" :label="actionLabel()" v-model="passedObject.btnActionData"></v-text-field>
|
100 | 100 | </template>
|
101 |
| - <span v-if="passedObject.btnType=='http'">Enter GET url. e.g http://[address]/params . </span> |
102 |
| - <span v-if="passedObject.btnType=='Macro'">Enter the full macro filename [name.g].</span> |
103 |
| - <span v-if="passedObject.btnType=='MQTT'">Enter the message text to send</span> |
104 |
| - <span v-if="passedObject.btnType=='gcode'">Enter the gcode command to send</span> |
| 101 | + <span>{{ actionHover() }}</span> |
105 | 102 | </v-tooltip>
|
106 | 103 | </v-col>
|
107 | 104 | </v-row>
|
| 105 | + <v-row class="mx-2 my-n4" dense v-if="passedObject.btnType == 'window'"> |
| 106 | + <v-col cols="6"> |
| 107 | + <v-text-field class="custom-label-color" label="Window Height*" v-model="passedObject.btnWinHSize" required placeholder="200"></v-text-field> |
| 108 | + </v-col> |
| 109 | + <v-col cols="6"> |
| 110 | + <v-text-field class="custom-label-color" label="Window Width*" v-model="passedObject.btnWinWSize" required placeholder="200"></v-text-field> |
| 111 | + </v-col> |
| 112 | + </v-row> |
108 | 113 | <v-row class="mx-2 my-n4" dense v-if="passedObject.btnType == 'MQTT'">
|
109 | 114 | <v-col cols="12">
|
110 | 115 | <v-text-field class="custom-label-color" label="MQTT Topic*" v-model="passedObject.btnTopicData" required></v-text-field>
|
|
157 | 162 | {text: 'Macro', value: 'Macro', disabled: false},
|
158 | 163 | {text: 'http', value: 'http', disabled: false},
|
159 | 164 | {text: 'gcode', value: 'gcode', disabled: false},
|
160 |
| - {text: 'MQTT', value: 'MQTT', disabled: !this.bMQTT} |
| 165 | + {text: 'MQTT', value: 'MQTT', disabled: !this.bMQTT}, |
| 166 | + {text: 'Window', value: 'window', disabled: false} |
161 | 167 | ]
|
162 | 168 | },
|
163 | 169 | radioItems() {
|
|
190 | 196 | if (this.passedObject.btnType == "http") {return "URL*";}
|
191 | 197 | if (this.passedObject.btnType == "MQTT") {return "MQTT MSG*";}
|
192 | 198 | if (this.passedObject.btnType == "gcode") {return "gcode Command*";}
|
| 199 | + if (this.passedObject.btnType == "window") {return "PopUp URL*";} |
| 200 | + }, |
| 201 | + actionHover() { |
| 202 | + if (this.passedObject.btnType == "Macro") {return "Enter the full macro filename [name.g]";} |
| 203 | + if (this.passedObject.btnType == "http") {return "Enter GET url. e.g http://[address]/params";} |
| 204 | + if (this.passedObject.btnType == "MQTT") {return "Enter the message text to send";} |
| 205 | + if (this.passedObject.btnType == "gcode") {return "Enter the gcode command to send";} |
| 206 | + if (this.passedObject.btnType == "window") {return "Enter the Window PopUp URL*";} |
193 | 207 | },
|
194 | 208 | async validateData() {
|
195 | 209 | if (this.passedObject.btnActionData) {
|
|
198 | 212 | await this.sleep(2000);
|
199 | 213 | this.alertReqVal = false;
|
200 | 214 | return;
|
201 |
| - }else if(!this.passedObject.btnLabel && !this.passedObject.btnIcon){ |
| 215 | + }else if(this.passedObject.btnType == "window"){ |
| 216 | + if(!this.passedObject.btnWinHSize || !this.passedObject.btnWinWSize){ |
| 217 | + this.alertReqVal = true; |
| 218 | + await this.sleep(2000); |
| 219 | + this.alertReqVal = false; |
| 220 | + return; |
| 221 | + } |
| 222 | + } else if(!this.passedObject.btnLabel && !this.passedObject.btnIcon){ |
202 | 223 | this.alertReqVal = true;
|
203 | 224 | await this.sleep(2000);
|
204 | 225 | this.alertReqVal = false;
|
|
0 commit comments