improved ui

master
cheetah 2 years ago
parent 5ba823f36c
commit aced878bc6

@ -13,25 +13,25 @@
<div id="app">
<v-app>
<v-app-bar app>
<v-toolbar-title>
Telegram Bot Configuration
</v-toolbar-title>
<v-toolbar-title>Telegram Bot Configuration</v-toolbar-title>
<v-spacer></v-spacer>
<v-checkbox label="Expert Mode" v-model="EXPERTMODE"></v-checkbox>
</v-app-bar>
<v-content>
<v-form>
<v-tabs v-model="configTab" next-icon="mdi-arrow-right-bold-box-outline" prev-icon="mdi-arrow-left-bold-box-outline" show-arrows>
<v-tabs-slider></v-tabs-slider>
<v-tab key="botSettings">Bot Settings</v-tab>
<v-tab key="notificationConfig">Notification Configuration</v-tab>
<v-tab v-show="EXPERTMODE" key="notificationConfig">Notification Configuration</v-tab>
</v-tabs>
<v-tabs-items v-model="configTab">
<v-tab-item key="botSettings">
<v-container>
<!-- <v-row>
<v-row>
<v-col cols="12" sm="12" md="12">
<v-checkbox label="Support Menus" v-model="configData.menuSupport"></v-checkbox>
<v-text-field v-model="configData.bottoken" label="Bot-Token"></v-text-field>
</v-col>
</v-row> -->
</v-row>
<p>Targets:</p>
<v-row>
<v-btn color="success" @click="addRegionCMD()">Add</v-btn>
@ -57,10 +57,10 @@
<v-btn color="success" @click="addDeliveryTarget(index)">Add</v-btn>
<v-row v-for="(connector, index) in deliveryMode.params.routing.connectors" :key="index">
<v-col cols="6" sm="4" md="4">
<v-select :items="connectorTypes" v-model="connector[0]" item-text="k" item-value="v" label="Connector Name"></v-select>
<v-select :items="connectorTypes" v-model="connector[0]" item-text="k" item-value="v" label="Gateway"></v-select>
</v-col>
<v-col cols="6" sm="4" md="4">
<v-text-field v-model="connector[1]" label="Connector Param"></v-text-field>
<v-text-field v-model="connector[1]" label="Call ID"></v-text-field>
</v-col>
<v-col cols="6" sm="4" md="4">
<v-btn color="error" @click="deliveryMode.params.routing.connectors.splice(index, 1)" icon><v-icon>mdi-delete</v-icon></v-btn>
@ -104,6 +104,7 @@
http: { root: '/' },
data() {
return {
EXPERTMODE: false,
configTab: null,
pagerTypes: [
{k: 'Simple', v: 'simple'},
@ -128,6 +129,7 @@
{k: 'LoRaWAN TTNv3', v: 'lorawan'},
],
configData: {
"bottoken": "",
"pager": {
"url": "",
},
@ -165,10 +167,15 @@
this.configData.deliveryModes[ index ].params.routing.connectors.push(["connectorName","connectorParam"])
},
addRegionCMD() {
this.configData.regions.push({
this.configData.deliveryModes.push({
name: "",
active: true,
dwdID: "",
params: {
"type": "simple",
"routing": {
"device": "generic",
"connectors": []
}
},
})
},
}

Loading…
Cancel
Save