Skip to content

Commit 99e622c

Browse files
authored
Alpha 0.8.15
1 parent 82fb41e commit 99e622c

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

src/BtnCmdSettingsDialogue.vue

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@
9898
<template v-slot:activator="{ on, attrs }">
9999
<v-text-field class="custom-label-color" v-bind="attrs" v-on="on" :label="actionLabel()" v-model="passedObject.btnActionData"></v-text-field>
100100
</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>
105102
</v-tooltip>
106103
</v-col>
107104
</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>
108113
<v-row class="mx-2 my-n4" dense v-if="passedObject.btnType == 'MQTT'">
109114
<v-col cols="12">
110115
<v-text-field class="custom-label-color" label="MQTT Topic*" v-model="passedObject.btnTopicData" required></v-text-field>
@@ -157,7 +162,8 @@
157162
{text: 'Macro', value: 'Macro', disabled: false},
158163
{text: 'http', value: 'http', disabled: false},
159164
{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}
161167
]
162168
},
163169
radioItems() {
@@ -190,6 +196,14 @@
190196
if (this.passedObject.btnType == "http") {return "URL*";}
191197
if (this.passedObject.btnType == "MQTT") {return "MQTT MSG*";}
192198
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*";}
193207
},
194208
async validateData() {
195209
if (this.passedObject.btnActionData) {
@@ -198,7 +212,14 @@
198212
await this.sleep(2000);
199213
this.alertReqVal = false;
200214
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){
202223
this.alertReqVal = true;
203224
await this.sleep(2000);
204225
this.alertReqVal = false;

0 commit comments

Comments
 (0)